pi_spawn_agent
Start a named Pi agent asynchronously to delegate a task and keep working; use the returned ID to check progress or retrieve final results later.
Instructions
Start a named Pi agent asynchronously. Returns identity/status, not a completed result. Continue independent work; when idle, call pi_wait_agent instead of repeatedly polling. pi_poll_agent reads progress or a needs_input question; answer through pi_continue_agent on the same ID. Read final delivery with pi_get_result once done. Unread events may accompany any tool response; no live notifications. Use pi_list_agents for reuse. Omit model to follow Pi settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute task/project working directory. Pass it explicitly when the MCP client starts servers outside the project. | |
| name | No | Optional human-readable agent name; generated when omitted. | |
| task | Yes | Task description for the Pi agent | |
| model | No | Optional model key in "provider/model-id" format (e.g. anthropic/claude-sonnet-4-6, openai/gpt-4o). Omit to use the model resolved from the user's current Pi settings default (read per task, so a settings change applies to the next spawn). Pass an explicit model to override it. | |
| description | No | Optional short description to help identify and reuse this agent. |