> ## Documentation Index
> Fetch the complete documentation index at: https://graph.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.
* `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

**maxIterations** `integer`

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

**model** `string`

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

**outputSchema** `any` *required*

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

**prompt** `string` *required*

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

**systemPrompt** `string`

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

**tools** `string[]`

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>}}`.

**final** `boolean`

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

**iterations** `integer`

How many model rounds the step took.

**output** `object`

The answer, matching `outputSchema`.

**output.classifications** `object[]`

**output.classifications.\[].issue\_id** `string`

**output.classifications.\[].reason** `string`

**output.classifications.\[].severity** `string`

**tools\_called** `object[]`

Each tool call, with the round it happened in.

**tools\_called.\[].round** `integer`

The round the call happened in.

**tools\_called.\[].tool** `string`

The tool's name.

```yaml Plan step theme={null}
- id: E1
  tool_name: agent
  input:
    prompt: "{{input.prompt}}"
    outputSchema: "{{input.outputSchema}}"
```

```json Result theme={null}
{
  "final": true,
  "iterations": 3,
  "output": {
    "classifications": [
      {
        "issue_id": "123",
        "reason": "…",
        "severity": "high"
      }
    ]
  },
  "tools_called": [
    {
      "round": 1,
      "tool": "linear__list_issues"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.