Delegate a task to a child AI agent in a dependent repository.
The child agent will execute the task in that repo and return the result. Use this after initializing a Polygraph session with start_session. Multiple agents per repo are supported via the optional role parameter (omitted = the default role, whose logs are the only ones uploaded to the cloud). Follow-up routing is automatic per agent: if the targeted repo+role already has an active task (in-progress or input-required), the instruction is delivered to that task as a follow-up message instead of starting a new run.
Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string | yes | The Polygraph session ID, or a supported Polygraph app session URL. Supported URL paths are /s/<session-id> and /orgs/<org-id>/sessions/<session-id>. URL inputs are normalized to the session ID; the MCP always uses the current Polygraph API configuration. |
repo | string | yes | Repo name or ID to delegate to |
instruction | string | yes | Task instruction for the child agent |
context | string | no | Background context about the task |
agent | enum | no | AI agent implementation to use for the delegated task. One of: claude, opencode, codex. |
role | string | no | Optional role identifying which of the repo's agents to target; omit for the default agent. |