What you'll run
- relay (TypeScript): pairing, messages, call state, push and LiveKit tokens. Runs on your server behind Caddy.
- LiveKit: the call audio, self-hosted in the same compose file.
- daemon (Python): the
agentringCLI, the MCP server and the voice AI. Runs next to your agents; behind NAT is fine, it only opens outbound connections. - Android app (Kotlin): QR pairing, the native call screen and messages.
your agent ──MCP/CLI──▶ daemon ──WSS (outbound only)──▶ relay ──FCM push──▶ Android app
▲ │ (your server) │
└── agents.yaml ◀── voice AI (realtime) ◀──────── LiveKit (call audio) ───────┘What you need
- Somewhere to run the relay: a Linux server with Docker and a domain name, or your own computer with Docker (the phone on the same Wi-Fi, or anywhere over Tailscale).
- A free Firebase project, which is what makes a locked phone ring (guide).
- A key for the voice AI: Gemini (free tier), OpenAI, xAI (Grok) or Phonic.
- An Android phone (8 or newer).
1. Start the relay
Clone the repo and bring up the relay with LiveKit:
git clone https://github.com/mutonby/agentring.git && cd agentring# On a server with a domain (ports 80, 443, UDP 50000-50100 and TCP 7881 open)
cd deploy && cp .env.example .env && $EDITOR .env
docker compose up -d --build
docker compose logs relay | grep -A2 "API key"Or, without a server, on your own computer:
# On your own computer, at its LAN or Tailscale IP
cd deploy && cp .env.local.example .env.local && $EDITOR .env.local
docker compose -f docker-compose.local.yml --env-file .env.local up -d --buildOn first start, the relay generates an API key (ak_…) and prints it in the log.
2. Install the daemon and pair the phone
On the computer where your agent runs. Install the app from Google Play (or the APK from GitHub Releases) and scan the QR code that agentring pair shows:
uv tool install './daemon[voice]'
agentring init --relay https://relay.example.com --api-key ak_...
agentring pair # scan the QR code with the app
agentring msg "hello" # the phone gets a notification
echo GEMINI_API_KEY=... >> ~/.agentring/.env # or OPENAI_API_KEY / XAI_API_KEY / PHONIC_API_KEY
agentring call "Testing agentring" --ai # + --provider openai|grok|phonic3. Connect your agent
With Claude Code it's one line; for the others, see each agent's guide:
claude mcp add agentring -- agentring mcpCodex · opencode · OpenClaw · Hermes · n8n & scripts
Pick the voice AI
| Voice AI | --provider | Key |
|---|---|---|
| Gemini Live (default, free tier) | gemini | GEMINI_API_KEY |
| OpenAI Realtime | openai | OPENAI_API_KEY |
| Grok Voice (xAI) | grok | XAI_API_KEY |
| Phonic | phonic | PHONIC_API_KEY |
Set AGENTRING_VOICE_PROVIDER in ~/.agentring/.env to use one for every call, from the CLI and from MCP. We compared their latency in this post.
Privacy when you self-host
Everything runs on your own servers and accounts. Messages and call metadata are stored on your relay. Pushes go through your own Firebase project; they are signed, not encrypted, so Google's FCM can read pushed text. Call audio goes through your LiveKit server and, with the voice AI, to the provider you chose; on Google's free tier, Google may use that data to improve its products.
Limitations: Android only for now, one user per relay, and the voice AI needs a cloud realtime model (local ones plug in through RealtimeBackend). If the phone doesn't ring when locked, it's usually the vendor's battery saver: per-vendor guide.
FAQ
How much does self-hosting cost?
The software is free (Apache-2.0). You pay, if anything, for your server and for voice AI usage with your provider; Gemini Live has a free tier. Firebase Cloud Messaging is free.
Do I need a domain and a public server?
Not necessarily. You can run the relay on your own computer with Docker and reach it from the phone on the same Wi-Fi, or from anywhere over Tailscale. With a server and a domain, the phone finds it from any network.
Why do I need Firebase?
To make a locked phone ring. Android only wakes apps with high-priority pushes, and those go through Firebase Cloud Messaging. You create a free project and the relay uses its config; the app receives it when it pairs, so the same APK works for everyone. Steps in docs/firebase.md.
Can I move from agentring cloud to my own server later?
Yes. It's the same software: run your relay, pair your phone with it and change your agent's MCP URL. You can delete your cloud account whenever you like.