Semifluid: Software Your Agent Builds Without Writing Code

What happens when an AI agent builds a personal application out of typed documents, declarative rules, and atomic tools — and exposes the finished app as its own MCP server so other agents can use it reliably?


Most attempts at “AI builds you an app” follow the same script. You describe what you want, a coding agent writes a few thousand lines of TypeScript and SQL, deploys a server, and hands you a URL. It feels magical until week two, when you want to change a rule, add a field, or plug a different assistant into your data — and suddenly you are maintaining a bespoke codebase.

Semifluid starts from a different premise. A person tells an agent what they need, and the agent builds a base: a small application made of typed, linked documents, named queries, and declarative tools. No code is written or deployed. Every base runs on a fixed engine and is exposed as its own Model Context Protocol (MCP) server, so other agents can use it the way a person uses an app.

The claim to prove: an agent can build a useful app from declarative building blocks, and another agent can then use it reliably.

Two MCP servers, one strict boundary

Semifluid splits building an app from using an app into two completely separate MCP surfaces, each with its own URL, discovery metadata, and OAuth 2.1 grant:

The Control Plane

control.<domain>/mcp — Used by a builder agent to create bases and design their types, fields, queries, tools, and instructions. It never reads or writes document data.

The Base Server

{slug}.<domain>/mcp — One standalone MCP server per base. Used by a client agent to read, search, and update that base’s documents. Installing or revoking one base never affects another.

Because every base is its own MCP server, you install a nutrition tracker, a home maintenance log, or a reading list the same way you install separate apps on a phone. A token granted to your nutrition tracker cannot touch your home records — or your control plane.

Figure 1: Request flow across the web viewer, control plane, and per-base MCP servers.
Semifluid request architecture Three request paths: a builder agent talks to the control plane MCP server to edit a base design; a client agent talks to a base-specific MCP server to use documents; a person uses the read-only web viewer. All MCP calls verify the OAuth token and D1 grant before reaching the base's Durable Object. Builder Agent Designs bases Client Agent Uses one base Human Owner Read-only viewer Engine Worker (Hono) control.*/mcp & {slug}.*/mcp 1. Verify JWT token 2. Check grant in D1 3. Call BaseDO RPC Web Worker (TanStack) Better Auth, OAuth 2.1, Viewer BaseDO (1 per base) Embedded SQLite + FTS5 Design, documents, edges, events & design log D1 (Control Plane) Users, sessions, OAuth, base registry & grants (No document data)

The building blocks of a base

Everything a Semifluid base can do comes from four declarative layers. Types, fields, queries, and tools are stored as rows — never DDL migrations or executable scripts — so an agent can evolve a base safely without deploying code.

1. Typed, linked documents

A base defines document types (like food, entry, or task) and typed fields: text, number (exact decimals rounded to nine places), boolean, select, url, date, and relation. Relations are stored as indexed edges rather than loose IDs, and an owned relation binds child documents to their parent’s lifecycle so they are created, replaced, and voided together.

Types can also declare unique keys, an optional label expression (there is no forced built-in name field), and tools_only fields that generated CRUD tools are not allowed to touch. That last detail is how a base enforces invariants without hidden database triggers: if a field carries business logic, only authored tools can write it.

2. CEL expressions — no loops, no side effects

Defaults, computed fields, validation rules, step conditions, and query filters are all written in CEL (Common Expression Language). Every expression is type-checked when it is defined, always terminates, and cannot reach outside the base.

A default expression evaluates at write time and stores its result; if an input it reads is missing, the field stays empty (“unknown stays unknown”). Validation rules must hold after every write and can inspect previous to enforce state transitions — for example, preventing a closed task from ever reopening.

3. Declarative tools with clean stops

While Semifluid automatically generates standard CRUD tools for each type, the real power is in authored tools. An authored tool declares its JSON Schema input, an ordered list of steps, and the documents or named queries it returns. Every call runs in a single atomic transaction with revision checks and full event history.

