Skip to main content
Ablo is a state control API for AI agents and collaborative apps. It gives agents a narrow way to write production state: declare models, load current state, coordinate active work, and write with stale-state checks. Capabilities, tasks, commits, and receipts are the protocol underneath, not first-integration ceremony. Multiplayer is not a separate product mode. Humans, server actions, and agents write through the same ablo.<model> surface on one typed, coordinated state — Ablo fans out confirmed deltas, exposes active intents, and rejects stale writes for every participant. Everyone constructs the same client: interactive apps call Ablo({ schema, apiKey }) and get the live WebSocket plane; agents add transport: 'http' and get a stateless client — same API, same coordination plane, no socket.

Two clients: server vs browser

A typical app builds two Ablo clients, and the split is the most common setup mistake. The server holds your secret key; the browser never does — it fetches a short-lived per-user token from a backend route.
import Ablo from '@abloatai/ablo';
// Secret sk_ key. Identifies the project AND authenticates. Never bundled.
export const ablo = Ablo({ schema, apiKey: process.env.ABLO_API_KEY });
Shipping the server apiKey to the browser is blocked by default, and a browser client with no getToken/apiKey fails to initialize with session_expired. The backend route mints the token with ablo.sessions.create({ user }). See the full wiring in the Next.js example.

Start here

  • Quickstart — Make your first schema-backed write through a Data Source.
  • Agents — Stateless HTTP client, claim/queue coordination, humans + agents on one state.
  • Connect Your Database — Keep rows canonical behind a signed Data Source endpoint, or opt into the direct Postgres connector.
  • Integration Guide — Connect an existing backend, then add React, multiplayer, and agent patterns.
  • Guarantees — What confirmed writes, stale checks, and intents guarantee.
  • Interaction Model — The commit plane and control plane.
  • API Reference — Resource-by-resource method shape.
  • Client Behavior — Options, errors, retries, timeouts, and imports.
  • API Keys — Bearer tokens for the public API.

API shape

PlanePrimitivesPurpose
StateSchema, Model, Intent, ReceiptThe product path. Load, coordinate, write, confirm.
CommitResource, CommitAdvanced protocol path for custom runtimes and batches.
ControlCapability, UsageThe authority path. Scope, attribute, meter, audit.
StorageData Source, Direct Postgres ConnectorExisting app tables stay canonical behind a signed Data Source. The direct connector is an opt-in path where Ablo opens a Postgres connection.

Use cases

  • Let agents write to shared state — Give an AI agent scoped, revocable write access to your typed data.
  • Coordinate multiple actors — Use intents to broadcast pre-write declarations across humans and agents.
  • Audit every agent action — Trace any write back to a human in one query.
  • Build collaborative editors — Humans and agents on the same record, with realtime updates and stale-read protection.
  • Meter and gate API usage — Per-key, per-team usage reports and quota enforcement.
  • Integrate with A2A and MCP — Speak the same protocols as Claude, Cursor, Gemini.

Concepts

  • Model Methods — Load and write typed state.
  • Integration Guide — The normal app path and optional pieces.
  • Guarantees — Confirmed writes, optimistic state, stale-write protection, and agent lifecycle.
  • Intent — Broadcast proposed work before committing.
  • Advanced Commit API — Apply custom batch mutations.
  • Connect Your Database — Where data lands when your app database is canonical.
  • Receipt — Confirm what landed.
  • Capability — Signed credentials for a bounded actor, operation set, sync group, and lease.
  • Usage — Metering and audit dimensions. One agent run is a claim (its intent id is the causal link recorded on every write); cost and audit surface through Usage, not a separate run envelope.

Examples

  • AI SDK Tool — Put Ablo inside an AI SDK tool call.
  • Existing Python Backend — Add multiplayer and future agent writes without replacing a Python API server.
  • Agent + Human — Yield when a human is editing the same task.
  • Server Agent — Schema-backed worker plus advanced schema-less run.
  • Next.js — App-router setup with React bindings.

Runtime builds

  • @abloatai/ablo — schema-powered sync client for typed model operations, realtime, intents, and receipts.
  • Ablo({ apiKey }) — advanced resource client for runtimes that intentionally cannot import a schema.

More

  • README — product overview and first example.
  • AGENTS.md — short installation guidance for coding assistants.
  • Changelog — what shipped recently.