# output_html

The agent can output arbitrary UIs by outputting HTML. This allows
the agent to draw one-off diagrams and so on. Shelley ships
with skills for using [Vega-Lite](https://vega.github.io/vega-lite/)
and [Excalidraw](https://github.com/excalidraw). MCP tools with
interactive views ([MCP Apps](https://github.com/modelcontextprotocol/ext-apps))
show up the same way.

For more complicated needs, ask the agent to run a web server.

<figure class="shot">
<picture>
<source srcset="/media/output-iframe-dark.png" media="(prefers-color-scheme: dark)">
<img src="/media/output-iframe-light.png" width="1280" height="1250" loading="lazy" alt="A Shelley conversation in which the agent draws an Excalidraw diagram of how requests flow through a small Go service, rendered inline with output_html.">
</picture>
</figure>

<div class="beside">
<div class="beside-text">

Pages can facilitate sending a message back into the agent thread.
For example, in the screencast to the right, the user can choose one
of three choices.

</div>
<figure class="phone">
<video muted loop playsinline preload="none" data-autoplay width="390" height="844" aria-label="On a phone, the user asks for a few ways to persist a link shortener's links; Shelley shows three options as an interactive page, the user taps the JSON file option, it appears in the text box, the user sends it, and Shelley patches the store and runs the tests.">
<source src="/media/output-html-dark.mp4" type='video/mp4; codecs="avc1.640032"' media="(prefers-color-scheme: dark)">
<source src="/media/output-html-dark.webm" type='video/webm; codecs="vp9"' media="(prefers-color-scheme: dark)">
<source src="/media/output-html-light.mp4" type='video/mp4; codecs="avc1.640032"'>
<source src="/media/output-html-light.webm" type='video/webm; codecs="vp9"'>
</video>
</figure>
</div>
