नेविगेशन पर जाएँ

Agent WebSockets

Establish a WebSocket connection for real-time conversations with an AI agent.

हैंडशेक

WSS
/v1/convai/conversation

क्वेरी पैरामीटर

agent_idstringआवश्यक
The unique identifier of the agent to converse with.

भेजें

User Audio Chunkobjectआवश्यक
Send audio data chunks from the user to the server for processing.
OR
Feedbackobjectआवश्यक
Feedback score for a specific agent response event.
OR
User Messageobjectआवश्यक
Text message sent by the user to the conversation.
OR
User Activityobjectआवश्यक
Activity ping to prevent agent interruption and indicate user presence.
OR
Multimodal Messageobjectआवश्यक
A message combining text and file references, sent by the user to the conversation.
OR
Pongobjectआवश्यक
Response message to server ping requests for latency measurement.
OR
Client Tool Resultobjectआवश्यक

Results from client-side tool execution requested by the server.

OR
Mcp Tool Approval Resultobjectआवश्यक
User approval or rejection of an MCP tool call that requires confirmation.
OR
Contextual Updateobjectआवश्यक

Non-interrupting content sent to update the conversation state without disrupting the flow.

OR
Conversation Initiation Client Dataobjectआवश्यक
Client configuration data to override default conversation settings.

प्राप्त करें

Conversation Initiation Metadataobjectआवश्यक
Initial metadata and configuration details for a new conversation, only sent once.
OR
Agent Response Completeobjectआवश्यक
Notification that the agent has finished generating a complete response.
OR
Context Usageobjectआवश्यक

Current LLM context-window usage, emitted after each completed agent turn. Reports the prompt size of the turn’s final LLM generation together with the model’s context limit.

OR
Mcp Tool Callobjectआवश्यक

MCP tool call event with state updates (loading, awaiting_approval, success, failure).

OR
Client Errorobjectआवश्यक
Error event sent when an error occurs during the conversation.
OR
Guardrail Triggeredobjectआवश्यक
Notification that a guardrail was triggered during the conversation.
OR
User Transcriptobjectआवश्यक

Real-time transcriptions of user speech input.

OR
Agent Responseobjectआवश्यक
Text responses generated by the AI agent.
OR
Queue Statusobjectआवश्यक

Wait-queue status for a caller held at the concurrency limit: waiting, admitted, or timed_out.

OR
Agent Response Correctionobjectआवश्यक
Correction to a previous agent response.
OR
Agent Response Metadataobjectआवश्यक
Metadata associated with an agent response, such as custom LLM response metadata.
OR
Audio Responseobjectआवश्यक
Synthesized audio chunks of the agent's speech response.
OR
Interruptionobjectआवश्यक
Notification that the agent's current response was interrupted.
OR
VAD Scoreobjectआवश्यक
Voice Activity Detection scoring information.
OR
Agent Chat Response Partobjectआवश्यक
Streaming text chunks of an agent's chat response.
OR
Client Tool Callobjectआवश्यक
Requests from server for client to execute specific tool functions.
OR
Agent Tool Responseobjectआवश्यक
Response from an agent tool execution including status and metadata.
OR
Agent Tool Response Full Payloadobjectआवश्यक
Tool response including the tool's full result payload as a string.
OR
Agent Tool Requestobjectआवश्यक
Notification that the agent is requesting a tool to be executed.
OR
Pingobjectआवश्यक

Server-initiated ping messages for measuring connection latency.

OR
Mcp Connection Statusobjectआवश्यक
MCP connection status update with integration connection states.