WebSocket sessions can run in a text-only modality — a typed chat with no voice and no avatar. This lets you use the Omniagent as a standard text chatbot without any audio streaming or video rendering.
How to start a text-only session
Set modality to "text" when creating a WebSocket connection:
curl -X POST https://companion-api.napster.com/public/agents/{agentId}/connections \
-H "X-Api-Key: $NAPSTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channelType": "websocket",
"modality": "text"
}'The user's typed messages go in and the agent's text replies come back over the same WebSocket connection — no audio streaming, no avatar.
How it works
- modality accepts
"audio"(default) or"text". - Text-only is a WebSocket modality, not a separate channel. You still use
channelType: "websocket". - The same agent configuration (knowledge, tools, FAQs, memory) applies — only the interaction mode changes.
- Text sessions are recorded as sessions with
modality: "text"and full conversation transcripts are available via the Sessions API.
When to use text-only
- Building a chatbot widget where voice is not needed or not permitted.
- Server-side integrations where you want to send queries and receive text responses programmatically.
- Accessibility scenarios where text is preferred over voice.
- Testing agent responses without audio infrastructure.
Note: WebRTC is for audio and video sessions. Text-only chatbots should use WebSocket with modality: "text".