Skip to main content
The session interface renders agent output using Streamdown, a streaming Markdown renderer. Streamdown replaces the previous react-markdown engine and adds support for math expressions, Mermaid diagrams, and theme-accurate syntax highlighting via Shiki.

Markdown

Standard Markdown renders in session messages: headings, bold, italic, tables, lists, links, blockquotes, and inline code. Agents can return any valid Markdown and the session view formats it automatically.

Math expressions

Write math in standard LaTeX notation using KaTeX delimiters. The session interface renders it with KaTeX. Wrap inline expressions in single dollar signs ($...$):
The area of a circle is $A = \pi r^2$.
Wrap block (display) expressions in double dollar signs ($$...$$):
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$

Diagrams

The session interface renders Mermaid diagrams inline via @streamdown/mermaid. Use a fenced code block with the mermaid language tag:
```mermaid
flowchart TD
    A[Start] --> B{Condition}
    B -- Yes --> C[Branch A]
    B -- No  --> D[Branch B]
```
The diagram renders inline in the session view.

Code blocks

Code blocks use Shiki for syntax highlighting. Shiki applies theme-accurate colors for over 100 languages. Specify the language after the opening fence:
function greet(name: string): string {
  return `Hello, ${name}!`
}
Supported languages include typescript, javascript, python, bash, json, yaml, sql, and many others.