dzei2234
12/04/2025, 6:25 AMAI Evy
12/04/2025, 6:26 AMAI Evy
12/04/2025, 6:26 AMtranscript - The full transcription of the chat conversation
- chat_analysis - Post-chat analysis containing the chat summary, user sentiment, and success status (available after the chat ends)
Here's how to use it:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(chatResponse.agent_id) ;
The response will include fields like:
- transcript - Full conversation text
- chat_analysis.chat_summary - AI-generated summary of the conversation
- chat_analysis.user_sentiment - Sentiment analysis (e.g., "Positive")
- chat_analysis.chat_successful - Boolean indicating if the chat was successful
You can also subscribe to the chat_analyzed webhook event to receive this data automatically once the analysis is ready. [(1) ]() [(8) ]()dzei2234
12/04/2025, 6:27 AMAI Evy
12/04/2025, 6:27 AMAI Evy
12/04/2025, 6:27 AMwebhook_url parameter to specify where Retell AI should send webhook events:
javascript
const chatAgentResponse = await client.chatAgent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
webhook_url: "<https://webhook-url-here%22,>
webhook_timeout_ms: 10000
}) ;
[(1) ]()
The webhook will receive events including the chat.analyzed event, which contains the transcript and post-chat analysis data (summary, sentiment, success status) once the analysis is complete. [(1) ]() [(2) ]()
You can also configure post_chat_analysis_data to define custom analysis fields you want extracted from each conversation. [(1) ]() [(4) ]() [(2) ]()dzei2234
12/04/2025, 6:53 AMAI Evy
12/04/2025, 6:53 AMAI Evy
12/04/2025, 6:53 AM[Product Name](URL) format, which may render better in the widget
2. Request JSON formatting - Prompt the agent to structure responses with URLs as distinct fields that won't break across lines
3. Use URL shorteners - As a workaround, you could integrate a URL shortening service through a custom function to generate shorter links
I'd also recommend reaching out through the support channels for widget-specific rendering issues:
- [Contact Sales]()
- [GitHub]()
Would you like me to provide a general approach for handling long URLs in chat interfaces based on common practices?
**AI Evy
12/04/2025, 6:55 AMdzei2234
12/04/2025, 6:55 AMAI Evy
12/04/2025, 6:55 AM[View Product](<https://your-very-long-product-url.com/path/to/product>)
2. URL Shortening Service
Integrate a URL shortener (like Bitly API) through a custom function to generate compact links before presenting them to users.
3. Return Structured Data
Have your agent return URLs in a structured format (like JSON) that your frontend can parse and render properly without line breaks:
json
{
"product_name": "Product XYZ",
"url": "<https://complete-url-without-breaks.com%22>
}
4. Custom Frontend Handling
If you're embedding the chat widget, you could potentially intercept the response and apply custom CSS to prevent URL wrapping (white-space: nowrap or word-break: keep-all) .
Since this is a widget rendering issue rather than an agent configuration issue, I recommend contacting Retell support for widget-specific solutions:
- [Contact Sales]()
- [GitHub]()AI Evy
12/04/2025, 7:26 AMAI Evy
12/04/2025, 7:26 AMAI Evy
12/04/2025, 7:27 AMAI Evy
12/04/2025, 7:27 AMAI Evy
12/04/2025, 7:50 AMAI Evy
12/04/2025, 7:50 AMAI Evy
12/04/2025, 7:50 AMAI Evy
12/04/2025, 7:51 AMdzei2234
12/04/2025, 12:40 PMAI Evy
12/04/2025, 12:40 PMAI Evy
12/04/2025, 12:41 PMAI Evy
12/04/2025, 12:41 PMAI Evy
12/04/2025, 12:41 PM