Skip to main content

Python SDK for managing and deploying voice agents to Moss platform

Project description

Moss Voice Agent Manager

Python SDK for managing and deploying voice agents using the Moss platform.

Installation

pip install moss-voice-agent-manager

Or install from source:

cd python-sdk
pip install -e .

Quick Start

1. Get Your Credentials

You need three pieces of information:

  1. MOSS_PROJECT_ID - Your project UUID
  2. MOSS_PROJECT_KEY - Your project read key
  3. MOSS_VOICE_AGENT_ID - Voice agent UUID to deploy to

Get these from your Supabase database or Moss dashboard.

2. Simple Deployment

from moss_voice_agent_manager import MossVoiceClient

# Create client
client = MossVoiceClient(
    project_id="your-project-uuid",
    project_key="your-project-read-key"
)

# Deploy agent
response = client.deploy(
    agent_id="my-agent",
    prompt="You are a helpful AI assistant",
    voice_agent_id="voice-agent-uuid"
)

print(f"Deployed to: {response.deployment_url}")

3. Deploy with Custom Tools

def get_weather(city: str) -> str:
    """Get weather for a city."""
    return f"Weather in {city} is sunny"

response = client.deploy(
    agent_id="weather-bot",
    prompt="You are a weather assistant",
    voice_agent_id="voice-agent-uuid",
    function_tools=[get_weather]
)

Environment Variables

Set these for easier testing:

export MOSS_PROJECT_ID="your-project-uuid"
export MOSS_PROJECT_KEY="your-project-read-key"
export MOSS_VOICE_AGENT_ID="voice-agent-uuid"

Examples

See the examples/ directory:

  • simple_deploy.py - Basic deployment
  • deploy_with_custom_tools.py - Deployment with custom Python functions

Run examples:

cd examples
python deploy_with_custom_tools.py

API Reference

MossVoiceClient

client = MossVoiceClient(
    project_id: str,        # Your Moss project ID (required)
    project_key: str,       # Your Moss project key (required)
    timeout: int            # Request timeout in seconds (default: 300)
)

deploy()

response = client.deploy(
    agent_id: str,              # Unique agent identifier (required)
    prompt: str,                # System prompt (required)
    voice_agent_id: str,        # Voice agent UUID (required)
    initial_greeting: str,      # Optional greeting message
    function_tools: List,       # Optional list of Python functions
    tool_refs: List[str],       # Optional importable tool references
    project_name: str           # Optional project name
)

Returns DeploymentResponse:

  • ok: bool - Success flag
  • project_name: str - Project name
  • deployment_url: str - URL to view in dashboard
  • cli_stdout: str - Deployment logs
  • cli_stderr: str - Error logs if any
  • error: str - Error message if failed

Exceptions

  • MossVoiceError - Base exception
  • AuthenticationError - Invalid credentials
  • DeploymentError - Deployment failed
  • VoiceAgentNotFoundError - Voice agent not found
  • ConfigurationError - Invalid configuration

Development

# Install in development mode
pip install -e .

# Run tests
python -m pytest tests/

# Run examples
cd examples
python deploy_with_custom_tools.py

Requirements

  • Python 3.7+
  • No external dependencies (uses standard library)

License

MIT

Support

For issues and questions, visit: https://github.com/your-org/python-sdk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moss_voice_agent_manager-1.0.0b1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moss_voice_agent_manager-1.0.0b1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file moss_voice_agent_manager-1.0.0b1.tar.gz.

File metadata

File hashes

Hashes for moss_voice_agent_manager-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 4c0e4741cff045770d499290f98abfabcddcb4459392e1c9c8ce5868b00b47a3
MD5 ae5aad8e85a57b3c0d8b674249c86630
BLAKE2b-256 7afb729f8fe7a107664dc548376956428a1e157d591ddc0e9f2b81cf529d822d

See more details on using hashes here.

File details

Details for the file moss_voice_agent_manager-1.0.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for moss_voice_agent_manager-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 c092cca6771052544694f0f8114b0eb65c8e77e32847739a50e5dc55f11b4a94
MD5 b0dcb8c2e1f86400675d750c7425b9cc
BLAKE2b-256 99b53e70c921f481abc3a816472759b45c7d7ef56b107b5e8d0706cf7501fed5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page