Agentuity docs and examples
The docs site, cookbook, reference, and examples repo I worked on at Agentuity.
I ported our docs into our SDK monorepo, as an app running on our own platform. This let us build interactive examples into the docs, which helped us keep dogfooding the platform.
try the sidebar, the search, or the outlined cards
- Where
agentuity.dev, retired with the platform- When
- July 2025 to July 2026; the port merged in February 2026
- Built with
- React, Vite, MDX, Tailwind, and TanStack Start
- Archive
- The docs home, May 2026
designing it
This was my first taste of real design work, and it was fun to start it over a weekend. I started from shadcn create, since one of its templates gave me a solid base to build on, then played around with the base color and style to make sure it matched and looked good.
For the MDX, remark-gfm handled the tables, and rehype plugins handled highlighted code blocks, heading links, and Mermaid diagrams.
markdown for agents
Agents are the main consumers of docs now, so I wanted every page to have a version made for them. Our pages were MDX, with imports and JSX components mixed into the text. React needs those, but an agent reading the raw file gets code where the content should be.
So I wrote generate-markdown-files.ts, which ran every time we built the docs or started them locally. It wrote a plain Markdown copy of every page at the page’s URL plus .md, so /reference/api/key-value also had /reference/api/key-value.md. It also wrote an llms.txt at the site’s root, an index of every page’s Markdown file. An agent could read the index, pick the pages it needed, and fetch only those:
# Agentuity SDK Documentation…## Documentation Pages
[Agents](https://agentuity.dev/agents.md)[Using the AI Gateway](https://agentuity.dev/agents/ai-gateway.md)…[Cookbook](https://agentuity.dev/cookbook.md)…[Key-Value Storage API](https://agentuity.dev/reference/api/key-value.md)…It also rewrote our components into plain Markdown, so a <ParamTable> became a table, a <Callout> became a GitHub-style alert, and a <CardLink> became a list item. This was most helpful with our API examples: an <ApiExample> held only a method, a path, and sometimes a body, and the component built the requests in the browser, so the MDX had no full request in it. The converter wrote the curl itself:
## Store Value…### Example
<ApiExample method="PUT" path="/kv/my-namespace/user-123" body={{ "name": "Alice", "email": "alice@example.com"}} />## Store Value…### Example
```bashcurl -X PUT "https://api.agentuity.cloud/kv/my-namespace/user-123" \ -H "Authorization: Bearer $SDK_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Alice", "email": "alice@example.com"}'```The order of the transforms mattered here. A callout can wrap a code fence, so I converted callouts first, then set the code fences aside so the rest of the transforms only touched prose. Otherwise, stripping import lines would have stripped them from our TypeScript examples too.
Each page’s Copy as Markdown button copied the same file, as the reader above does now.
.md, and an agent finding it through llms.txtwriting it
For the writing, I tried to provide some key information fast, and then build up with progressive disclosure: a little context, then working code, then more detail as you need it. A lot of that came from how Mintlify, Vercel, and the AI SDK docs present information.
Later, I turned this approach into my own writing skill, drawing on Vercel’s writing guidelines and Mintlify’s docs skill.
cookbook and reference
I wanted the cookbook’s examples to each help in their own way, so I split it into three kinds:
- Tutorials hold your hand through a full example, like building a RAG agent that answers questions from your documents and cites its sources.
- Patterns each teach one important concept, like evals, background work, or logging and tracing, and point you to where you can learn more.
- Integrations show how to use the platform with frameworks and tools you already use. I wrote eight of them, from agent frameworks like Mastra, LangChain, and the OpenAI Agents SDK to adding agents to an existing Next.js or Turborepo app.
Our goal was to meet you where you’re at, for whatever tools or frameworks you already use. It was super fun learning how to talk about each of these, since they all require slightly different ways of teaching and presenting technical details.
I also split the long SDK reference into topic pages, each with signatures, parameters, return values, and an example. That gave us one page to link to when someone had a question, so they didn’t have to dig through a huge page, and smaller pages also did better for search engine and answer engine optimization (SEO and AEO).
Jeff Haynie, our CEO, set up generation for the REST API reference, so the reference updated every time we shipped an update. It read the fields straight from the SDK’s own Zod schemas, the same ones its TypeScript types came from, so a field’s description in the code became its row in the docs.
TaskSchema, then in the sdk’s Task type and the docsthe examples repo
We also had an examples repo that the guides linked to. I organized it around what someone wanted to do: learn the SDK, add agents to an existing app, use another framework, or try a platform feature.
- Training: a five-lesson course that adds one idea at a time: a hello world agent, calling an outside API, routing between agents, the storage types, and finally a deep research workflow. I worked with Seng Rith on the training, then took over a bunch of that work.
- Feature apps: five apps that each combine a few platform services into something you can try. For example, one takes a single prompt, writes the code in both TypeScript and Python, runs each in its own sandbox, and compares the results. Others research a topic, publish a scheduled digest of Hacker News, or explore websites in a sandboxed browser.
- Existing apps: the Next.js, TanStack Start, and Turborepo projects behind those integration guides, for adding agents to an app you already have.
- Integrations: the code for the Mastra, LangChain, OpenAI Agents SDK, Claude Agent SDK, and Chat SDK guides.
Thanks to Nicholas Mirigliani, whose earlier work the course builds on, and to Joel Samuel and Dhilan Fye for their examples. To tour the whole SDK, we had the Kitchen Sink first, and later the SDK Explorer.