Skip to main content

OPEN_AGENT_TOOL

Constant OPEN_AGENT_TOOL 

Source
pub(crate) const OPEN_AGENT_TOOL: &str = r#"{
  "name": "OpenAgent",
  "description": "Launch an agent from My Agents into a pane by name or definition id (get these from FleetList/DiscoverAgents). Templates are refused (TEMPLATE_NOT_OPENABLE): create an agent from the template in the agent picker first. Opens into a new pane in the target tab — there is no choice of pane or tab stack yet. Idempotent: if the agent is already open in the target tab, returns its existing pane with created:false instead of opening a second one. This spawns a real provider process (and, for container agents, execs into their container) — it consumes provider tokens like any human-opened pane. Returns JSON {block_id, tab_id, agent_id, provider, controller_type, status, created}. After a successful open the agent becomes addressable for SendMessage.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "agent_id": { "type": "string", "description": "Agent definition id or name (case-insensitive), e.g. from FleetList's host.agents[]" },
      "tab_id": { "type": "string", "description": "Optional target tab id; defaults to the active tab" },
      "focus": { "type": "boolean", "description": "Optional: focus the new pane (default true)" }
    },
    "required": ["agent_id"]
  }
}"#;