Skip to content

neondatabase/neon-for-agent-platforms

Repository files navigation

Neon for Agent Platforms

Sample code and a companion Agent Skill for the Neon AI Agent Program, targeting products that provision and operate Neon Postgres for their users (agent platforms, codegen tools, multi-tenant SaaS).

Scope: Use this repo for Agent Program orchestration (dual-org fleets, project transfer, per-tenant provisioning, compound checkpoints, and Consumption API). For connection strings, drivers, ORMs, and general Neon app integration, use the neon-postgres skill and Neon docs first.

Official Neon docs:


Available Skills

Neon Postgres Agent Platforms

neon-postgres-agent-platforms

Guidance for agent platforms that provision and operate Neon Postgres at scale.


Quick start

Install

npx skills add neondatabase/agent-skills -s neon-postgres
npx skills add neondatabase/neon-for-agent-platforms -s neon-postgres-agent-platforms

Clone and run

git clone https://github.com/neondatabase/neon-for-agent-platforms.git
cd neon-for-agent-platforms/scripts
npm install
cp .env.example .env
npm run build
# Set NEON_API_KEY (see .env.example)

npm run neon:list-projects
npm run branch -- list
npm run consumption
npm run auth-users -- meta
npm run versioning-flow # NEON_API_KEY + NEON_PROJECT_ID in .env

Fleet and org model (summary)

Partners typically run two Neon organizations so free-tier users and paying customers land in separate pools. Your control plane picks which org when creating a tenant project; upgrades often mean transferring into the paid org and raising quotas. Use organization API keys per org and a personal API key for cross-org transfer.

Org Typical role
Sponsored free org Free-tier end users (within program rules on neon.com)
Paid org Paying customers (metered per Agent Plan)
flowchart LR
  subgraph yours [Your platform]
    CP[Control plane]
  end
  subgraph neon_free [Neon sponsored org]
    F[Free-tier DBs]
  end
  subgraph neon_paid [Neon paid org]
    P[Paid DBs]
  end
  CP -->|"Org API key"| F
  CP -->|"Org API key"| P
Loading

Repository layout

neon-for-agent-platforms/
├── LICENSE
├── README.md
├── scripts/                           # Runnable TS samples (npm run build)
└── skills/neon-postgres-agent-platforms/
    ├── SKILL.md                       
    └── references/                    # Docs + symlinked script sources
Path Purpose
scripts/ Runnable @neon/sdk samples
skills/neon-postgres-agent-platforms/ Companion agent skill, reference docs, and symlinked sources

Support

License

Apache 2.0 — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages