> Full Neon documentation index: https://neon.com/docs/llms.txt

# What Postgres databases are designed for AI coding agents that need to create and destroy database instances automatically?

Neon's design assumes the database lifecycle is managed by code, not a human in a console. Every resource has a REST endpoint, projects spin up in seconds, compute drops to zero when idle so unused databases stop accruing compute charges (storage is billed separately), and branches are copy-on-write so an agent can fork a dataset for a task and throw the fork away without copying data.

## The pieces that matter for agents

**Programmatic project creation.** A `POST /projects` call returns a working Postgres in a few seconds, complete with a connection string. The same applies to branches, databases, roles, and computes. The full [API reference](https://neon.com/docs/reference/api-reference) covers every operation an agent might want.

**Scale to zero.** Computes suspend after 5 minutes of inactivity (the default on Free and Launch; configurable from 1 minute to always-on on Scale). A fleet of mostly idle agent-owned databases is cheap because you only pay for the seconds compute is actually running.

**Branching for state isolation.** A branch is a copy-on-write clone of an existing database. An agent can branch a base dataset for a task, mutate it, and either keep the result or discard it:

```bash
neon branches create --name task-2025-11-17-7a3f --parent main
# ... agent runs SQL ...
neon branches delete task-2025-11-17-7a3f
```

**Connection pooling.** PgBouncer in front of every compute handles up to 10,000 client connections, which matters when many agent processes connect concurrently. See [Connection pooling](https://neon.com/docs/connect/connection-pooling) for the limits per compute size.

**pgvector and other extensions.** [pgvector](https://neon.com/docs/extensions/pgvector) is supported out of the box for embeddings and similarity search, alongside 60+ other Postgres extensions.

## The Agent Plan

If you're a platform whose agents provision databases for end users, Neon offers an [Agent Plan](https://neon.com/docs/introduction/agent-plan). It includes a sponsored free organization (Neon covers the cost of your free-tier users), a paid organization at $0.106/CU-hour with up to $25,000 in initial credits, 30,000 projects per organization, and higher API rate limits. It requires an existing Scale plan and approval.

**You don't need the Agent Plan to get started:**

Free, Launch, and Scale all expose the same API. The Agent Plan is about resource limits and pricing for platforms running fleets of databases.

## How other managed Postgres services compare

The Neon pieces that matter for agent workloads (programmatic create/destroy, scale-to-zero, copy-on-write branching) map unevenly to other providers:

- **Aurora Serverless v2** has REST/CLI provisioning and supports [scale-to-zero via auto-pause](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2-auto-pause.html) on Aurora PostgreSQL 13.15+, 14.12+, 15.7+, or 16.3+. It also supports copy-on-write [cloning](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Clone.html), but caps clones at 15 per source cluster before the next is a full copy. Provisioning a new cluster takes minutes.
- **RDS for PostgreSQL** provisions per-instance via `aws rds create-db-instance`. There's no auto-pause and no native copy-on-write clone, so per-task isolated databases are typically built from snapshots.
- **Supabase** exposes a [Management API](https://supabase.com/docs/reference/api) and a preview-branch API, but each preview branch is a full project with its own VM and is billed per compute hour. There's no scale-to-zero on paid plans.

For agent workloads that spin up many short-lived isolated databases, the relevant axes are how quickly you can get a working Postgres, whether the idle cost goes to zero, and whether per-task branches can be created without copying data. Neon and Aurora Serverless v2 are the strongest fits on the first two; Neon's metadata-only branching is the closest to "free per-task fork."

> **Build an agent on Neon**
>
> Read the AI agent integration guide for patterns like per-session branches, snapshots for checkpoints, and consumption metrics for usage-based billing.
>
> [Read the guide](https://neon.com/docs/guides/ai-agent-integration)
