Documentation Index
Fetch the complete documentation index at: https://docs.charmos.io/llms.txt
Use this file to discover all available pages before exploring further.
How to Render Rich UI
The Charm Store features a Universal Renderer that can automatically transform your agent’s data into beautiful, interactive React components—like charts, data grids, and metric cards—without you needing to write any frontend code. This guide will show you how to structure your agent’s return values to trigger these components. For a full list of supported UI schemas, please refer to the UI Protocol Reference.Returning Explicit UI Components
To guarantee that the Store renders a specific component, your agent should return a Python dictionary containing the special key_charm_render_type.
Using the Custom Adapter
If you are writing a standard Python function agent, you can simply return the dictionary:Using Framework Adapters (LangChain, CrewAI, OpenClaw)
If you are using a framework, you can configure your LLM to output a JSON string that matches the required schema. The Charm adapters will automatically detect the JSON, parse it, and forward the structure to the UI. For example, using OpenClaw:Rendering Custom UI with HTML/SVG
If the built-in components do not meet your needs, you can return raw HTML or SVG strings. The Store’s Markdown renderer safely sanitizes HTML (stripping<script> tags) and renders it directly.
Mixing Text and UI
In most conversational agents, you want to stream thoughts and text before showing the final chart. To achieve this, use theCharmEmitter to stream markdown text during the execution, and then return the rich JSON object as the final result:
Next Steps
- Explore all supported JSON shapes in the UI Protocol Reference.
- Learn about Execution Modes to understand how data streams to the frontend.
