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

# Agent Configuration

> Create and configure voice agents with custom prompts, voices, and tools.

# Agent Configuration

Agents are the core of Nenyax. Each agent defines a voice persona with its own system prompt, voice, STT provider, functions, and webhooks.

## Agent Modes

Nenyax supports two agent modes:

### Standard Agents

Dashboard-configured agents that use the shared voice engine. No code required — configure everything through the UI:

* System prompt and greeting message
* STT provider selection
* Voice selection (Resemble AI)
* Function calling definitions
* Pre/post-call webhooks

### Custom Agents *(Preview)*

Write your own Python agent code for full control over the voice pipeline. Custom agents:

* Have a built-in code editor in the dashboard
* Include an AI coding assistant (powered by Gemini) to help write and edit code
* Are built into Docker containers and deployed automatically
* Track file versions for rollback
* Can use any libraries or custom logic beyond what standard agents offer

## Creating an Agent

Navigate to **Dashboard → Agents → Create Agent** or use the API:

```bash theme={null}
curl -X POST http://localhost:8000/api/agents/ \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support",
    "type": "PIPELINE",
    "user_id": "your-user-id",
    "config": {
      "system_prompt": "You are a friendly customer support agent for Acme Corp...",
      "first_message": "Hello! Welcome to Acme Corp. How can I help you today?",
      "stt_provider": "assemblyai",
      "voice_id": "resemble-voice-uuid"
    }
  }'
```

## Configuration Options

| Field                | Type   | Description                                                                       |
| -------------------- | ------ | --------------------------------------------------------------------------------- |
| `system_prompt`      | String | Instructions for the LLM defining agent behavior                                  |
| `first_message`      | String | Greeting the agent speaks when the call starts                                    |
| `stt_provider`       | String | `assemblyai`, `elevenlabs`, or `deepgram`                                         |
| `voice_id`           | String | Resemble AI voice UUID                                                            |
| `functions`          | Array  | Function calling definitions (see [Function Calling](/features/function-calling)) |
| `webhooks.pre_call`  | String | URL called before the voice session starts                                        |
| `webhooks.post_call` | String | URL called after the session ends                                                 |

## STT Provider Selection

Each agent can use a different speech-to-text provider:

| Provider                 | Best For                        |
| ------------------------ | ------------------------------- |
| **AssemblyAI** (default) | High accuracy, general purpose  |
| **ElevenLabs**           | Low latency streaming           |
| **Deepgram**             | Real-time streaming, enterprise |

Set the provider in the agent config and ensure the corresponding API key is configured at **API Keys** in the dashboard.

## Voice Selection

Voices are pulled from your Resemble AI account. Browse available voices at **Dashboard → Agents → \[Agent] → Voice** or via the API:

```bash theme={null}
curl http://localhost:8000/api/resemble/voices?page=1&page_size=10
```

## Testing

Use the **Preview** button on any agent to start a browser-based voice session without a phone call. This connects directly via LiveKit WebRTC — no phone number or Twilio setup needed.
