All work
Agent stack

Cato

A Cloudflare-native agent that runs on the $5 tier. The current checkpoint is a grounded database librarian you can deploy in one click, and never watch hallucinate your schema.

Role Design + engineering Stack Workers · Durable Objects · SQLite License MIT Status Public · v3 checkpoint 1
Deploy to Cloudflare View the repo
The idea

Most AI agents are expensive and vague. This one is cheap and grounded.

Cato is a personal operations agent built entirely on Cloudflare's edge. A Durable Object holds state, a ReAct loop does the work, and the whole thing is sized to run on the free or $5 plan. It reads its source of truth on every turn and refuses to make things up. The evolution below is real: each version earns the next.

Where it started

Cato-2-Pro

The working system today. Durable-Object orchestrator, skill-first execution, approval tiers, and a local node federation. Multi-channel: Telegram, email, web.

This checkpoint

Cato-3 Librarian

A ground-up rebuild. The first slice is a deployable database librarian: read, write, and govern a SQLite schema with an audit trail and an approval gate.

Cato-3 Pro

The feature-rich agent this is building toward. The functionality of a full assistant, at a fraction of the cost to operate.

Governance

It knows what it is allowed to do.

A server-side SQL classifier sorts every action into a tier before it runs. Reads are free. Writes are logged. Anything that could reshape the database waits for a human.

Read
SELECT · PRAGMA · EXPLAIN

Runs immediately. Questions about the data never need a gate.

Write
INSERT · UPDATE · DELETE

Runs, and lands in an append-only audit log. Every change is accountable.

Schema
CREATE · ALTER · DROP

Queued, not run. The agent proposes; the admin approves in Telegram, or it expires.

Before it went public

An outside review went looking for holes first.

Calling something a deployable template is a promise that a stranger can run it safely. So the code went out for independent engineering review before the repo was opened, and the first audit found three release-blocking gaps at the exact boundaries this project presents as its security model. All three are fixed, each with a test that pins the behavior. A second senior review followed, and its confirmed findings are fixed too.

01

What it found

An admin webhook a stranger could forge. A read-only tier that a crafted statement could still mutate through. An approved schema change that could be recorded as done without having run.

02

What changed

Webhook verification that fails closed when it is unconfigured. A classifier that reads the top-level verb, sees through a common-table expression, and refuses multi-statement SQL outright. A cursor consumed before any approval is granted.

03

How it stays fixed

77 tests run inside workerd against real Durable Object SQLite, not a mock. Continuous integration runs the whole suite on every push, and the badge on the repo is that result, live.

The workflow

Clone it, customize two files, deploy.

The repo is a base template. Everything except your domain is generic infrastructure. You edit the agent's identity prompt and your table definitions. That is the whole job.

01

soul.ts

Tell the agent what it is working with: your tables, your identifier formats, what it must never touch.

02

schema.ts

Add your tables and their comments. Those comments become the agent's ground truth on every call.

# clone, customize, ship
git clone https://github.com/Farmer-Andy/cato-3-librarian my-cato
cd my-cato && npm install

# edit soul.ts + schema.ts

npx wrangler deploy
✓ Published my-cato

# prove it is honest
POST /eval/run
→ veto_triggers: 0 safety bar met

A built-in eval suite scores 19 tasks, including 13 adversarial gate-bypass probes. The number that matters is zero gate violations.

Why it reads well to a team

Grounded, auditable, and cheap enough to leave running.

The manifest is the ground truth

Cato reads a generated schema manifest on every invocation. If an answer is not in the source, it says so instead of guessing.

Nothing hidden over HTTP

Admin endpoints are fail-closed behind a bearer token. An unconfigured deployment exposes only a health check.

Swap models without redeploying

A model registry lives in the database. One Telegram command changes the active LLM, with automatic fallback.

All work Next: Answer Bubble