Agents
Subagents
[email protected](space, task) runs the same conversation loop in quiet mode: no chat bubbles, no boot window, no auto-recall, no persisted turn, and the parent's mailbox is left alone. The child's final reply returns to the calling cell as a value.
When to delegate
Delegate when intermediate steps would only clutter the parent's context — a survey over many objects, a batch transformation, a research errand. Write the task like a good ticket: goal, inputs (ids, names), and what the report must contain. The child starts blank and knows nothing of the parent conversation.
sa = use("agent:subagent@v1")
out = sa.delegate(space,
"Survey every object of type `task` with status open in space 'dev'. "
"Report: count, the five oldest by createdAt (id, name, age in days), "
"and any task with no assignee.")
out["report"] # the child's final text
out["stop"] # done | wrapup | ...
out["turns"], out["tokens"]
What the child gets
| Aspect | Child loop |
|---|---|
| Space | the same space as the parent — same types, objects, programs |
| Tools | the full tool surface; system prompt composed from the same skills, plus one line saying it is a subagent whose reply returns to the delegating agent |
| Context | only the task text — no chat history, no memory injection |
| Chat | cannot post; interim text is not surfaced |
| Ceilings | bounded like any run (_MAX_TURNS = 30 for a delegated subtask) |
| Persistence | no agent_turns record, no ROI log |
| Trace | the child's model calls and cells nest inside the parent's trace under the subagent.delegate span |
Delegation is a thin wrapper, not a second loop implementation — use("toolcaller@v1").main({..., "quiet": True}). It is blocking and sequential; parallel children are not supported.
Known limits
- Child cells share the kernel namespace with parent cells (
subcellis reentrant by design). Cell ids stay distinct because tool-call ids are provider-unique. - Depth beyond one level is mechanically possible and prompt-discouraged.
Note. Because the child does not drain the mailbox, a
breakorinjectsent during a delegation is seen by the parent on its next turn, after the child returns.
For a search-and-synthesise errand over the web rather than the space, use deepResearch@v1 instead — it writes its findings as pages. See Tools.