Folio
The open-source CMS this site runs on, where people and AI agents edit the same page
Spec sheet
- Status
- Open source
- Kind
- Framework / library
- Started
- 2026
- Role
- Author and maintainer
- Platforms
- Cloudflare Workers, Web
- Stack

Why I wrote a CMS#
Every headless CMS I've used splits editing from the page: fill in a form, then go and look at a preview. Agents, which now maintain a lot of sites, get bolted on through an API that goes around everything the editor sees.
Folio fixes both. Editors click a block on the real page and type into it. An agent reads the same schema and writes through the same path as a person. It's a library rather than a hosted product, it runs on nothing but Cloudflare (Workers, D1, Durable Objects and R2), and it's MIT licensed. One deployment can run several sites and brands.
I wrote it, I maintain it, and you're reading this on it. The first commit was in late July 2026; by November it was at v1.8, with a few hundred commits and a handbook behind it.
One file, no drift#
A content type is one file. defineBlock takes the fields and a render function, and from that one definition Folio derives the admin form, the TypeScript prop types and the HTML. They can't drift apart. An editor sees a form. An agent calling get_schema sees the same definition, and a payload that doesn't fit is refused with the path and the reason.
Agents are editors here#
Every deployment serves an MCP endpoint. Give an assistant a scoped token and it can search, read, write, publish and upload media, and call preview_document for a screenshot of the page it just changed. check_document tells it what to fix before anything goes live, using the writing guidance an editor sees.
The decision I'm happiest with is that an agent's write is an ordinary edit. It goes through the same mutation log as a keystroke, shows up live in any open editor, is attributed to its token in the activity trail, and undoes with Cmd+Z. Watching an agent's edits land live in the editor still makes me grin.
Under the hood#
Each document is a Durable Object holding a mutation log, which gives live multiplayer editing with cursors, presence and per-user undo. Drafts and published content are separate, and every document keeps a version history with restore.
Pages are cached with tags taken from whatever a render loaded, so a publish purges exactly the pages that used it. Auth deliberately has no default: magic links, OIDC, Cloudflare Access or passkeys, chosen per site.
Built to be upgraded#
Folio follows semver, installs from a pinned git tag, and is at version 1.8 with a changelog and an upgrade guide for every release. npx folio doctor checks a project's pin, bindings and migrations and prints the command that fixes each finding. Every command can answer in JSON, so a coding agent can run the upgrade too.