attach() call in your
agent, and a per-modality cost row on screen for a real call.
This is the agent layer. The SFU and SIP layers have different prerequisites and are
covered in what you can profile.
Before you start
- Python 3.11 or later
- API keys for one STT, one LLM, and one TTS provider
- LiveKit only: a LiveKit project. The agent worker cannot start without one, and there is no way around this. A free LiveKit Cloud project or a local
livekit-server --devboth work.
1
Install
Install the extra for your framework, then the provider plugins your agent
uses. VoiceGateway bundles no provider wheels; it meters the native instances
you already construct.The Installation has the full extras table, Docker, and source
builds.
- LiveKit
- Pipecat
dashboard extra pulls FastAPI and uvicorn, which voicegw serve needs in
step 4.The
livekit extra is in the Pipecat command on purpose. The voicegw CLI
imports its LiveKit diagnostics at startup, so every subcommand needs that
extra even on a Pipecat-only deployment. Your agent still imports no LiveKit
code. See what you can profile.2
Set your environment variables
- LiveKit
- Pipecat
livekit-server --dev locally instead? Use
LIVEKIT_URL=ws://localhost:7880, LIVEKIT_API_KEY=devkey,
LIVEKIT_API_SECRET=secret.3
Add attach() to your agent
One call, placed before the session or pipeline starts. Every native provider
stays exactly as it is.
- LiveKit
- Pipecat
4
Start the daemon
In a second terminal:
voicegw init writes a minimal config with cost_tracking already enabled,
pointing at the same default database attach() writes to. That is what
connects your agent to the dashboard with no further wiring.Open http://localhost:8080 in a browser. The Costs page is empty until the
first call completes. Leave it open.voicegw dashboard does not start anything. It reads serve.host and
serve.port from your config and opens a browser at that address, so it is
a convenience once the daemon is already running. Add --no-open to print
the URL instead, which is what you want over SSH.5
Run the agent and place a call
- LiveKit
- Pipecat
6
Read the cost rows
Refresh the dashboard and open the Costs page. It aggregates by model:
For one row per request, use the terminal:
Nothing showed up?
More cases in Troubleshooting.