Built-in render types (no store changes)
Return a JSON object with_charm_render_type set to one of:
| Type | Use case |
|---|---|
bar_chart | Categorical comparisons |
line_chart | Trends over time |
pie_chart | Part-to-whole |
data_grid | Tabular results |
metric_card | KPI-style metrics |
Custom Python agents
custom adapter, return the dict directly from your entry point. With a third-party adapter, return {"status": "success", "output": {...}} or ensure your adapter forwards structured output.
Framework adapters (LangChain, CrewAI, OpenClaw)
Configure the model to emit JSON matching the schema. Example for OpenClaw:Metric card example
Markdown and HTML fallback
Return a plain string for standard Markdown rendering. HTML and SVG snippets are sanitized (scripts stripped):Streaming text + rich final
UseCharmEmitter for intermediate markdown, then return structured JSON as the final result:
Sharing Custom Output Renderers with the Community
You can now build and share your own custom UI components (like a specialized stock chart, a unique data grid, or a 3D molecule viewer) without waiting for a store deployment! Charm supports dynamic ESM module loading for community output renderers. To share a custom renderer:- Build a React Component: Write a React component that takes a
payloadprop and export it as your default export. - Publish to NPM: Package your component and publish it to NPM. Ensure your package is ESM compatible.
- Register in the Community Plugin: Submit a Pull Request to the charm-community-plugin repository. Add your renderer’s details (including the
idwhich corresponds to your_charm_render_type, and thenpm_packagename) intorenderers/registry.json.
esm.sh directly in the browser whenever an agent emits your _charm_render_type!
You can also browse all community renderers on the Plugins page in the Charm Store.
