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

# AI Agents Overview

Agents are the autonomous workers that power your agentic apps.

***

An agent is a specialized AI entity with:

* A defined **scope** of responsibilities
* **Instructions** that guide behavior
* Access to **tools** for taking actions
* Connected **knowledge** for context

The orchestrator routes user requests to the most appropriate agent based on their descriptions and capabilities.

***

## Quick Example

```yaml theme={null}
# Agent Definition
name: Support Agent
description: Handles customer support inquiries for order and product issues

model: gpt-4o
context_window: 50

scope: |
  - Order status inquiries
  - Product information
  - Return and refund requests
  - General support questions

instructions: |
  You are a helpful customer support agent.

  Guidelines:
  - Be concise and friendly
  - Always verify order numbers before providing details
  - Offer alternatives when items are unavailable
  - Escalate billing disputes to the billing team

tools:
  - get_order_status
  - search_products
  - initiate_return

knowledge:
  - product_catalog
  - support_faqs
```

***

## Agent Lifecycle

```mermaid actions={false} theme={null}
flowchart LR
    Create --> Configure --> Test
    Test --> Validate
    Validate --> Deploy --> Monitor
```

| Step             | Description                                                         |
| ---------------- | ------------------------------------------------------------------- |
| 1. **Create**    | Define the agent's identity, scope, and purpose.                    |
| 2. **Configure** | Add instructions, connect tools, and link knowledge sources.        |
| 3. **Test**      | Validate behavior with test conversations and edge cases.           |
| 4. **Validate**  | Run diagnostics to ensure all dependencies are properly configured. |
| 5. **Deploy**    | Publish the agent as part of your agentic app.                      |
| 6. **Monitor**   | Track performance, review conversations, and iterate.               |

## Example: Agent Types by Use Case

### Customer Service Agents

Handle inquiries, process requests, and resolve issues.

```yaml theme={null}
scope: Order tracking, returns, product questions
tools: CRM lookup, order management, ticketing
knowledge: FAQs, product docs, policies
```

### Sales Agents

Qualify leads, answer questions, and guide purchases.

```yaml theme={null}
scope: Product recommendations, pricing, checkout assistance
tools: Product search, cart management, payment processing
knowledge: Product catalog, pricing, promotions
```

### HR/Employee Agents

Support internal employees with HR and IT tasks.

```yaml theme={null}
scope: Leave requests, benefits, IT support
tools: HR systems, ticket creation, knowledge search
knowledge: HR policies, IT guides, company wiki
```

### Process Agents

Execute business workflows and automate tasks.

```yaml theme={null}
scope: Document processing, approvals, data entry
tools: Document extraction, workflow triggers, database updates
knowledge: Process documentation, compliance rules
```

***

## Key Concepts

### Agent Selection

The orchestrator selects agents based on:

1. **Description matching**: How well the agent's description matches user intent.
2. **Scope alignment**: Whether the task falls within the agent's defined scope.
3. **Tool availability**: Whether the agent has tools needed for the task.

Write clear, specific descriptions to improve selection accuracy.

### Agent Handoffs

Agents can transfer control to other agents when:

* The task falls outside their scope.
* A specialized agent is better suited.
* The user explicitly requests a different capability.

Handoffs preserve conversation context so users don't need to repeat information.

### Stateless Execution

Each agent interaction is stateless by default. Agents receive:

* The conversation history (within context window).
* Session information.
* User profile data (if configured).
* Tool and knowledge access.

They do not retain memory between conversations unless explicitly designed to do so using memory stores.

***
