AICMS
Open source · MIT · v0.5 · November 2026

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.

Gates Kernel Modules People Adapters
7concepts to learn
6core tables for any site
1config file
Phase 4 works: briefs for agents, content checks, scheduled publishing and ⌘K in Studio.
models/post.tsthe only file you write
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
  },
})
AICMS generates
// 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" }
    }
  }
}
Change a field in the model and all five interfaces update together. Nothing drifts, because none of it is written by hand.
Principles

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.

Architecture

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.

Agents Claude · GPT · Gemini · your own People Studio · ⌘K · Inbox Frontends Next · Nuxt · SvelteKit · Astro token + scopes session + role read token GATES MCP REST OpenAPI GraphQL SDK Events A2A every call = Action generates KERNEL · ACTION BUS validate policy hooks run log emit Schema Engine models → types · API · MCP · forms Module Loader provides / requires · isolation Content Store entries · changesets · events provides / requires reads / writes MODULES seo i18n media search commerce reviews yours ADAPTERS DB: SQLite · Postgres · D1 Media: local · S3 · R2 Vector: sqlite-vec · pgvector
The dashed arrow on the left is the core idea: nobody writes the gates by hand. The Schema Engine generates them from models and modules, so MCP, REST and Studio always agree on data and permissions.

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 field
  • policyfield-level scopes, budget, review mode
  • logwho, what, when, through which gate
  • emitfrontend 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 entry
  • versionsimmutable history
  • changesetsbranches of changes from agents and people
  • eventslog of every Action
  • mediafiles, metadata, alt text
  • tokensagent tokens, stored only as hashes
Vocabulary

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”
Project structure

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
aicms.config.tsthe whole site in one place
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 },
    },
  },
})
terminalCLI
# 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

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.

Available modules

13tools the agent sees through MCP
    Studio menu

    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.

    requireswho can provide it
    paymentsstripe · paddle · adyen
    shippingdhl · ups · fedex
    searchsearch-sqlite · search-pg · meilisearch
    ai.imageopenai-images · flux · local-sd
    modules/reviews/module.tsthe whole module
    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" } },
    })
    Agents

    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 mcp

    Claude, Cursor, ChatGPT and any MCP client. Streamable HTTP or stdio.

    REST

    /api/v1/*

    Plain HTTP with an agent token. n8n, Make, scripts.

    OpenAPI

    /openapi.json

    Function calling in any LLM, LangChain, LlamaIndex.

    GraphQL

    /graphql

    Generated from your models; references resolve to entries, same permissions.

    SDK

    @aicms/client · pip install aicms

    Your 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 · /a2a

    Other agents discover the site and call its Actions as skills.

    Discovery

    /llms.txt · /.well-known/aicms.json

    An agent finds out on its own which models and actions exist.

    Event log every step: who, what, when, through which gate Agent MCP · REST · SDK Draft in a changeset Checks schema · unique · refs Review auto or human Published new entry version Frontend cache revalidation draft submit green merge webhook red rejected back to the agent with a comment undo
    An agent never writes to published content directly. Failed checks or a person's rejection send the changeset back to the agent with a comment, and any publish can be rolled back from the event log.

    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_describemodels, fields, guides, examples, available actions
    cms_searchfull-text search across models
    post_list / post_getreads with field selection and pagination
    post_draftcreate or change an entry inside a changeset
    post_deletepropose deleting an entry
    cms_submitsend the changeset for review
    cms_changesmy 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.

    the agent writesmarkdown
    ## How to choose SPF for winter
    Snow reflects up to 80% of UV rays.
    
    :::cta{href="/spf" label="Pick a cream"}
    AICMS storesblocks
    [{ "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.

    Studio

    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.

    AICMS demo-shop.com

    Inbox

    writer4 min
    New post: How to choose SPF for winter
    waiting for you
    writer2 h
    Translate the About page into Ukrainian
    waiting for you
    seo22 min
    Meta descriptions for 14 posts
    auto-published
    moderator1 h
    12 reviews: 10 approved, 2 rejected
    auto-published
    writervia MCP4 changes4 min ago

    New post: How to choose SPF for winter

    ✓ Schema ✓ lint ⚠ SEO: description is 172 characters Brief: winter skincare
    title
    How to choose SPF for winter
    slug
    how-to-choose-spf-for-winter
    body
    6 blocks · 640 words · 1 CTA “Pick a cream”
    tags
    skincare → skincare, winter, spf

    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.

    Frameworks

    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/next

    Server Components, revalidateTag, <Blocks />

    Nuxt ready

    @aicms/nuxt

    useAicmsData, Nitro cache cleared by webhooks

    SvelteKit ready

    @aicms/sveltekit

    load helpers, live invalidate on publish

    Astro ready

    @aicms/astro

    Content Layer loader, SSG and SSR

    React Router

    @aicms/react-router

    loaders for v7 and Remix

    Angular

    @aicms/angular

    services and resolvers

    Expo

    @aicms/expo

    mobile client with an offline cache

    Anything else

    REST · GraphQL

    Swift, Kotlin, Go, PHP through an OpenAPI client

    app/blog/[slug]/page.tsxNext.js
    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>
      )
    }
    EmbeddedAICMS mounts as a route handler inside Next.js, Nuxt or SvelteKit. One repo, one deploy.
    Standalone serveraicms start or a Docker image. Several frontends read the same content.
    EdgeCloudflare Workers + D1 + R2. The kernel uses web standards, so there's no separate build.
    Comparison

    What changes after WordPress

    WordPressAICMS
    Structurethousands of core files, a theme, plugins, functions.phpone package; a project is a config plus models
    Datawp_posts + wp_postmeta (EAV)typed models, six core tables
    Extendingglobal hooks with priorities, plugin conflictsmodules with provides / requires and isolation
    APIREST added later, doesn't cover everythingevery Action is available over REST and MCP at once
    AI agentsplugins, or driving the admin UInative MCP, scopes, changesets
    Permissionsthe administrator role opens everythingfield-level scopes, budgets, review
    Historyrevisions for posts onlyan event log for everything, roll back anything
    FrontendPHP themesany framework, typed SDK
    Roadmap

    From kernel to ecosystem

    Every phase ends with something you can use.

    Phase 0 · done

    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

    Phase 1 · done

    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

    Phase 2 · done

    Lego

    • Module SDK, aicms add
    • seo, i18n, media, search
    • git-sync module
    • Agents propose modules via Inbox
    • Nuxt, SvelteKit

    The module ecosystem starts growing

    Phase 3 · done

    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

    Phase 4 · done

    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 frontend
    • node:sqlitebuilt into Node 22, no native builds
    • HonoHTTP on any runtime
    • Zod 4validation and JSON Schema for agents
    • MCP SDKofficial, Streamable HTTP and stdio
    • ReactStudio, animated with Framer Motion
    • Yjsco-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.