# Forkbase > Forkbase is a self-hosted backend for apps where AI agents write data: Postgres tables over a PostgREST-style REST API, auth, storage, realtime and jobs (Supabase-compatible, so supabase-js works), plus a fork per agent run. An agent's changes happen in a private copy-on-write world; a merge policy merges them, holds them for a person, or reports a conflict; any merge can be undone. One binary; runs over your Postgres 16+ or the bundled Chronos engine. Free to self-host under FSL-1.1-ALv2. Key facts for agents: - Every agent change goes through a run: start_run, run_sql, run_changes, propose_run. `held` is a normal outcome: stop and tell the user; never retry, split the change, or loosen a policy. - Keys: `anon` (browsers), `service_role` (servers only, bypasses RLS). Tokens: `fba_` agent, `fbr_` run, `fbj_` job, `fbm_` MCP. - Agents, jobs and MCP never approve, reject or undo; only a person (service key or approval link) does. - Every server serves this file at `/llms.txt`, all docs at `/llms-full.txt`, and every doc as installable skills for coding agents: `curl -fsSL /skills/install.sh | sh` (into `.claude/skills`). ## Docs Every page is on https://forkbase.tech/docs, and as Markdown at the same address plus `.md`. - [Getting started](https://forkbase.tech/docs/getting-started.md): install, start, first table, first agent run - [Concepts](https://forkbase.tech/docs/concepts.md): runs, worlds, merge policies, held runs, undo, keys and tokens, database modes - [Set up with an AI agent](https://forkbase.tech/docs/agent-setup.md): one prompt that installs Forkbase or connects an app - [Auth](https://forkbase.tech/docs/auth.md): sign-up, passwords, magic links and codes, Google and GitHub, PKCE, admin, RLS - [Database and REST](https://forkbase.tech/docs/rest.md): `/rest/v1` reads, filters, writes, embedding, errors - [Realtime](https://forkbase.tech/docs/realtime.md): table changes and broadcast over WebSocket - [Storage](https://forkbase.tech/docs/storage.md): buckets, files, signed URLs, policies, local or S3 - [Agents](https://forkbase.tech/docs/agents.md): runs, propose outcomes, policy rules, approvals, webhooks, events, undo - [Jobs](https://forkbase.tech/docs/jobs.md): TypeScript and Python functions, retries, steps, sleep, schedules, triggers, agent functions - [MCP](https://forkbase.tech/docs/mcp.md): the MCP server, its tools, OAuth 2.1, connecting Claude Code, Cursor, Codex - [SDKs](https://forkbase.tech/docs/sdks.md): `forkbase` for TypeScript and Python, supabase-js - [Dashboard](https://forkbase.tech/docs/dashboard.md): the studio at `/dashboard`, `/platform/v1` ## Reference - [Configuration](https://forkbase.tech/docs/configuration.md): every `forkbase.toml` key and `FORKBASE_*` variable with defaults - [CLI](https://forkbase.tech/docs/cli.md): init, start, migrate, keys, status, deploy, invoke - [HTTP reference](https://forkbase.tech/docs/http-reference.md): every route, its credential, error shapes - [Self-hosting](https://forkbase.tech/docs/self-hosting.md): Docker, TLS proxy, systemd, production checklist, backups, upgrades - [Troubleshooting](https://forkbase.tech/docs/troubleshooting.md): common errors and fixes ## Skills - [Skills for coding agents](https://forkbase.tech/docs/skills.md): the pack and how to install it (`curl -fsSL /skills/install.sh | sh`) - [forkbase](https://github.com/2090-labs/forkbase/blob/main/skills/forkbase/SKILL.md): building apps on Forkbase; routes to every reference and the recipes - [Recipes](https://github.com/2090-labs/forkbase/blob/main/skills/forkbase/references/recipes.md): common tasks end to end (Next.js sign-in, RLS, uploads, agents, jobs, webhooks, moving from Supabase) - [forkbase-agent](https://github.com/2090-labs/forkbase/blob/main/skills/forkbase-agent/SKILL.md): how an agent works in a Forkbase database - [forkbase-setup](https://forkbase.tech/setup.md): how a coding agent installs Forkbase or connects an app, one question at a time ## Optional - [All docs in one file](https://forkbase.tech/llms-full.txt) - [Changelog](https://forkbase.tech/changelog): every release, newest first ([RSS](https://forkbase.tech/changelog.xml)) - [Example: a claims desk](https://forkbase.tech/docs/example-claims.md): two agents, two policies, on `docker compose up` - [Roadmap](https://github.com/2090-labs/forkbase/blob/main/docs/ROADMAP.md)