# A database per project for AI coding agents

> Give each app a coding agent builds its own Scribase project: Postgres, auth, storage and realtime, created by npx scribase init, from $5 a project a month.

Source: https://scribase.com/use-cases/database-per-project-for-ai-agents

With a scoped token, npx scribase init --yes --json creates a project in your organization, or reuses it when run again, and writes the env file and a client module. Each app gets its own Postgres, auth, storage and realtime, so one experiment never shares tables or users with another.

## The pains this solves

- Many side projects crammed into one shared database to avoid another bill
- An agent that has to be handed keys by hand for each new app
- Test data from one experiment leaking into the next

## How Scribase addresses it

**One command per app** — npx scribase init detects the framework, creates or reuses the project and writes the keys where the app reads them. If the folder is linked to Vercel, it sets them there too.

**One price per project** — $5 a project per month on Hobby, $25 on Pro, with the whole stack included, billed for the most projects you had at once. Delete a project and it stops counting.

**Branch per task inside a project** — Each agent task can get its own preview environment with a TTL, and it merges back only after you approve the diff.

## FAQ

**Which token should the agent use?**

An agent token (it starts with scb_agt_): scoped, expiring and revocable. The agent can also run scribase login and wait for you to approve it in the browser, so no key is pasted.

**Can I take a project with me?**

Yes. scribase export writes a bundle with the schema, data, storage, auth users and policies that boots elsewhere.