Quick Start Guide
Get started with Voxin in minutes. This guide will help you create your first AI agent with voice capabilities and platform integration.
Prerequisites
- ✓ Python 3.8 or higher
- ✓ Voxin package installed (
pip install voxin
) - ✓ API key from your Voxin dashboard
Create Your First Agent
Start by creating a basic agent with voice capabilities:
quickstart.py
12345678910111213141516171819202122
from voxin import Agent, VoiceConfig# Initialize a basic agentagent = Agent( name="Quick Start Agent", description="A simple demonstration agent")# Add voice capabilitiesagent.add_voice(VoiceConfig( voice_id="clara-v1", language="en-US"))# Define message handler@agent.on_messageasync def handle_message(message): response = await agent.generate_response(message) # Respond with both text and voice await agent.send_message(response) await agent.speak(response)
Add Platform Integration
Connect your agent to social platforms:
platform_integration.py
12345678910
# Add social platform integrationfrom voxin.platforms import DiscordConnectordiscord = DiscordConnector(token"your_bot_token")agent.add_platform(discord)# The agent will now respond to Discord messages@agent.on_platform_message("discord")async def handle_discord(message): await agent.respond_to_platform(message)
Add Custom Behaviors
Customize your agent's responses:
custom_behavior.py
1234567891011
# Add a simple custom behavior@agent.on_keyword("hello")async def handle_greeting(message): await agent.speak("Hello! How can I help you today?")@agent.on_intent("help")async def handle_help(message): await agent.send_message( "I can help you with various tasks. " "Just let me know what you need!" )