Agent-native backend

The backend your coding agent can actually operate.

Database, auth, storage-grade policies, and tools — in one Go binary. Deny-by-default security, errors that tell an agent how to fix themselves, and native MCP. Open source, runs anywhere.

$ go build ./cmd/purplesparrow && ./purplesparrow
Apache-2.0 Go · single binary SQLite-first · Postgres for scale MCP-native deny-by-default

See it think

Watch an agent hit a wall — and climb it.

Deny-by-default means the first request is supposed to fail. The difference: the error hands the agent the fix, so it recovers on its own — no human in the loop.

agent ↔ purplesparrow live

Why it exists

Generic backends were built for humans clicking dashboards.

Coding agents operate backends through APIs — and they fail silently, leak data through missing rules, and can't discover what a backend can do. Purple Sparrow is designed so an agent can drive it correctly and recover on its own.

Secure by default

Access is deny-by-default. An app-layer policy engine compiles rules into parameterized SQL — with USING and WITH CHECK, so an agent can't accidentally expose or reassign data. Fuzz-tested.

Self-correcting

Every error carries machine-readable remediation and next_actions. When an agent hits a wall, the response tells it exactly how to get past it.

Discoverable

One call to /meta returns the whole backend's shape. Docs are served over the API. An advisor lints the configuration. The agent never has to guess.

How it works

From one command to a governed backend.

Run the binary

One static binary, embedded SQLite — no dependencies. Point PS_DATABASE_URL at Postgres when you scale.

Define tables & policies

POST /v1/tables, then grant access with a policy. Nothing is readable until a rule says so.

Connect your agent

purplesparrow mcp exposes the whole backend as MCP tools for Cursor, Claude, and friends.

Let it build

The agent introspects, acts, and self-corrects from error remediation — like a backend engineer.

# create a table (id + created_at are automatic)
POST /v1/tables
{ "name": "todos", "columns": [
  { "name": "title",    "type": "text" },
  { "name": "owner_id", "type": "text" } ] }

# deny-by-default — grant owner-scoped reads
POST /v1/policies
{ "table": "todos", "action": "select",
  "roles": ["authenticated"],
  "using": "auth.uid() = owner_id" }

# one call returns the whole backend shape
GET /meta  → tables · columns · policies

What's inside

Data + policy

User tables, records CRUD, PostgREST-style filters — every read row-filtered, every write checked.

Auth

Email/password, RS256 JWTs published via JWKS, single-use refresh rotation, hashed API keys.

Storage

Buckets & objects with ownership-scoped access, public buckets, and presigned URLs — local filesystem or S3.

Functions

Edge functions as sandboxed WASM (WASI/wazero): no fs, net, or subprocess; explicit secrets; timeout & memory caps.

Realtime

Row-change events over SSE, filtered per subscriber by the policy engine — you only see what you may read.

Agent layer

Docs-over-API, per-agent memory, and an advisor that flags risky configuration.

Dashboard + MCP

A dependency-free admin console in the binary, plus serve / mcp / mcp-config for agents.

One binary, three tiers

SQLite + local FS solo; Postgres + S3 at scale — switch with env vars, not a rebuild.

Give your agent a backend it understands.

Open source, Apache-2.0. Clone it, run it, and point your agent at it in minutes.