MeshAgent Rooms can be used to host voice agents. The VoiceBot class in the meshagent-livekit package connects a Livekit based voice agent to the room. From
within the studio, the agent will show up in the messaging pane.Within a Flutter app the VoiceAgentCaller widget be used to start a Voice agent session.
meshagent service test --room my-room --name "voice" --image docker.io/meshagent/sample-voice:0.0.31 --env="MESHAGENT_PORT=8090" --port "num=8090 type=meshagent.callable liveness=/ path=/agent participant_name=voice"
Here is the voice service code if you want to create your own app:
Copy
Ask AI
from meshagent.livekit.agents.voice import VoiceBotfrom meshagent.api.services import ServiceHostimport asyncioservice = ServiceHost()@service.path("/agent")class SampleVoiceAgent(VoiceBot): def __init__(self): super().__init__( name="meshagent.livekit.agent", title="sample voice agent", description="sample agent that will respond to a query via voice", labels=["voice"], auto_greet_prompt="hello", rules=["You are a helpful assistant communicating through voice."], )asyncio.run(service.run())