#Does anyone know how the chat output can be structured?Right now everything is returned as one con
1 messages · Page 1 of 1 (latest)
AI-generated Answer for philipp_42462
Short answer: yes—render the agent’s text as Markdown in your UI.
- In Chat Mode, agent replies are delivered as text via the agent_response event/callback; formatting is up to your client. (elevenlabs.io)
- To display headings, lists, code blocks, etc., use the ElevenLabs UI “Response” component, which is a streaming Markdown renderer (built on Streamdown) and “supports full markdown syntax including code blocks, lists, tables, and more.” (ui.elevenlabs.io)
- You can also steer the LLM to produce well-structured Markdown by specifying formatting expectations in the agent’s system prompt; the Prompting Guide recommends using Markdown headings and bulleted lists in instructions. (elevenlabs.io)
Practical recipe:
- Enable Chat Mode and handle agent_response to capture the text message. (elevenlabs.io)
- Render that text with the UI Response component so Markdown is parsed and displayed as headings and lists. (ui.elevenlabs.io)
References:
- Chat Mode (text-only agents and agent_response handling): https://elevenlabs.io/docs/eleven-agents/guides/chat-mode (elevenlabs.io)
- Response component (streaming Markdown renderer): https://ui.elevenlabs.io/docs/components/response (ui.elevenlabs.io)
- Prompting Guide (formatting best practices with Markdown): https://elevenlabs.io/docs/eleven-agents/best-practices/prompting-guide (elevenlabs.io)
Sources:
Chat Mode | ElevenLabs Documentation
Response | ElevenLabs UI
Prompting guide | ElevenLabs Documentation
Chat Mode | ElevenLabs Documentation
Response | ElevenLabs UI
Chat Mode | ElevenLabs Documentation
Response | ElevenLabs UI
Prompting guide | ElevenLabs Documentation
i need it in the chat widget of 11labs