Skip to content

Agent Delegation

Delegation tools let agents hand off work to other agents. There are two modes: fire-and-forget with delegate_task, and synchronous with run_subtask.

Delegates a task to another agent. The calling agent does not wait for the result. When the target agent finishes, the result is posted directly to the chat.

delegate_task(
target_agent: "researcher",
title: "Research market trends",
instruction: "Find recent data on AI adoption in healthcare"
)
ParameterTypeRequiredDescription
target_agentstringyesName of the agent to delegate to
titlestringyesShort title for the task
instructionstringyesDetailed instructions for the target agent
run_atstringnoISO 8601 datetime to defer execution

Runs a task on another agent and waits for the result. The calling agent’s tool loop pauses until the target agent completes the work, then the result is returned to the calling agent so it can continue.

run_subtask(
target_agent: "developer",
title: "Generate API client",
instruction: "Create a Python client for the payments API based on the OpenAPI spec"
)
ParameterTypeRequiredDescription
target_agentstringyesName of the agent to delegate to
titlestringyesShort title for the task
instructionstringyesDetailed instructions for the target agent
run_atstringnoISO 8601 datetime to defer execution
delegate_taskrun_subtask
Calling agent waitsNoYes
Result goes toChat directlyCalling agent
Use whenYou want to hand off and move onYou need the result to continue

Loads the full content of a pre-defined skill by name. Skills are prompt and tool configurations that extend what an agent can do without delegating to a separate agent.

read_skill(name: "code-review")
ParameterTypeRequiredDescription
namestringyesThe name of the skill to load

The platform provides each agent with a list of available agents. The agent uses the name and description of each available agent to decide who to delegate to.

This is why writing clear agent descriptions matters. They help other agents make good delegation decisions.