> ## Documentation Index
> Fetch the complete documentation index at: https://stage-docs.oktivo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents

> AI voice personas that handle conversations autonomously

# Agents

An agent is an AI-powered voice persona that conducts conversations on your behalf. Each agent has its own personality, instructions, and data extraction rules.

## What Makes Up an Agent

| Component | Description |
| - | - |
| **System prompt** | Instructions that define how the agent behaves, what it says, and its goals |
| **Voice config** | Voice provider, voice ID, language, and speech settings |
| **Analysis schema** | Structured fields to extract from the conversation (e.g., `interested`, `reason`, `callback_time`) |
| **Tools** | Optional capabilities like transferring calls, booking appointments, or looking up data |
| **Cost per minute** | Billing rate for this agent (affects credit consumption) |

## How Agents Work

1. A call is triggered (via campaign, CRM API, or inbound routing)
2. The agent connects to the call and follows its system prompt
3. During the conversation, the agent uses its tools and adapts to the caller's responses
4. After the call, the agent extracts structured data based on the analysis schema
5. Results are delivered via webhook or available in the dashboard

## Agent Configuration

Agents are created and managed through the Oktivo dashboard. Key settings:

* **Name** a human-readable label for the agent
* **System prompt** the core instructions (supports dynamic variables like `{{name}}` and `{{company}}`)
* **Voice** select from available voice providers and voices
* **Analysis schema** define JSON fields the agent should extract post-call
* **Max call duration** safety limit to prevent runaway calls

## Dynamic Variables

When triggering calls via the CRM API, you can pass `dynamicVariables` that get injected into the agent's prompt:

```json theme={null}
{
  "phone": "+14155551234",
  "name": "Jane Smith",
  "agentId": "agent_abc123",
  "dynamicVariables": {
    "company": "Acme Corp",
    "plan": "Enterprise",
    "renewal_date": "2025-03-15"
  }
}
```

Variables are referenced in the prompt as `{{company}}`, `{{plan}}`, etc.

## Agent IDs

Every agent has a unique ID (e.g., `agent_abc123`). You'll use this ID when:

* Triggering calls via the CRM API
* Filtering webhooks to a specific agent
* Querying call results for a particular agent


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