https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'd like to understand if it's possible to program...
# ❓・ai-evy-support
d
@AI Evy I'd like to understand if it's possible to programmatically subscribe to live phone call conversations and provide custom tooling during calls. Specific Questions: 1. Can I access real-time transcripts or audio streams while a call is in progress? 2. Is there a WebSocket or API endpoint that provides live conversation updates? 3. Can I inject custom tools/functions that the agent can call during the conversation based on what's being discussed? 4. What's the latency for receiving live transcript updates? 5. What's the best approach for real-time call monitoring and custom tooling integration? Use Case: I want to listen to conversations in real-time and dynamically provide custom tools from my codebase - for example, if a customer mentions specific information, I want to fetch relevant data from my database and make it available to the agent.
a
Thanks for tagging me @danielgarcia_85844. I'll look through relevant sources and get back to you shortly.
### Answer Yes, Retell AI provides comprehensive real-time call monitoring and custom tooling capabilities through its LLM WebSocket interface. Here's how to address each of your requirements: ## 1. Real-time Transcript Access You can access real-time transcripts through the LLM WebSocket connection [(1) ]() . Retell sends
update_only
events that contain complete live transcripts collected during the call . The transcript is presented as a list of utterances with detailed information . ## 2. WebSocket API for Live Updates The LLM WebSocket endpoint is:
{your-server-websocket-endpoint}/{call_id}
. This WebSocket provides several event types : - `update_only`: Real-time transcript and turntaking updates - `response_required`: When the agent needs a response - `reminder_required`: When a reminder is needed ## 3. Custom Tool Injection Retell AI supports both pre-defined and custom tools that can be called during conversations [(2) ]() . You can implement custom tools with user-defined functions, custom signatures, and configurable speech behavior . These tools allow calling external APIs, executing specific functions in your system, and managing call flow operations . The LLM intelligently decides when to call these functions by outputting structured JSON objects containing the necessary arguments . ## 4. Latency Information Retell AI typically achieves sub-800ms end-to-end latency [(3) ]() . The platform measures latency in milliseconds and considers anything longer than 300-500 milliseconds as potentially disruptive to natural conversation flow . ## 5. Best Approach for Real-time Monitoring For real-time call monitoring, you can use the Custom LLM integration with WebSocket [(1) ](http
s://docs.retellai.com/api-references/llm-websocket) . The WebSocket provides: - Live transcript updates through
update_only
events - Turn-taking information to know when speakers change - Tool call invocation and result tracking For your specific use case of dynamically providing tools based on conversation content, you can: 1. Monitor the real-time transcript through WebSocket updates 2. Analyze the conversation content in your backend 3. Use custom functions to fetch relevant data from your database [(2) ]() 4. Return structured responses that the agent can use [(1) ]() The system supports streaming responses for lower latency and allows you to send multiple events to stream back responses .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[3] Latency](https://www.retellai.com/glossary/latency) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy is this still relevant LLM WebSocket
a
Thanks for the follow-up, @danielgarcia_85844. I'll get back to you soon.
### Answer Yes, the LLM WebSocket is still relevant and actively supported by Retell AI [(1) ]() . The LLM WebSocket provides the primary interface for integrating custom LLMs with Retell AI's voice agents . It enables real-time communication between your server and Retell's system, allowing you to: - Receive live transcript updates through
update_only
events - Respond to
response_required
and
reminder_required
events - Send custom responses and control call flow - Implement tool calling and function execution The WebSocket endpoint format is:
{your-server-websocket-endpoint}/{call_id}
Retell provides comprehensive documentation and example repositories for setting up WebSocket servers [(2) ]() [(3) ]() [(4) ]() , including Node.js and Python implementations. The platform continues to maintain and update this functionality as a core feature for custom LLM integration. The Discord discussions also confirm ongoing usage, with developers actively deploying WebSocket-based solutions and seeking best practices for scaling concurrent calls [(5) ]() .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Setup WebSocket Server](https://docs.retellai.com/integrate-llm/setup-websocket-server) [[3] Custom LLM Overview](https://docs.retellai.com/integrate-llm/overview) [[4] Integrate LLM](https://docs.retellai.com/integrate-llm/integrate-llm) [[5] Best recommended practices in deploying LLM websocket](https://discord.com/channels/1186424376300679209/1218169831522697276) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.