Execution Model
An Agent Runner agent is not a single model call. It is a loop: the agent works toward a goal, decides what to do next, acts, observes the result, and decides again — until the task is done.
The loop
Each turn of an agent run follows the same cycle:
- Decide. The model is given the goal, the conversation so far, and the set of tools available to it. It chooses the next action.
- Act. When the model requests a tool, the executor runs it. The tool may be built-in, a custom tool served over HTTP, or an MCP tool.
- Observe. The tool's result is returned to the model.
- Repeat. With the result in hand, the model decides the next action — call another tool, refine its plan, ask the user, or finish.
The control flow is not fixed in advance. It emerges from the model reasoning over what it finds at each step. This is the difference between an agent and a scripted workflow: the sequence of actions is decided at run time, not drawn beforehand.
For deterministic, auditable business processes where the path should be fixed, use the Process Engine instead — there, the engine owns control flow and an agent runs as a bounded worker inside a node. The two models are complementary, and the Process Engine documentation explains when to reach for each.
Planning and decomposition
Agents can reason about their own approach. Built-in think, plan, and update_plan tools let an agent lay out and revise a plan as it learns more, rather than committing to a single sequence up front. For large tasks, an agent can spin up parallel sub-agents — see Workstreams — and coordinate their results.
How a run ends
An agent run is bounded. A run completes when:
- the model has no further actions to take and returns its final result, or
- a tool signals completion (for example, the agent ends the conversation explicitly).
Interactive agents, rather than ending, wait for the next user message and resume on input.
To keep autonomous runs safe, the runtime applies guardrails independent of the model's own judgment: a maximum number of tool iterations before prompting the model to reassess, and automatic loop-detection that stops an agent repeating the same action without progress. These reduce the risk of runaway loops, even if a task is mis-specified.
Durability
The agent loop runs on Vertesia's durable workflow engine. State — the conversation, the plan, intermediate results — is preserved as the run proceeds, so a long-running agent survives worker restarts and resumes where it left off rather than starting over. This is what makes runs that span minutes, hours, or days reliable; see Workflows for the underlying execution guarantees.
