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
| Export | Description |
|---|---|
MossAgentSession | Agent session with auto-configured providers |
Agent | Base class for agent behavior and instructions |
RunContext | Context passed to tool functions |
llm.function_tool | Decorator for agent tools |
SessionOptions / TTSOptions | TTS override options |
MossConfig | Platform configuration |
WorkerOptions / cli | Worker lifecycle management |
Session Transcripts
Store session transcripts so they can be downloaded later viamoss-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.
Frontend SDK
@moss-tools/voice-server: Node.js package for generating session tokens from your backend. Use this in your Next.js, Express, or any server-side app.
Next.js API Route
API Reference
| Method | Description |
|---|---|
MossVoiceServer.create(config) | Initialize with Moss credentials. Caches credentials. |
server.createParticipantToken(userInfo, roomName, agentName?) | Generate a signed JWT (15-min TTL) for a participant. |
server.getServerUrl() | Returns the WebSocket URL for client connections. |
server.getAgentName() | Returns the configured agent name. |
Agent CLI
moss-agent-cli: Deploy and manage voice agents from the command line.
Deploy
Stream Logs
Transcripts
Requiresmoss-agent-cli>=0.3.0.
List recent voice agent sessions:
Agent Directory Structure
Environment Variables
All three packages use the same credentials:| Variable | Description |
|---|---|
MOSS_PROJECT_ID | Your Moss project ID |
MOSS_PROJECT_KEY | Your Moss project API key |
MOSS_VOICE_AGENT_ID | The voice agent ID |
Requirements
- Agent SDK / CLI: Python 3.10+
- Frontend SDK: Node.js 18+