Dive

Control steps

agent

Hands one step to a model that calls tools until it can return structured output.

When to use it

  • When which tool to call next depends on what an earlier call returned.
  • When the order of calls is known in advance, write plain steps instead. They make no model calls.

How it works

  • tools limits what the step can call, by name or glob. Omit it for the whole catalog. The step loads them through a search, like any agent (see Agent file).
  • maxIterations caps model rounds. The default is 8.
  • systemPrompt is added after the built-in prompt.
  • Each round is a model call, and inside map it runs once per item.

Input

Maximum inference rounds — every round is one model call, including the one that produces the final answer. Default: 8.

modelstring

A configured model role, standard or custom. Defaults to the chat role.

outputSchemaanyrequired

JSON Schema for the agent's structured output. Must be type object.

promptstringrequired

The task description. May use templates like {{E0.results}}.

Extra system prompt guidance. May use templates like the prompt.

toolsstring[]

Tool names or wildcard patterns (e.g. linear__*) to expose. Every pattern must resolve to at least one tool. Omit for all available tools; an empty list is an error, not 'no tools'.

Result

Later steps read these as {{<step id>.<field>}}.

finalboolean

False when the round limit ran out before a complete answer.

iterationsinteger

How many model rounds the step took.

outputobject

The answer, matching outputSchema.

tools_calledobject[]

Each tool call, with the round it happened in.

The round the call happened in.

The tool's name.

- id: E1
  tool_name: agent
  input:
    prompt: "{{input.prompt}}"
    outputSchema: "{{input.outputSchema}}"
{
  "final": true,
  "iterations": 3,
  "output": {
    "classifications": [
      {
        "issue_id": "123",
        "reason": "…",
        "severity": "high"
      }
    ]
  },
  "tools_called": [
    {
      "round": 1,
      "tool": "linear__list_issues"
    }
  ]
}