Custom Agents
Custom agents give you full control over the voice pipeline. Write Python code, use any library, define custom tools, and deploy as isolated Docker containers — all from the dashboard.Preview Feature — Custom agents are currently in preview. The core functionality (code editor, AI assistant, Docker deployment, preview) is stable, but some features may evolve as we gather feedback.
Custom agents require a self-hosted deployment. They are not available on Railway or Render.
How It Works
- Create a custom agent from the dashboard
- Write code in the built-in editor or let the AI assistant generate it
- Build the Docker image from your code
- Deploy as a persistent worker or Preview for testing
Creating a Custom Agent
- Go to Dashboard → Agents → Create Agent
- Select Custom mode
- The agent is scaffolded with default files:
AI Coding Assistant
Every custom agent includes an AI coding assistant powered by Gemini. Instead of writing code manually, describe what you want in plain English: Example prompts:Create a voice agent that can search the web using Tavily to answer questions about current events, news, or facts. Always use the Tavily days parameter set to 7 so results are only from the last week. Keep responses conversational.
Add a tool that checks order status by calling our REST API at https://api.example.com/orders
Switch the STT provider to Deepgram and add sentiment analysisThe assistant will:
- Generate all file changes
- Detect when API keys are needed and show a secure input form
- Pick an appropriate voice for the agent
- Follow LiveKit Agents SDK best practices
Environment Variables
Custom agents can use third-party API keys securely:- Platform keys (LiveKit, Google, Resemble, STT) are injected automatically from your dashboard Settings
- Custom keys (e.g., Tavily, Stripe, your own APIs) are added per-agent via the Environment Variables tab or through the AI assistant
Preview vs Deploy
| Preview | Deploy | |
|---|---|---|
| Purpose | Test in browser | Production calls |
| Container | Temporary, connects to one room | Persistent worker |
| Telephony | Browser-only (WebRTC) | Inbound + outbound phone calls |
| Lifecycle | Stops when you close preview | Runs until stopped, auto-restarts |
Preview
Click Preview to start a browser-based voice session. A temporary container spins up, connects to a LiveKit room, and you can talk to your agent immediately. The container is removed when the preview ends.Deploy
Click Deploy to start a persistent worker container. The worker:- Registers with LiveKit as
arkenos-custom-{agent_id} - Accepts dispatched calls (inbound SIP and outbound)
- Runs with
restart: unless-stopped(auto-recovery) - Can be stopped from the dashboard
Writing Tools
Tools let your agent perform actions during a conversation:Speak-while-executing
For slow tools, say a filler phrase so the caller isn’t left in silence:File Versioning
Every file edit is versioned. You can:- View version history for any file
- Roll back to a previous version
- See what changed between versions
Build and Image Caching
When you build a custom agent:- All files are downloaded from MinIO
- A Docker image is built on top of
arkenos-agent-base:latest - The image is tagged with a hash of
requirements.txt - If requirements haven’t changed, the cached image is reused
Pre-Installed Libraries
Available without adding torequirements.txt:
| Category | Libraries |
|---|---|
| LiveKit | livekit-agents, all plugins (assemblyai, deepgram, google, silero, elevenlabs, resemble) |
| HTTP | httpx, aiohttp |
| Data | pydantic, numpy, pandas |
| Logging | usage_logger (cost tracking) |