Hi everyone — I’m sharing Typst Side Agent, an open-source Chrome extension that adds a side-panel AI assistant to typst.app.
It is designed for iterative, tool-driven editing (rather than plain chat), with a focus on reproducibility and document safety.
What it does
- Reads the live editor content with line numbers and workspace context
- Applies targeted edits (
replace_lines,search_replace) and multi-edit atomic patches - Captures preview screenshots / opened image assets as optional context
- Reads diagnostics from both editor underlines and the Improve panel
- Supports a diagnostics loop (
read_diagnostics) so the agent can validate/fix after edits - Extends with:
- custom HTTP tools (JSON-schema function calling)
- MCP servers (Streamable HTTP)
Why I built it
I genuinely like the official Typst web editor — it feels smooth and practical.
On my machine, editing Typst documents in VS Code is often laggy, so I prefer writing in typst.app.
The problem I ran into was AI-assisted workflows: once I wanted an agent to participate in the editing loop (read current content, apply precise edits, check diagnostics, iterate), integrating that cleanly was harder than expected. This extension is my attempt to make that workflow practical.
Technical notes
- Chrome extension, Manifest V3
- OpenAI-compatible Chat Completions + tool calling + SSE streaming
- Works with multiple provider styles for reasoning/thinking streams
- Bundles Typst reference docs for in-agent lookup
- Session management per Typst project
- CI-tested and packaged via GitHub Actions
My testing so far is still limited, so there may be rough edges or bugs.
If you run into issues, please feel free to open an issue on GitHub or comment directly below this post. Feedback is very welcome.
