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

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(
    voice_agent_id="voice-agent-uuid",
    prompt="You are a helpful AI assistant"
)

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(
    voice_agent_id="voice-agent-uuid",
    prompt="You are a weather assistant",
    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"

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(
    voice_agent_id: str,        # Voice agent UUID (required)
    prompt: str,                # System prompt (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

Requirements

  • Python 3.9+
  • 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.0b3.tar.gz (10.7 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.0b3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for moss_voice_agent_manager-1.0.0b3.tar.gz
Algorithm Hash digest
SHA256 19606ea99cbc8fb01a9bd312642581a454038c5ebf385f6afa25c4cccf872cf9
MD5 8b1194a35f78f72f142aba2077980675
BLAKE2b-256 8bd933277bff4f3c6b0a57e1905ae1ec5cff4d4205a62569b2a99e4c655fdd4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for moss_voice_agent_manager-1.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 7deeb2bda5098544bc01316955854e36602abe62561fb4059333cdaae57aced9
MD5 04838a0987b9e3f08cc0c69d36c7ea80
BLAKE2b-256 f62f8a1136219b8809889b7e5a01b953c4048567ae33e2fa0bf7a618ff1d1180

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