Step What it does
resolve Find exactly one document by unique key or full-text match. None or many stops the tool cleanly.
create Create a document along with its owned children (from input or copied from another document).
update Change fields on a document or replace its owned children, with optional revision checks.
upsert Create or update by unique key.
void, restore Soft-delete a document and its owned children, or bring them back.
require Stop the tool unless a CEL expression holds.

Steps can repeat over a list with each and skip conditionally with when. There is no other control flow, no loops, and no network access. When a tool cannot finish — say, an item is missing from a food catalog or a part is out of stock — it stops with a named outcome such as needs_research or needs_clarification. Nothing is written, so the client agent can ask the user or look up facts and retry the whole call safely.

4. The descriptions are the product

A client agent never reads source code to learn how a base works. It learns from the text the builder agent writes: base-level instructions, tool descriptions, field descriptions (surfaced directly in every tool’s JSON Schema), and recovery messages on stops and rules. Even the control plane’s own tool descriptions are written to coach builder agents into authoring clear guidance.

Proving the idea: Macro Tracker

To test whether these building blocks are enough for a real app, Semifluid’s MVP benchmark is Macro Tracker — a private nutrition log with a food catalog, portion conversions, meal entries, saved meals, daily nutrition totals, and calorie/macro targets.

Excerpt of the Macro Tracker tool flow (shorthand notation for the declarative definition):
tool log_intake (effect: write):
  input: utterance, eaten_at?, timezone?, meal_category?,
         items[]: { food, amount, unit, facts? }
  steps:
    - each items when facts:
        upsert food by (food, facts.brand) set facts
    - each items when no facts:
        resolve food by name or alias
          none -> stop needs_research
                  "Research each listed food and retry the whole meal."
          many -> stop needs_clarification
                  "Ask which food was meant. Nothing was logged."
    - create entry { eaten_at, timezone, meal_category, utterance }
        with items { food, amount, unit }
  returns: entry, day(entry.local_date)

Notice how external lookup is handled without giving the base network access. If the user logs a homemade dish or an unfamiliar brand, resolve collects every unknown item in one pass and stops with needs_research. Nothing is half-logged. The client agent researches the nutrition facts (or asks the user for the recipe) and retries log_intake with facts attached, which upserts the food into the catalog and logs the meal in one atomic transaction.

Blind handoff result

In the M5 blind handoff test, a builder agent was given an empty account and a plain-language brief for Macro Tracker — no fixture, no starter schema. It made 107 control-plane calls and designed 7 types, 3 queries, and 14 authored tools. A fresh client agent then connected only to the resulting base server and ran 10 frozen meal-logging scenarios.

10 / 10 Frozen logging scenarios passed (target was 8)
7 / 3 / 14 Types, queries, and tools built from scratch
0 lines Application code written or deployed

The client agent asked about both unknown homemade dishes together without writing partial state, corrected a salmon portion from 150 g to 180 g while recording the nutrient diff, ignored a hypothetical snack without writing, placed a backdated dinner on the right local timezone date, and reconciled both daily nutrition reports against individual meals.

How it runs under the hood

Semifluid runs entirely on Cloudflare’s platform, with a deliberately simple split of responsibilities:

What comes after the MVP?

Once the real-world owner trial wraps up, the roadmap extends the same declarative model to multi-user and richer apps (modeled against Upkeep, a 13-type home management base):

  • Spaces & roles: Personal spaces (where even the builder cannot read other people’s data) and shared spaces with per-type role permissions.
  • Draft & publish: Collect design edits in a draft head before publishing them to other people’s spaces.
  • Richer structures: Nested group fields, recursive hierarchy queries, cross-type timelines, batch creation of linked records, and operation-level undo.
  • Platform hardening: Idempotency keys for write retries, per-base token audiences, R2 attachments, dry runs, and failure metrics for builders.

Software doesn’t always need a repository, a build pipeline, and a framework upgrade cycle. When an agent is both the builder and the primary user, a small, well-typed, inspectable set of declarative primitives goes a surprisingly long way.