> For the complete documentation index, see [llms.txt](https://angoor-ai.gitbook.io/angoor-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angoor-ai.gitbook.io/angoor-ai/tutorials/setup-a-simple-voice-agent/agent-configuration.md).

# Agent Configuration

The Agent is the intelligence layer of your voice application. While Plivo handles the communication channel, the Agent determines how the AI thinks, responds, behaves, and interacts with users. Every conversation passes through the configured Agent before a response is generated.

**Navigate to:** `Configuration → Agents → Edit Agent`

<figure><img src="/files/w8cAfUVaSmvMV7X3Tt0W" alt=""><figcaption></figcaption></figure>

#### 2.1 The Role of an Agent

An Agent acts as the digital representative of your organization. It determines how the AI introduces itself, how questions are answered, what information can and cannot be shared, how conversations are structured, and what business rules to follow. Think of the Agent as the "brain" of the voice assistant.

#### 2.2 Agent Architecture

<figure><img src="/files/M1nVlTn68LsDBZg02xVv" alt=""><figcaption></figcaption></figure>

| Component | Purpose                              |
| --------- | ------------------------------------ |
| Core      | Defines behavior and instructions    |
| Settings  | Controls model behavior and metadata |
| Analytics | Tracks usage and performance         |

#### 2.3 Core Configuration — The Voice Agent Prompt

The Core section contains the instructions that govern every interaction. This is the single most important part of the entire Agent configuration: poor prompts create poor experiences, while well-designed prompts create intelligent, predictable, professional assistants.

The Voice Agent Prompt defines the AI's identity, personality, responsibilities, restrictions, tone, and response style. For example, a customer-support assistant might be configured as:

Example Prompt:

`ROLE:You are a friendly, professional customer support voice assistant for {{company_name}}, a skincare company specializing in acne care products and routines. You speak with callers over the phone in a warm, calm, and reassuring tone.`

`OBJECTIVE Help callers with:`

* `Questions about products, ingredients, and suitable routines`
* `Order status, shipping, returns, and refunds`
* `General acne-care guidance at a high, non-medical level`
* `Booking a consultation with a skincare specialist when needed Address the caller by {{customer_name}} whenever it is available.`

`BEHAVIORAL RULES`

* `Be polite, patient, and encouraging — skin concerns can be sensitive.`
* `Keep responses short and clear; ask only one question at a time.`
* `Confirm important details (order numbers, email, address) before acting.`
* `If a caller describes severe, painful, or worsening symptoms, gently recommend they consult a licensed dermatologist or doctor.`
* `If you do not know an answer, say so honestly and offer to connect the caller to a human specialist or take a message.`

`RESTRICTIONS`

* `Never provide a medical diagnosis or prescribe medication.`
* `Never make guarantees about results or "cures."`
* `Never ask for passwords, OTPs, full card numbers, or payment credentials.`
* `Never share internal company information, other customers' data, or pricing not officially published.`
* `Stay strictly within {{company_name}}'s products and services; do not give unrelated advice.`

KNOWLEDGE Refer to the Product Knowledge Base for product details, ingredients, routines, and policies before answering. Do not invent product claims.

CLOSING When the caller's needs are met, confirm there is nothing else, thank them warmly, and let the conversation end naturally.

This single instruction immediately establishes the agent's role, behavioral expectations, and security boundaries.

> **💡 Why prompt design matters** A poorly designed prompt produces inconsistent responses, incorrect information, unwanted behavior, and security risks. A well-designed prompt produces consistent conversations, predictable behavior, better customer experiences, and reduced operational risk.

#### 2.4 Prompt Structure Best Practices

The Prompt Editor supports rich text, structured prompts, dynamic variables, Knowledge Base references, and conditional logic. A well-structured prompt generally contains four parts:

| Section          | Defines                       | Example                                                                       |
| ---------------- | ----------------------------- | ----------------------------------------------------------------------------- |
| Role Definition  | Who the AI is                 | "You are a customer support representative for ABC Bank."                     |
| Objective        | What the AI should accomplish | "Help users resolve account-related issues and answer banking questions."     |
| Behavioral Rules | How responses are delivered   | Be polite; be concise; ask one question at a time; confirm important actions. |
| Restrictions     | Prohibited behavior           | Never request passwords; never request OTPs; never provide financial advice.  |

#### 2.6 Variables

Variables insert dynamic information into conversations, making them personalized and context-aware. Compare "Hello customer." with "Hello John. How may I assist you today?" — the second feels significantly more personal.

| Example Variable  | Purpose               |
| ----------------- | --------------------- |
| customer\_name    | Personalization       |
| phone\_number     | Caller identification |
| order\_id         | Transaction lookup    |
| appointment\_date | Scheduling            |
| customer\_type    | Routing decisions     |

**Example usage.** Prompt: `Address the user by {{customer_name}} whenever possible.` Output: "Hello Pranjal. How can I help you today?"

#### 2.7 Conditional Prompts

Not every conversation should follow the same instructions. Conditional Prompts allow behaviour to change based on the situation.

#### Example

A conditional prompt has two parts: a **condition** that is evaluated during the call, and an **instruction** that is applied only when that condition is true.

**Scenario:** Give frustrated callers more empathetic, escalation-focused handling.

**WHEN (condition)**

| Field       | Operator | Value      |
| ----------- | -------- | ---------- |
| `sentiment` | Equals   | `negative` |

**Instruction (applied when true):**

> "The caller appears frustrated. Respond with empathy, acknowledge their concern first, avoid scripted language, and prioritize resolving or escalating the issue. Do not ask more than one question at a time."

**Result:** As soon as the caller's sentiment is detected as negative, the Agent automatically layers this instruction on top of its core prompt for the rest of the conversation — without changing the base prompt.

#### 2.8 Connect Form

Forms allow structured information collection during a conversation; the Connect Form feature links a form directly to the Agent. Common use cases include lead generation, appointment booking, customer onboarding, feedback collection, and support-ticket creation.

**Example:** An appointment form collecting Name, Phone Number, Preferred Date, and Preferred Time can be filled conversationally and submitted automatically.

#### 2.9 Settings — Metadata & Custom Features

The Settings tab controls the Agent's operational behavior. Metadata (Name and Description) helps identify and manage agents.

#### Custom Features

**Description:** Custom Features are toggles that enhance and shape the Agent's conversational behavior. Each one adjusts how the Agent responds, what it is allowed to do, and how much context it carries between turns.

#### Enable Streaming

Streams the Agent's responses as they are generated, rather than waiting for the full response to be ready.

**Why it matters:** Produces faster perceived response times, more natural conversations, and reduced caller waiting time. Strongly recommended for production deployments.

**Example:** The caller begins hearing the Agent's answer almost immediately as it is generated, instead of sitting through a silent pause while the full reply is composed.

**Current value:** `Enabled`

#### History Top K

Controls how many previous messages are included as context in each turn.

**Why it matters:** Context lets the Agent remember earlier parts of the conversation. Without it, the Agent re-asks for information it was already given; with it, the Agent stays coherent across turns. Higher values give more memory but increase token usage.

**Recommended values:**

* Simple support: `3`
* Customer service: `5`
* Complex workflows: `10`

**Example:** With History Top K set to `3`, the caller asks "What's the interest rate?" and the Agent correctly knows they mean the savings account discussed two messages earlier — rather than replying "Which product do you mean?"

**Current value:** `3`

#### 2.10 Settings — Model & Context

#### Overview

The Model settings control the "engine" behind the Agent — which AI model does the reasoning, how much it can remember, and how predictable or creative its responses are. Where the prompt defines *what* the Agent should do, these settings define *how* it thinks.

#### Model Settings

#### Model

Selects the underlying AI model that powers the Agent's reasoning and response generation.

**Why it matters:** The model is the single biggest factor in the Agent's intelligence. Different models trade off four things against each other:

* **Accuracy** — the quality and correctness of responses
* **Latency** — how quickly responses are generated
* **Context window** — how much information the model can hold in memory at once
* **Cost** — the resource consumption per request

**Example value:** `GPT OSS 120B (Groq)`

#### Tokens

Indicates the model's context window — the maximum amount of information (prompt, conversation history, knowledge base content, and the response itself) the model can process in a single turn.

**Why it matters:** A larger token capacity allows longer conversations, larger prompts, more knowledge base content, and better memory retention across the call. Once a conversation exceeds the window, the oldest context starts to drop off.

**Example value:** `128K`

#### Response Time

Indicates how quickly the model generates its output.

**Why it matters:** In a live phone call, response speed is part of the experience. Faster response times improve caller satisfaction and reduce the awkward pauses that make a conversation feel robotic.

**Example value:** `Standard`

#### Model Parameters

Model Parameters control the *character* of the Agent's output — how consistent versus how varied its responses are. Angoor AI provides four preset modes that bundle sensible parameter values, plus the ability to set them manually.

#### Modes

**Creative** — Produces more varied, expressive output.

* *Recommended for:* Content generation, idea generation, brainstorming
* *Not recommended for:* Routing, classification, or anything requiring consistency

**Balanced** — Strikes a middle ground between creativity and consistency.

* *Recommended for:* General-purpose agents and mixed workloads
* *This is the default mode shown in the configuration*

**Precise** — Produces deterministic, predictable output.

* *Recommended for:* Routing, classification, state detection, validation, and most business workflows where the same input should reliably produce the same response

**Custom** — Lets you set the three underlying parameters manually instead of using a preset, for fine-grained control when none of the presets fit.

#### Temperature

**Description:** Controls the randomness of the model's output.

**Why it matters:** Lower values make responses more predictable and consistent; higher values make them more creative and varied. For a support voice agent you generally want this on the lower side so behavior stays reliable.

**Range:** `0` to `1`

**Typical guidance:** Classification and routing ≈ `0.1`; validation ≈ `0.2`; content generation ≈ `0.7`.

#### Top P

**Description:** Controls response diversity by limiting the pool of word choices the model samples from (also called nucleus sampling).

**Why it matters:** Works alongside Temperature to influence how varied the output is. Lower values keep the model focused on the most likely responses; higher values allow more variety.

**Range:** `0` to `1`

**Typical guidance:** For workflow-style behavior, `0.7`–`0.9` is generally recommended.

#### Max Token Limit

**Description:** Sets the maximum length of a single response the model can generate.

**Why it matters:** Most voice-agent turns are short — a sentence or two — so a very high limit is rarely necessary. Keeping it sensible controls cost and prevents the Agent from producing long, rambling replies that feel unnatural on a call.

**Range:** `0` to `32K`

#### 2.11 Building a Production-Ready Agent

A production-ready Agent should include:

* ✓ A clearly defined role
* ✓ Strong behavioral instructions
* ✓ Security restrictions
* ✓ A connected Knowledge Base
* ✓ Relevant variables
* ✓ Conditional prompts
* ✓ Streaming enabled
* ✓ An appropriate model selection

#### 2.12 Agent Design Best Practices

**Keep instructions clear.** Avoid vague prompts. Instead of "Help customers," use "Help customers resolve banking issues related to savings accounts, credit cards, and personal loans."

**Always define restrictions.** Specify what the AI must never do — never ask for passwords or OTPs, never provide medical advice, never disclose internal information.

**Use variables for personalization,** and leverage Knowledge Bases instead of storing frequently changing information directly in prompts.
