---
title: Agent Config
description: Configuring the agent model and behavior.
---

# Agent Config

The `agent` section configures the LLM model, system prompt, tools, and behavior.

## Basic Configuration

```yaml
agent:
  model: anthropic/claude-sonnet-4-5
  system: system              # References prompts/system.md
  tools: [get-user-account]   # Available tools
```

## Configuration Options

| Field | Required | Description |
|-------|----------|-------------|
| `model` | Yes | Model identifier (provider/model-id) |
| `system` | Yes | System prompt filename (without .md) |
| `input` | No | Variables to interpolate in system prompt |
| `tools` | No | List of tools the LLM can call |
| `agentic` | No | Allow multiple tool call cycles |
| `maxSteps` | No | Maximum agentic steps (default: 10) |
| `temperature` | No | Model temperature (0-2) |
| `thinking` | No | Extended reasoning level |
| `anthropic` | No | Anthropic-specific options (tools, skills) |

## Models

Specify models in `provider/model-id` format:

```yaml
# Anthropic
agent:
  model: anthropic/claude-sonnet-4-5   # Claude 4.5 Sonnet
  model: anthropic/claude-opus-4       # Claude 4 Opus

# OpenAI
agent:
  model: openai/gpt-4o                 # GPT-4o
  model: openai/gpt-4o-mini            # GPT-4o Mini
  model: openai/o1                     # O1
  model: openai/o3-mini                # O3 Mini
```

## System Prompt

The system prompt sets the agent's persona and instructions:

```yaml
agent:
  system: system  # Uses prompts/system.md
  input:
    - COMPANY_NAME
    - PRODUCT_NAME
```

Example `prompts/system.md`:

```markdown
You are a friendly support agent for {{COMPANY_NAME}}.

## Your Role

Help users with questions about {{PRODUCT_NAME}}.

## Guidelines

- Be helpful and professional
- If you can't help, offer to escalate
- Never share internal information
```

## Agentic Mode

Enable multi-step tool calling:

```yaml
agent:
  model: anthropic/claude-sonnet-4-5
  system: system
  tools: [get-user-account, search-docs, create-ticket]
  agentic: true    # LLM can call multiple tools
  maxSteps: 10     # Limit cycles to prevent runaway
```

**How it works:**
1. LLM receives user message
2. LLM decides to call a tool
3. Tool executes, result returned to LLM
4. LLM decides if more tools needed
5. Repeat until LLM responds or maxSteps reached

## Extended Thinking

Enable extended reasoning for complex tasks:

```yaml
agent:
  model: anthropic/claude-sonnet-4-5
  thinking: medium  # low | medium | high
```

| Level | Token Budget | Use Case |
|-------|-------------|----------|
| `low` | ~5,000 | Simple reasoning |
| `medium` | ~10,000 | Moderate complexity |
| `high` | ~20,000 | Complex analysis |

Thinking content streams to the UI and can be displayed to users.

## Temperature

Control response randomness:

```yaml
agent:
  model: openai/gpt-4o
  temperature: 0.7  # 0 = deterministic, 2 = creative
```

**Guidelines:**
- `0 - 0.3`: Factual, consistent responses
- `0.4 - 0.7`: Balanced (good default)
- `0.8 - 1.2`: Creative, varied responses
- `> 1.2`: Very creative (may be inconsistent)

## Provider Options

Enable provider-specific features like Anthropic's built-in tools and skills:

```yaml
agent:
  model: anthropic/claude-sonnet-4-5
  anthropic:
    tools:
      web-search:
        display: description
        description: Searching the web
    skills:
      pdf:
        type: anthropic
        description: Processing PDF
```

Provider options are validated against the model—using `anthropic:` with a non-Anthropic model will fail validation.

See [Provider Options](/docs/protocol/provider-options) for full documentation.

## Thread-Specific Config

Override config for named threads:

```yaml
handlers:
  request-human:
    Start summary thread:
      type: start-thread
      thread: summary
      model: anthropic/claude-sonnet-4-5  # Different model
      thinking: low                        # Different thinking
      maxSteps: 1                          # Limit tool calls
      system: escalation-summary           # Different prompt
```

## Full Example

```yaml
input:
  COMPANY_NAME: { type: string }
  PRODUCT_NAME: { type: string }
  USER_ID: { type: string, optional: true }

resources:
  CONVERSATION_SUMMARY:
    type: string
    default: ""

tools:
  get-user-account:
    description: Look up user account
    parameters:
      userId: { type: string }

  search-docs:
    description: Search help documentation
    parameters:
      query: { type: string }

  create-support-ticket:
    description: Create a support ticket
    parameters:
      summary: { type: string }
      priority: { type: string }  # low, medium, high

agent:
  model: anthropic/claude-sonnet-4-5
  system: system
  input:
    - COMPANY_NAME
    - PRODUCT_NAME
  tools:
    - get-user-account
    - search-docs
    - create-support-ticket
  agentic: true
  maxSteps: 10
  thinking: medium
  # Anthropic-specific options
  anthropic:
    tools:
      web-search:
        display: description
        description: Searching the web
    skills:
      pdf:
        type: anthropic
        description: Processing PDF

triggers:
  user-message:
    input:
      USER_MESSAGE: { type: string }

handlers:
  user-message:
    Add message:
      type: add-message
      role: user
      prompt: user-message
      input: [USER_MESSAGE]
      display: hidden

    Respond:
      type: next-message
```

