How Agents Run
Your agent is defined as static YAML, but it does not run like a static script. At runtime it reasons, calls tools, and routes work — no graph to draw.
Static definition, dynamic runtime#
A Prix agent is declared in YAML: its models, tools, context, and prompt. That part is static — there is no workflow graph, no node editor, no if X then Y wiring to maintain. What makes an agent “dynamic” is the runtime: the model decides what to do next on each turn.
| Workflow tools | Prix agents | |
|---|---|---|
| Definition | A graph of nodes and edges | Static YAML + a prompt |
| Control flow | You wire every branch | The model chooses each step at runtime |
| New situation | Add a node or a rule | Reasoned through with the existing prompt |
| Specialist work | Another node in the graph | Delegated to a sub-agent on demand |
The agentic loop#
Execution is a loop, not a pipeline: the model receives the prompt and context, decides on an action (usually a tool call), the runtime executes it, the result is fed back, and the loop repeats until the task is done or the turn budget is reached. The cap is max_turns in agent.yaml.
prompt + context
│
▼
model ──▶ decides an action (tool call)
▲ │
│ ▼
result ◀── runtime executes the tool
│
└─ repeat until done, or max_turns reachedDelegation: agents that route to specialists#
A single agent does not have to do everything. With the delegate tool, a parent agent can hand a sub-task to a specialist sub-agent at runtime. Routing is driven by each sub-agent’s description, not a hardcoded edge — the parent picks the right specialist for the input in front of it.
tools:
- name: delegate
config:
max_depth: 2
delegate_agents:
summarizer:
prompt: summarizer-prompt.yaml
tools:
- web_fetch
- artifacts