invoke_session
Spawn an isolated specialist agent with its own context window, model/cost tier, prompt, and tools to delegate complex tasks while saving context and cost.
Instructions
Spawn an independent specialist agent in an isolated session with its own context window, model/cost tier, system prompt, and tools. Supports preset personas (agent_preset) and model tiering (fast/balanced/heavy) to save cost while multiplying effective context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | Alias for initial_message: the task or goal for this isolated session to execute | |
| name | No | Human-readable name for the specialist agent (optional if agent_preset is provided) | |
| role | No | Role or title of the specialist (optional if agent_preset is provided) | |
| tier | No | Cost & capability tier: "fast" (low-cost exploration/subtasks), "balanced" (standard implementation), "heavy" (frontier reasoning/auditing) | |
| model | No | Explicit model override (e.g. "claude-sonnet-4-6", "gemini-3.8-flash-high", "gemini-3.8-flash-lite") | |
| provider | No | Inference provider ("agy", "agy_claude", "gemini", "anthropic", "openai", "ollama") | |
| safety_mode | No | Safety execution mode | |
| agent_preset | No | Preset specialist from config (e.g. "researcher", "coder", "reviewer", "frontend-designer") | |
| allowed_tools | No | Tools the specialist is allowed to use (default: preset tools or all) | |
| system_prompt | No | Instructions defining the specialist persona (optional if agent_preset is provided) | |
| await_response | No | If true (default), waits for execution to finish and returns the distilled response. If false, runs asynchronously in background. | |
| max_iterations | No | Max tool-use loops allowed (default: 20) | |
| workspace_path | No | Workspace directory path for tool execution (default: "./") | |
| initial_message | No | Initial task or message to start execution with | |
| parent_session_id | No | ID of the calling parent session (default: "parent-session") |