Run agents

Delegation

Let an agent hand a task to another agent, on another machine, under the same job.

Delegation is how agents work together across the fleet. An agent with oz.delegate in its tools can hand a task to an agent in its delegation.allow list and wait for the answer. The child runs as a job of its own, on any node that has that agent, so a lead agent on a laptop can delegate to a test runner on a GPU box.

agents/lead.yaml
name: lead
runtime: pydantic-ai
model:
  primary: anthropic/claude-sonnet-5-5
instructions: prompts/lead.md
tools: [oz.delegate]
delegation:
  allow: [helper, test-runner]   # agents oz.delegate may start
  max_depth: 1                   # how deep a chain of delegations may go
  max_children: 3                # delegations per job

The model sees oz.delegate as a tool with two arguments: the agent, from the allowed list, and the task. Write the agents' description well; it is what tells the lead which helper fits.

The platform enforces the rules

The allowed agents are an enum in the tool's schema, and the workflow checks the allow list, max_depth and max_children again before it starts a child, because a model can ignore a schema. When a limit is reached, the model is told so and answers without delegating.

The tree

A child's job ID is <parent>/<agent>-<8 hex>, so the tree is in the IDs. job get on the parent shows every branch and what it cost:

JOB                                       AGENT   NODES              MODELS                       CALLS  INPUT  CACHED  OUTPUT  COST
job-bb270cf1-b194-4bf1-a0e3-267e061e416a  lead    node-91378eb09343  anthropic/claude-sonnet-5-5  2      465    0       45      $0.0014
└ helper-30aa1892                         helper  node-d77d102ec079  anthropic/claude-haiku-4-5   2      307    0       44      $0.0005

Cancelling the parent cancels its children, and a budget set on the parent covers the whole tree.

Planned: fan-out of many children in parallel, agents as tools (agent:<name>), a share of the parent's budget for each child, and agents asking a running colleague a question.
Copyright © 2026