Skip to main content
Moss provides three layers for building voice agents: an Agent SDK (Python) for agent logic, a Backend SDK (Node.js or Python) that your web app uses to mint session tokens, and an Agent CLI for deployment.

Agent SDK

moss-voice-agent-manager: Python package for building voice agents. Handles STT, LLM, and TTS provider configuration automatically.

Basic Agent

Multi-Agent Transfers

Define multiple agents and transfer between them using function tools:

TTS Customization

Override platform TTS defaults per session:

Key Exports

Session Transcripts

Store session transcripts so they can be downloaded later via moss-agent transcripts download. Call submit_session_report in a shutdown callback to capture the transcript when a session ends. Requires moss-voice-agent-manager>=1.0.0b14.

Backend SDK

Your frontend should never hold LiveKit API secrets. Mint short-lived participant tokens from your backend and return them to the browser. Pick the package that matches your server stack.
@moss-tools/voice-server: Use in Next.js, Express, or any Node.js server.

Next.js API Route

API Reference


Agent CLI

moss-agent-cli: Deploy and manage voice agents from the command line.

Deploy

The CLI validates your agent, fetches deployment credentials, and builds and deploys it. Your local .env file is intentionally excluded from the deployment package. Use moss-agent env push (below) to make those values available to the running agent.

Push Env Vars

Requires moss-agent-cli>=0.4.0. Upload runtime environment variables to the deployed agent:
Pushing restarts the running agent. Run this after every moss-agent deploy, after rotating provider keys, or whenever you change runtime configuration. Pass --no-overwrite to fail-fast on any pre-existing keys instead of replacing them.

Stream Logs

Transcripts

Requires moss-agent-cli>=0.3.0. List recent voice agent sessions:
Download session transcripts:

Agent Directory Structure


Environment Variables

All three packages use the same credentials:

Requirements

  • Agent SDK / CLI: Python 3.10+
  • Backend SDK: Node.js 18+ (@moss-tools/voice-server) or Python 3.10+ (moss-voice-server)