Deterministic by Design
Same input always produces same output. No hidden state, no surprises. Every computation is pure and reproducible.
Build applications where every state change is deterministic, traceable, and governed by explicit authority.
Manifesto is a semantic state layer for building AI-governed applications with deterministic computation and full accountability.
It solves the fundamental problem: How do we build applications where AI agents can safely read, reason about, and modify application state?
Traditional state management scatters logic across components, middleware, and callbacks. Manifesto takes a radically different approach:
Core computes what the world should become.
Host makes it so.
World governs who can do what.The fundamental equation:
compute(schema, snapshot, intent, context) โ (snapshot', requirements, trace)This equation is:
Here's a complete counter application in Manifesto:
import { z } from "zod";
import { defineDomain } from "@manifesto-ai/builder";
// Define domain with Zod schema
const CounterDomain = defineDomain(
z.object({
count: z.number().default(0),
}),
({ state, actions, expr, flow }) => {
const { increment, decrement } = actions.define({
increment: {
flow: flow.patch(state.count).set(expr.add(state.count, 1)),
},
decrement: {
flow: flow.patch(state.count).set(expr.sub(state.count, 1)),
},
});
return { actions: { increment, decrement } };
}
);MEL equivalent:
domain Counter {
state {
count: number = 0
}
action increment() {
when true {
patch count = add(count, 1)
}
}
action decrement() {
when true {
patch count = sub(count, 1)
}
}
}That's it. Five lines of actual logic. No reducers, no middleware, no thunks.
What just happened?
type Snapshot = {
data: { count: 0 }; // Domain state
computed: { doubled: 0 }; // Derived values
system: { status: 'idle' }; // Runtime state
input: unknown; // Transient input
meta: { version: 1 }; // Metadata
};Critical principle: All communication happens through Snapshot. There is no other channel.
If it's not in Snapshot, it doesn't exist.
type IntentBody = {
type: "increment"; // Action name
input?: unknown; // Optional data
};Intents are requests to perform actions. They trigger Flow execution.
Flows are data structures that describe computations:
{
kind: "seq",
steps: [
{ kind: "patch", op: "set", path: "count", value: { kind: "lit", value: 0 } }
]
}Flows:
// Declare effect (Core)
flow.effect("api:fetchUser", { userId: "123" });
// Execute effect (Host)
host.registerEffect("api:fetchUser", async (type, params) => {
const user = await fetch(`/api/users/${params.userId}`).then(r => r.json());
return [{ op: "set", path: "user", value: user }]; // Return patches
});Effects are declarations of IO. Core declares them. Host executes them.
// Submit intent through World
const proposal = await world.submitProposal(actor, intent);
// Authority evaluates
world.registerAuthority("todos:delete", async (proposal, context) => {
if (context.actor.role !== "admin") {
return { approved: false, reason: "Only admins can delete" };
}
return { approved: true };
});World manages who can do what, and records every decision.
Modern applications have three fundamental problems:
Traditional state management:
Manifesto solution: Pure computation. Same input โ same output, always.
Traditional systems:
Manifesto solution: Full lineage. Every change traceable to Actor + Authority + Intent.
Traditional testing:
Manifesto solution: Test Core without mocks. It's pure.
| Traditional State Management | Manifesto |
|---|---|
| Logic scattered across components | Logic in declarative schemas |
| Side effects mixed with logic | Effects as pure declarations |
| Non-deterministic execution | Guaranteed determinism |
| No built-in governance | World Protocol for authority |
| Exceptions for errors | Errors as values in Snapshot |
| Testing requires mocks | Core testable without mocks |
| Hard to explain "why" | Every value can answer "why?" |
Before you dive deeper, understand what Manifesto is NOT:
Manifesto IS:
โ A semantic calculator for domain state
โ Schema-first and JSON-serializable
โ Deterministic and reproducible
โ Explainable at every step
โ Pure (no side effects in Core)
Manifesto IS NOT:
โ An AI agent framework
โ A workflow orchestrator
โ A database or ORM
โ A replacement for React/Redux
โ A Turing-complete runtimeSee Manifesto vs. Others for detailed comparisons.
Manifesto is structured as six distinct layers, each with a single responsibility:
Key separations:
See Architecture Overview for complete details.
Understanding how data flows through Manifesto is critical:
Critical principle: Information flows ONLY through Snapshot. No hidden channels.
See Data Flow for step-by-step explanation.
Ready to build with Manifesto?
npm install @manifesto-ai/builder @manifesto-ai/core @manifesto-ai/host zod
# or
pnpm add @manifesto-ai/builder @manifesto-ai/core @manifesto-ai/host zod| Path | For Whom | Start Here |
|---|---|---|
| Quick Start | Developers new to Manifesto | Getting Started |
| Deep Dive | Understanding the architecture | Core Concepts |
| Examples | Learning by doing | Todo App Example |
| Specifications | Implementers & reviewers | Specifications |
Use Manifesto if you need:
Use Manifesto if you have:
Don't use Manifesto if you only need:
useState or Zustand)See When to Use Manifesto for detailed decision tree.
We welcome contributions! See our Contributing Guide.
MIT ยฉ 2025 Manifesto AI
Ready to build deterministic, AI-governed applications?