delegate_agentic_task
Delegate a multi-step task to a separate agent with its own tool loop, scoped to a working directory, and receive only the final answer. Specify task and directory, plus optional limits.
Instructions
Delegate a multi-step task to a model with its own tool-use loop (read_file, write_file, run_bash) scoped to working_dir. Runs until the model stops calling tools, hits max_iterations, or exceeds timeout_seconds. Returns only the final answer, not the full transcript.
The delegated model gets unattended file/bash access within working_dir for the duration of the call - point it at a directory you're comfortable it can read, write, and execute commands in.
Args:
task: The task instruction to give the delegated model.
working_dir: Directory the model's tools are scoped to.
model: Override just the model string for this call.
max_iterations: Stop after this many tool-call rounds.
timeout_seconds: Wall-clock budget for the whole task.
backend: Named backend from models.json (base_url/model/api_key) to
use instead of the default DELEGATE_* env vars. model, if also
given, overrides the model within that backend.
capture_transcript: Log every model message and tool call/result for
later retrieval via get_delegation_transcript, instead of just
the final answer. Off by default; useful when comparing models
(e.g. a bake-off) rather than for routine use.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| model | No | ||
| backend | No | ||
| working_dir | Yes | ||
| max_iterations | No | ||
| timeout_seconds | No | ||
| capture_transcript | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |