Agent WebSocket

View as Markdown
A bidirectional session with an Atoms agent. Open the connection with your API key and an `agent_id`; the server creates a session, bridges audio and transcripts to the STT/LLM/TTS pipeline, and streams events back until the client closes or the server ends the session. Post-call, the full conversation (transcript + recording) is available at `GET /atoms/v1/conversation/{callId}` using the `call_id` from `session.created`.

Handshake

WSS
wss://api.smallest.ai/atoms/v1/agent/connect

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Send

sendInputAudioAppendobjectRequired
OR
sendInputAudioCommitobjectRequired
OR
sendInputTextobjectRequired
OR
sendSessionUpdateobjectRequired
OR
sendSessionCloseobjectRequired

Receive

receiveSessionCreatedobjectRequired
OR
receiveSessionClosedobjectRequired
OR
receiveOutputAudioDeltaobjectRequired
OR
receiveTranscriptobjectRequired
OR
receiveAgentStartTalkingobjectRequired
OR
receiveAgentStopTalkingobjectRequired
OR
receiveInterruptionobjectRequired
OR
receiveErrorobjectRequired