Spawn a new PJ v3 agent instance from a persona template. Validates authority limits, creates the instance record, composes the full system prompt (persona + skills + hierarchy), and spawns a browser or terminal session on the desktop agent. Returns instance details and session information.
persona_id : string- UUID of the persona template to spawn from
browser_mode : string (optional)- Session type: 'desktop' for desktop browser, 'cloud' for cloud browser, 'terminal' for CLI session — default:
"terminal" spawn_reason : string- Reason for spawning this agent
parent_instance_id : string (optional)- UUID of the parent agent instance (for delegation chains). Child inherits session and workspace.
layout : string (optional)- Terminal layout: 'tab' (default), 'window' (separate window), 'hsplit' (side by side), 'vsplit' (top/bottom) — default:
"tab" — enum: tab, window, hsplit, vsplit split_from : string (optional)- Tab ID to split from (for hsplit/vsplit). Auto-selects latest pane if omitted.
initial_task : string (optional)- Optional task/mission to inject into the agent's system prompt. Appears as a '# Your Mission' section in CLAUDE.md so the agent begins working autonomously on startup.
desktop_agent_id : string (optional)- UUID or agent_id of a specific desktop agent to target. When multiple desktop agents are online, this ensures the spawn routes to the correct machine. If omitted, the most recently active agent is selected automatically.
mcp_endpoint : string (optional)- Override the MCP endpoint URL for this agent. Use '/api/mcp/pjv3/sse/' (restricted, coordination-only tools) to force delegation, or '/api/mcp/sse/' (full toolset) for worker agents. If omitted, auto-detected based on persona role.
allow_overage : boolean (optional)- Bypass instance and mission budget refusals. Use only when knowingly authorizing spend beyond the configured ceiling. — default:
false mission_id : string (optional)- UUID of the Mission to attach this instance to. When set, the instance's budget defaults to the mission's budget_usd (overriding the persona/org default). Used by pj_launch_mission's cloud-fallback path to propagate mission context to top-level spawns that have no parent instance.
on_behalf_of_tenant : string (optional)- OPERATOR-ONLY. Subdomain or UUID of a customer tenant to spawn this mission on behalf of, so it runs INSIDE that tenant's Studio container instead of the prod host. Binds the instance's human principal + organization to the target tenant (routing keys off them); the command stays owned by the operator's daemon. Refused unless the caller is a platform operator and the tenant has a READY studio.
on_behalf_of_user_id : string (optional)- Optional UUID of a specific active user in on_behalf_of_tenant to act as. When omitted, the tenant's default principal (internal operator, else first active admin) is used.