AICMS
A CMS where AI agents work with content as naturally as people do.
Describe a model once. AICMS generates the API, MCP tools for agents, an admin for people and types for your frontend. Modules snap in like bricks, and every change an agent makes is reviewed and can be rolled back in one click.
export default defineModel({ name: "post", label: "Posts", fields: { title: field.text({ required: true }), slug: field.slug({ from: "title" }), cover: field.media({ alt: "ai" }), body: field.blocks(["paragraph", "image", "cta"]), }, agent: { guide: "Short sentences, friendly expert tone", can: ["create", "update"], // a human publishes }, })
// tools/list: the agent gets a ready-made tool { "name": "post_draft", "description": "Draft a post. Guide: short sentences, friendly expert tone", "inputSchema": { "type": "object", "required": ["title"], "properties": { "title": { "type": "string" }, "cover": { "type": "object", "properties": { … } }, "body": { "type": "string", "format": "markdown" } } } }
GET /api/v1/post?fields=title,slug GET /api/v1/post/:id POST /api/v1/post → draft in your changeset PATCH /api/v1/post/:id → draft in your changeset POST /api/v1/changesets/submit → send for review GET /openapi.json for function calling # 403 if the agent's token lacks the scope # 422 naming the field if data fails the schema
import { cms } from "@/lib/cms" // createAicms<Schema>() from @aicms/next const post = await cms.post.get({ slug: "how-to-choose-spf" }) post.title // string post.cover // Media { url, alt, width, height } post.body // Block[] post.author // type error before anything runs: // model post has no such field
# cms_describe({ model: "post" }) post · Posts fields title*, slug, cover, body body markdown + :::image, :::cta blocks guide Short sentences, friendly expert tone can create, update cannot publish → a person decides in Inbox # the same text is served at /llms.txt
Six rules that keep the system simple
Every architecture decision is checked against these rules. If a feature breaks them, it becomes a module or it doesn't get built.
One schema, everything else generated
A model is described once in TypeScript. Tables, validation, REST, MCP, Studio forms, types and agent docs all come from it.
Every operation is an Action
Creating an entry, generating alt text, running an SEO audit: one shape with an input/output schema, scopes and hooks. People and agents take the same path.
Agents never write to production directly
An agent's changes land in a changeset and go through checks and review. The event log can roll back anything.
A module is one folder
One manifest file declares what the module provides and what it needs. No global soup of hooks and priorities.
As few files as possible
A project is a config, a models folder and, if needed, your own modules. Everything generated lives in .aicms/ and is never committed.
Any framework, any runtime
The kernel is built on web-standard Request/Response: Node, Bun, Deno, Cloudflare Workers. Adapters for every popular frontend.
Four layers and one pipeline in the middle
Agents, people and frontends come in through different gates, but every call becomes an Action and runs through the same kernel pipeline. The kernel itself generates every gate from the schemas.
One Action pipeline for everyone
Every gate just calls an Action. Validation, permission checks, module hooks, the log entry and the webhook event all happen in one place, so an agent can't sidestep the rules that apply to a person.
validateStandard Schema, errors name the fieldpolicyfield-level scopes, budget, review modelogwho, what, when, through which gateemitfrontend webhook, SSE for agents
Six core tables for any site
The number of models never changes the database schema. Entries are stored as JSON documents, and fields marked indexed: true get expression indexes in SQLite and Postgres.
entriescurrent state of every entryversionsimmutable historychangesetsbranches of changes from agents and peopleeventslog of every Actionmediafiles, metadata, alt texttokensagent tokens, stored only as hashes
Seven concepts, and nothing else to learn
A person finds their way around in five minutes. An agent gets the same concepts through cms_describe.
- Model
- A content type's schema, together with instructions for agents
- post, product, review
- Entry
- One record of a model, with its version history
- “How to choose SPF for winter”
- Block
- A brick inside rich content
- paragraph, image, cta
- Action
- Any operation with a typed input, output and scopes
- post.draft, seo.audit
- Module
- A package of models, blocks, Actions, hooks and Studio panels
- seo, commerce, reviews
- Agent
- An agent identity: scopes, budget, review mode
- writer, seo, moderator
- Changeset
- A set of proposed changes waiting for checks and review
- “writer: 3 new posts”
Two kinds of files describe a whole site
In WordPress, site logic is spread across the theme, plugins and functions.php. In AICMS it lives in models and modules, and everything else is generated.
An AICMS project
everything you write
my-site/ ├── aicms.config.ts # DB, media, locales, modules, agents ├── models/ │ ├── post.ts │ ├── page.ts │ └── product.ts ├── modules/ # optional │ └── reviews/ │ └── module.ts └── .aicms/ # generated, in .gitignore
A typical WordPress site
core + theme + plugins
wp-admin/ # core wp-includes/ # core wp-content/ ├── themes/my-theme/ │ ├── functions.php # logic, hooks, CPTs │ ├── header.php footer.php │ ├── single.php page.php archive.php │ └── template-parts/ … ├── plugins/ │ ├── advanced-custom-fields/ │ ├── wordpress-seo/ │ ├── woocommerce/ │ └── … 15–30 more └── uploads/ wp-config.php .htaccess xmlrpc.php
export default defineConfig({ db: sqlite(".aicms/data.db"), // or postgres() media: local("uploads"), // or s3(), r2() locales: ["en", "uk"], modules: [seo(), i18n(), media({ altText: "ai" })], agents: { writer: { scopes: ["post:draft"], review: "human" }, seo: { scopes: ["post:update.seo"], review: "auto" }, moderator: { scopes: ["reviews:write"], budget: { actionsPerHour: 500 }, }, }, })
# new project npx aicms init # Studio /studio · API /api · MCP /mcp npx aicms dev # token for a new agent npx aicms agent create writer # review agent changes from the terminal npx aicms changes npx aicms merge cs_8f2k # module: config, migration, types, tools npx aicms add seo
Modules snap together like Lego
A module asks for a capability, not a specific package. Tap the bricks: dependencies come along on their own, and the agent's tools and the Studio menu rebuild themselves.
Capabilities, not packages
The reviews module knows nothing about Stripe or Adyen. It asks for commerce, and commerce asks for payments. Your config decides who provides them.
| requires | who can provide it |
|---|---|
payments | stripe · paddle · adyen |
shipping | dhl · ups · fedex |
search | search-sqlite · search-pg · meilisearch |
ai.image | openai-images · flux · local-sd |
export default defineModule({ name: "reviews", requires: ["commerce"], uses: ["product"], // access to other models is explicit models: { review: { fields: { product: field.ref("product"), rating: field.number({ min: 1, max: 5 }), status: field.enum(["pending", "published"]), }}, }, actions: { moderate: action({ description: "Approve or reject a review", scope: "reviews:write", input: { id: field.id(), ok: field.boolean() }, run: ({ input, ctx }) => ctx.draft("review", …), }), }, on: { "changeset.merged": notifyModerator }, studio: { nav: { label: "Reviews" } }, })
Any agent connects in a minute
Eight gates cover every popular way agents work today. An agent only sees the tools its scopes allow.
MCP
/mcp · npx aicms mcpClaude, Cursor, ChatGPT and any MCP client. Streamable HTTP or stdio.
REST
/api/v1/*Plain HTTP with an agent token. n8n, Make, scripts.
OpenAPI
/openapi.jsonFunction calling in any LLM, LangChain, LlamaIndex.
GraphQL
/graphqlGenerated from your models; references resolve to entries, same permissions.
SDK
@aicms/client · pip install aicmsYour own agents in TypeScript and Python, typed from the schemas.
Events
webhooks · /events (SSE)Agents react to changes: a new review, a new order, a publish.
A2A
/.well-known/agent-card.json · /a2aOther agents discover the site and call its Actions as skills.
Discovery
/llms.txt · /.well-known/aicms.jsonAn agent finds out on its own which models and actions exist.
The agent's tools
Four kernel tools, four generated per model, plus the Actions of installed modules. A draft tool only lists the fields the agent is allowed to write.
| cms_describe | models, fields, guides, examples, available actions |
| cms_search | full-text search across models |
| post_list / post_get | reads with field selection and pagination |
| post_draft | create or change an entry inside a changeset |
| post_delete | propose deleting an entry |
| cms_submit | send the changeset for review |
| cms_changes | my changesets and reviewer comments |
| seo_audit … | module Actions, if scopes allow |
Markdown in, blocks in the database
Agents write Markdown comfortably; people need a visual editor. AICMS stores blocks and hands agents a Markdown projection of the same data, in both directions.
## How to choose SPF for winter Snow reflects up to 80% of UV rays. :::cta{href="/spf" label="Pick a cream"}
[{ "type": "heading", "level": 2, … },
{ "type": "paragraph", "text": "Snow…" },
{ "type": "cta", "href": "/spf", … }]
Field-level scopes
post:update.seo lets an agent change SEO fields only. The rest of the model isn't even in its tool schema.
Review mode
human, auto, or a rule like { auto: ["post:update.seo"] }. New agents default to human; a check warning always goes to a person.
Budgets
Limits on actions per hour and on changeset size. Going over pauses the agent until the window resets.
Kill switch
One command revokes the agent's tokens and rejects every change it hasn't had merged.
Briefs
“Write about the spring menu, publish Friday 9:00.” The agent finds it with cms_briefs, asks when it's stuck and answers with cms_submit({ brief }).
Checks
Like CI for content. lint stops “[insert price]” and flags “delve”, seo flags a missing description. Errors go back to the agent, warnings to the reviewer.
Schedules
Approve now or for later: cms_merge({ at }). The server publishes on time, a cron trigger does it on Cloudflare, and a stale change goes back to its author.
People see what agents did, and decide
Five sections in the menu. The main one is Inbox: changesets from agents arrive there with a diff, checks and decision buttons.
Inbox
New post: How to choose SPF for winter
Agent note: based on three similar posts, tone follows the post model's guide.
Forms from schemas
Lists, filters and the block editor appear as soon as you add a model. There's no admin to build.
⌘K finds anything
Pages, models, a new entry or brief, and full-text search over every entry, from the keyboard.
See who is editing
People and agents on the same entry show up live, and Studio warns before someone's draft would conflict.
Works with the frontend you already know
Every adapter gives you a client typed from your schemas, a <Blocks /> component, an image component, live preview and cache revalidation from webhooks.
Next.js ready
@aicms/nextServer Components, revalidateTag, <Blocks />
Nuxt ready
@aicms/nuxtuseAicmsData, Nitro cache cleared by webhooks
SvelteKit ready
@aicms/sveltekitload helpers, live invalidate on publish
Astro ready
@aicms/astroContent Layer loader, SSG and SSR
React Router
@aicms/react-routerloaders for v7 and Remix
Angular
@aicms/angularservices and resolvers
Expo
@aicms/expomobile client with an offline cache
Anything else
REST · GraphQLSwift, Kotlin, Go, PHP through an OpenAPI client
import { Blocks } from "@aicms/next" import { cms } from "@/lib/cms" export default async function Post({ params }) { // typed by `aicms types` from models/post.ts const post = await cms.post.get({ slug: (await params).slug }) return ( <article> <h1>{post.title}</h1> <Blocks value={post.body} /> </article> ) }
aicms start or a Docker image. Several frontends read the same content.What changes after WordPress
| WordPress | AICMS | |
|---|---|---|
| Structure | thousands of core files, a theme, plugins, functions.php | one package; a project is a config plus models |
| Data | wp_posts + wp_postmeta (EAV) | typed models, six core tables |
| Extending | global hooks with priorities, plugin conflicts | modules with provides / requires and isolation |
| API | REST added later, doesn't cover everything | every Action is available over REST and MCP at once |
| AI agents | plugins, or driving the admin UI | native MCP, scopes, changesets |
| Permissions | the administrator role opens everything | field-level scopes, budgets, review |
| History | revisions for posts only | an event log for everything, roll back anything |
| Frontend | PHP themes | any framework, typed SDK |
From kernel to ecosystem
Every phase ends with something you can use.
Kernel
- Schema Engine
- Action Bus and policies
- Changesets and event log
- SQLite storage
- REST and MCP
- CLI
An agent drafts content over MCP, a person merges it
Human in the loop
- Studio: Inbox, Content, Agents, Activity
- Rollback: restore a version, undo a changeset
- Live events over SSE
- TypeScript and Python SDKs
- Next.js and Astro adapters
The first real site
Lego
- Module SDK,
aicms add - seo, i18n, media, search
- git-sync module
- Agents propose modules via Inbox
- Nuxt, SvelteKit
The module ecosystem starts growing
Scale
- Postgres and Cloudflare Workers (D1, R2)
- Live presence in Studio
- Module registry, A2A
- Commerce with Stripe or manual payments
Production for shops and media
Workflows
- Briefs for agents
- Content checks, the lint module
- Review rules
- Scheduled publishing
- ⌘K in Studio,
create-aicms
A team of agents works from briefs
Kernel stack
TypeScripttypes end to end, from schema to frontendnode:sqlitebuilt into Node 22, no native buildsHonoHTTP on any runtimeZod 4validation and JSON Schema for agentsMCP SDKofficial, Streamable HTTP and stdioReactStudio, animated with Framer MotionYjsco-editing between people and agents
Decisions
storageThe database is the source of truth. A git-sync module mirrors published content to Markdown files and turns pull requests into changesets.modulesAgents may propose a module. The proposal lands in Inbox with the permissions it asks for, and a person installs it.pythonThe Python SDK shipped in phase 1, together with the TypeScript one.licenseMIT for everything. Free for any use, including commercial. If the project needs funding, it will come from donations, not a paid edition.