neon-postgres-agent-platforms

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Neon AI Agent Program

Neon AI Agent 计划

Companion to
**neon-postgres**
(install that first). This skill covers fleet-scale control plane for the Neon Agent Program: dual-org layout, project transfer, per-tenant provisioning, compound checkpoints, consumption, commercial terms, and when to give agents Management API access via
@neon/tools
.
For connection strings, drivers, ORMs, branching tutorials, Auth in apps, Data API, and Neon's hosted MCP, use
**neon-postgres**
and Neon docs.
作为
**neon-postgres**
的配套技能(请先安装该技能)。本技能涵盖Neon Agent Program的集群级控制平面相关内容:双组织架构、项目迁移、按租户配置、复合检查点、消耗统计、商业条款,以及何时通过
@neon/tools
为Agent提供Management API访问权限。
如需了解连接字符串、驱动程序、ORM、分支教程、应用中的身份验证、数据API以及Neon托管的MCP,请使用
**neon-postgres**
Neon官方文档

Scope

适用范围

Use
**neon-postgres**
for general Neon usage. Use this skill when the question involves:
  • Dual-org economics and API keys (personal, organization, project-scoped)
  • @neon/sdk
    for the control plane vs
    @neon/tools
    for agent-facing Management API access
  • Project-per-tenant provisioning and transfer
  • Fleet-wide snapshot/restore orchestration and housekeeping
  • Compound checkpoints
  • Consumption polling for metered fleets
  • Agent Plan commercial terms (with links, not invented numbers)
  • Partner support paths
通用Neon使用场景请使用
**neon-postgres**
。当问题涉及以下内容时,请使用本技能
  • 双组织架构的经济模型与API密钥(个人、组织、项目级)
  • 用于控制平面的
    @neon/sdk
    与面向Agent的Management API访问工具
    @neon/tools
    的选择
  • 按租户配置项目及项目迁移
  • 集群范围内的快照/恢复编排与运维管理
  • 复合检查点
  • 计量集群的消耗轮询
  • Agent Plan的商业条款(请参考链接内容,请勿自行编造数据)
  • 合作伙伴支持路径

Install Skills

安装技能

bash
npx skills add neondatabase/agent-skills -s neon-postgres
bash
npx skills add neondatabase/agent-skills -s neon-postgres

Assistants: what you can do after install

安装后可实现的功能

With
**neon-postgres**
and this skill loaded, you have enough context for platform-level Neon work: dual-org layout, provisioning a project for a new tenant, compound checkpoints, org-wide consumption polling, and transfer/upgrade flows—without the user pasting long documentation.
Where runnable examples live: TypeScript samples run from this skill’s
scripts/
directory (
package.json
,
npm run …
). The
**references/**
directory keeps markdown guides beside the runnable examples; MANAGEMENT_API_SAMPLES.md is the script catalog and env map. The human Quick start is the root README.
加载
**neon-postgres**
本技能后,你将具备Neon平台级工作的完整上下文:双组织架构配置、为新租户创建项目、复合检查点、组织级消耗轮询,以及项目迁移/升级流程——无需用户粘贴冗长的文档内容。
可运行示例位置: TypeScript示例存放在本技能的
scripts/
目录下(通过
package.json
npm run …
执行)。
**references/**
目录中存放了与可运行示例对应的Markdown指南;MANAGEMENT_API_SAMPLES.md是脚本目录及环境变量映射文档。面向开发者的快速入门指南为根目录下的README

SDK vs agent tools

SDK与Agent工具对比

Your control plane should call
@neon/sdk
. The sample scripts in this repo do.
The Neon MCP server is a custom agent-facing layer: MCP tool handlers written over
@neon/sdk
.
Use
@neon/tools
when you want to give agents on your platform direct Neon management access without writing those handlers. It publishes generated wrappers for a selected set of SDK methods as agent tools, with adapters for MCP, Eve, and Mastra.
These public client methods are not tools:
projects.create
,
branches.create
,
operations.waitFor
,
postgres.roles.password
, and
storage.objects.get
. Use
projects.createAndConnect
and
branches.createWithCompute
for creates that attach compute and return a connection string. Waiting is what the write tools already do. Generated schemas are strict: a newly added API field is rejected until you upgrade
@neon/tools
, or call
@neon/sdk
directly.
Selectors are SDK paths (
projects.list
). Call
publishedId
for the model-facing id (
projects.list
list_projects
).
toolIds
lists every selector. MCP 2.x uses
@neon/tools/mcp
; MCP 1.x uses
@neon/tools/mcp-v1
.
ts
import { McpServer } from "@modelcontextprotocol/server";
import { createNeonTools } from "@neon/tools";
import { registerNeonTools } from "@neon/tools/mcp";

const apiKey = process.env.NEON_API_KEY;
if (!apiKey) throw new Error("NEON_API_KEY is required");

const tools = createNeonTools({
  apiKey,
  tools: [
    "projects.list",
    "projects.createAndConnect",
    "branches.createWithCompute",
  ] as const,
});

const server = new McpServer({ name: "neon", version: "1.0.0" });
registerNeonTools(server, tools);
apiKey
accepts a function so a short-lived token can be refreshed per request. A remote MCP server that already authenticated the client can omit
apiKey
at construction;
registerNeonTools
then sends
authInfo.token
.
MCP annotations are advisory. Hosts using
@neon/tools/mcp
must read
neon/requiresApproval
in MCP
_meta
and enforce their own approval policy before execution. The Eve and Mastra adapters map that flag to Eve's
approval
hook and Mastra's
requireApproval
. Every non-read operation is marked as requiring approval, as are reads that return connection credentials.
Select only the methods each agent needs. For a tenant-scoped agent, inject the path
project_id
so the model cannot pick another project on tools that take that path parameter:
ts
const tools = createNeonTools({
  apiKey,
  tools: ["projects.get", "branches.createWithCompute"] as const,
  inject: {
    projectId: tenantProjectId,
    omitFromSchema: true,
  },
});
inject.projectId
fills URL path
project_id
only. It does not hide query or body fields with that name, and it does not constrain tools that have no project path (for example
projects.list
). Pair it with a project-scoped API key when the agent must not see the rest of the org.
你的控制平面应调用
@neon/sdk
。本仓库中的示例脚本均采用此方式。
Neon MCP服务器是一个自定义的面向Agent的层:基于
@neon/sdk
编写的MCP工具处理器。
当你希望为平台上的Agent提供直接的Neon管理访问权限,且无需自行编写处理器时,请使用
@neon/tools
。它会将选定的SDK方法集生成为Agent工具,并提供适配MCP、Eve及Mastra的适配器。
以下公共客户端方法不属于工具范畴:
projects.create
branches.create
operations.waitFor
postgres.roles.password
storage.objects.get
。创建需附加计算资源并返回连接字符串的实例时,请使用
projects.createAndConnect
branches.createWithCompute
。等待操作已由编写好的工具实现。生成的模式为严格模式:新增的API字段会被拒绝,直到你升级
@neon/tools
或直接调用
@neon/sdk
选择器为SDK路径(如
projects.list
)。调用
publishedId
可获取面向模型的ID(
projects.list
list_projects
)。
toolIds
列出了所有选择器。MCP 2.x使用
@neon/tools/mcp
;MCP 1.x使用
@neon/tools/mcp-v1
ts
import { McpServer } from "@modelcontextprotocol/server";
import { createNeonTools } from "@neon/tools";
import { registerNeonTools } from "@neon/tools/mcp";

const apiKey = process.env.NEON_API_KEY;
if (!apiKey) throw new Error("NEON_API_KEY is required");

const tools = createNeonTools({
  apiKey,
  tools: [
    "projects.list",
    "projects.createAndConnect",
    "branches.createWithCompute",
  ] as const,
});

const server = new McpServer({ name: "neon", version: "1.0.0" });
registerNeonTools(server, tools);
apiKey
支持传入函数,以便在每次请求时刷新短期令牌。已完成客户端身份验证的远程MCP服务器可在构造时省略
apiKey
;此时
registerNeonTools
会发送
authInfo.token
MCP注释仅作参考。使用
@neon/tools/mcp
的主机必须读取MCP
_meta
中的
neon/requiresApproval
字段,并在执行前实施自身的审批策略。Eve与Mastra适配器会将该标志映射到Eve的
approval
钩子及Mastra的
requireApproval
。所有非读取操作及返回连接凭证的读取操作均标记为需要审批。
仅选择每个Agent所需的方法。对于租户级Agent,注入路径
project_id
,以确保模型无法在接受该路径参数的工具中选择其他项目:
ts
const tools = createNeonTools({
  apiKey,
  tools: ["projects.get", "branches.createWithCompute"] as const,
  inject: {
    projectId: tenantProjectId,
    omitFromSchema: true,
  },
});
inject.projectId
仅填充URL路径中的
project_id
。它不会隐藏同名的查询或请求体字段,也不会限制无项目路径的工具(例如
projects.list
)。当Agent不得访问组织内其他项目时,请将其与项目级API密钥配合使用。
完整API文档:
@neon/tools
README

Gotchas

注意事项

Non-obvious facts agents often get wrong:
  • Checkpoints are compound records. A tenant checkpoint includes source revision + Neon snapshot/branch + secrets/env version + deploy URL + agent metadata. Do not equate "checkpoint" with "Neon branch" alone. See the compound checkpoints doc.
  • Cross-org transfer needs a personal API key (org keys only work inside one org). Projects with GitHub or Vercel integrations in Neon cannot be transferred; the API returns 422 (Transfer projects).
  • After a finalized snapshot restore, the active branch ID changes. Poll operations to completion before reconnecting. Delete orphaned
    (old)
    branches to avoid storage cost.
  • Billing-aligned usage: prefer
    GET /api/v2/consumption_history/v2/projects
    over legacy consumption endpoints. The legacy account-level endpoint has been retired; use the v2 per-project endpoint (legacy consumption guide).
  • V2
    metrics
    parameter values
    (for implementers):
    compute_unit_seconds
    ,
    root_branch_bytes_month
    ,
    child_branch_bytes_month
    ,
    instant_restore_bytes_month
    ,
    snapshot_storage_bytes_month
    ,
    public_network_transfer_bytes
    ,
    private_network_transfer_bytes
    ,
    extra_branches_month
    (consumption metrics).
  • Snapshot schedules are not provided on Agent Plan. Partners implement via snapshot API + their own scheduler.
  • Rates and caps: never invent dollar amounts or limits. Confirm on live neon.com docs.
Agent常易混淆的非直观事实:
  • 检查点是复合记录。租户检查点包含源码版本 + Neon快照/分支 + 密钥/环境变量版本 + 部署URL + Agent元数据。请勿将“检查点”等同于“Neon分支”。详情请查看复合检查点文档
  • 跨组织迁移需要个人API密钥(组织密钥仅能在单个组织内使用)。Neon中集成了GitHub或Vercel的项目无法迁移;API会返回422错误(项目迁移文档)。
  • 完成快照恢复后,活跃分支ID会变更。请在重新连接租户应用前等待操作完成。删除孤立的
    (old)
    分支以避免存储成本。
  • 与账单对齐的使用数据:优先使用
    GET /api/v2/consumption_history/v2/projects
    接口,而非旧版消耗统计接口。旧版账户级接口已停用;请使用v2版本的按项目统计接口(旧版消耗统计指南)。
  • V2版本
    metrics
    参数值
    (供开发者参考):
    compute_unit_seconds
    root_branch_bytes_month
    child_branch_bytes_month
    instant_restore_bytes_month
    snapshot_storage_bytes_month
    public_network_transfer_bytes
    private_network_transfer_bytes
    extra_branches_month
    消耗统计指标文档)。
  • 快照调度不属于Agent Plan提供的服务。合作伙伴需通过快照API结合自有调度器实现。
  • 费率与上限:请勿自行编造金额或限制。请以neon.com官方文档为准。

Agent Plan and two organizations

Agent Plan与双组织架构

Partners run two Neon organizations:
OrgRole
Sponsored free orgFree-tier end users (within program rules)
Paid orgPaying customers (metered per Agent Plan)
Key points:
  • Dollar rates, credits, and project caps come only from the live Agent Plan and neon.com/agents. Do not invent numbers.
  • Organization API key: automation inside one org (create project, set quotas).
  • Personal API key: required to transfer a project between orgs when a customer changes tier, then PATCH quotas to match the new tier.
  • Project-scoped API key: member-level access to one project only—narrower than an org key and useful for per-tenant runtime or automation that must not touch the rest of the org. Cannot create new projects org-wide; invalid if the project is transferred out of the org.
合作伙伴需运行两个Neon组织
组织类型角色
赞助免费组织面向免费层级终端用户(需符合项目规则)
付费组织面向付费客户(按Agent Plan计量收费)
核心要点:
  • 费率、额度及项目上限请以最新的Agent Planneon.com/agents为准。请勿自行编造数据。
  • 组织API密钥:用于单个组织内的自动化操作(创建项目、设置配额)。
  • 个人API密钥:当客户变更层级时,需使用该密钥在组织间迁移项目,之后通过PATCH请求调整配额以匹配新层级。
  • 项目级API密钥:仅对单个项目拥有成员级访问权限——权限范围比组织密钥更窄,适用于不得访问组织内其他项目的租户运行时或自动化场景。无法在组织范围内创建新项目;若项目迁移出组织,该密钥将失效。

HIPAA

HIPAA合规

  • Agent Plan includes HIPAA with no extra fee. Partners must still follow Neon's published HIPAA program (workflows, agreements, configuration).
  • To get access or start the process, reach out to your primary Neon contact.
  • This skill is not legal advice.
  • Agent Plan包含HIPAA合规支持,无需额外付费。合作伙伴仍需遵循Neon发布的HIPAA合规计划(工作流程、协议、配置要求)。
  • 如需获取访问权限或启动合规流程,请联系你的Neon专属对接人
  • 本技能不提供法律建议。
相关链接:Neon上的HIPAA合规

Fleet shape: project-per-tenant

集群架构:按租户分配项目

  • Project-per-tenant is Neon's documented fleet pattern: each tenant you provision for (an end user, a customer app, or an agent workload) gets its own dedicated Neon project. That project is the isolation boundary for branches, databases, roles, and computes—not a shared Postgres cluster where you only partition by schema.
  • Isolation and billing: Separate projects give complete data and resource isolation between tenants, keep consumption limits and billing straightforward at project scale (aligned with Agent Plan metering elsewhere in this skill), and match how the Neon Management API and Console are structured (project-scoped create, quota, and lifecycle calls).
  • 按租户分配项目是Neon官方推荐的集群模式:你为每个租户(终端用户、客户应用Agent工作负载)分配一个独立的Neon项目。该项目是分支数据库角色计算资源的隔离边界——而非仅通过模式分区的共享Postgres集群。
  • 隔离与计费:独立项目可为租户提供完全的数据与资源隔离,使消耗限制与计费在项目层面更清晰(与本技能中Agent Plan的计量方式对齐),同时匹配Neon Management API与控制台的结构(项目级的创建、配额及生命周期调用)。

Staging and production

staging与生产环境

  • For each tenant project, treat staging versus production (and ephemeral previews) as branch- and snapshot-driven lifecycle inside that project—use Snapshots and database versioning and Sandbox and preview databases below for fleet orchestration, not a second project by default.
  • Agent and app builders: separate your platform's environments (for example how you host the builder or control plane) from each tenant's staging and production branches—avoid conflating "our production service" with "the tenant's production branch" in ledgers and automation.
  • Some embedded products also split an end customer's production and development Neon assets across separate orgs for trust, keys, and billing boundaries; when that applies, read Isolation beyond branches (project and org edge cases) next.
  • 对于每个租户项目,将staging与生产环境(以及临时预览环境)视为该项目内基于分支与快照的生命周期——请使用下文的快照与数据库版本控制沙箱与预览数据库进行集群编排,默认情况下无需为其创建第二个项目。
  • Agent与应用构建器:请将你的平台环境(例如构建器或控制平面的托管方式)与每个租户的staging及生产分支分开——避免在台账与自动化流程中混淆“我们的生产服务”与“租户的生产分支”。
  • 部分嵌入式产品还会将终端客户的生产与开发Neon资产拆分到不同组织中,以实现信任、密钥及计费边界的隔离;若适用此场景,请继续阅读下文的分支之外的隔离(项目与组织边缘场景)
相关链接: AI Agent集成指南

Isolation beyond branches (project and org edge cases)

分支之外的隔离(项目与组织边缘场景)

Use project- or org-level splits when tenant scope or trust needs go beyond branch- and snapshot-first staging and production in Fleet shape. Embedded products may isolate an end customer's production versus development databases across separate Neon orgs, not only branches—tighter billing, org API keys, and console boundaries while you still manage branches within each org.
Project-level isolation (multiple projects per tenant or workload):
  • Stronger blast radius if a connection string or role is compromised—one leak should not span unrelated workloads.
  • Separate operational lifecycles (for example a disposable analytics or migration sandbox versus production data) when automation or ownership would otherwise collide in one Postgres.
  • Different teams or automation with conflicting migration or admin rights.
  • Harder compliance or data-mixing rules where a single database must not host combined workloads.
Each extra project adds fleet surface area: more API keys, more consumption rows, more housekeeping, and higher operational cost—keep project-per-tenant as the default unless a boundary above clearly applies.
Org-level isolation (beyond sponsored free versus paid):
  • The two-organization layout in Agent Plan and two organizations is the commercial split (free-tier users versus paying customers). That pattern can stack with an embedded product split: for example prod org versus dev org per end customer so playground databases never share org scope with shipped production. Keep a clear internal map of which org owns which environment and tier.
  • Separately, partners sometimes need additional Neon orgs or accounts for contracting (enterprise “their org only”), reseller or MSP models, or geographic or legal separation—product defaults and limits belong on live docs; do not invent caps.
  • Organization API keys are scoped to one org. Cross-org moves use a personal API key and project transfer, as in Gotchas—do not assume an org key can operate across orgs. Project-scoped keys are further limited to a single project (API keys).
Embedding hygiene:
  • Map each platform service (control plane, tenant runtime, billing or consumption jobs) to least-privilege keys; do not reuse production keys in sandboxes at the wrong layer.
  • When prod and dev for an end customer live in different Neon orgs, scope automation per org (typically one organization API key per org) and persist
    org_id
    with
    project_id
    /
    branch_id
    so jobs and restores target the correct side.
  • Keep your ledger (
    project_id
    ,
    branch_id
    , org, checkpoint metadata) aligned with the isolation layer you chose so restores, transfers, and audits stay consistent.
当租户范围或信任需求超出集群架构优先使用分支与快照的staging及生产环境隔离时,请使用项目级组织级拆分。嵌入式产品可能会将终端客户的生产与开发数据库隔离到不同的Neon组织中,而非仅使用分支——这样可实现更严格的计费、组织API密钥及控制台边界,同时你仍可在每个组织内管理分支。
项目级隔离(每个租户或工作负载对应多个项目)
  • 若连接字符串或角色泄露,可缩小影响范围——一次泄露不应波及无关工作负载。
  • 当自动化或所有权在单个Postgres中会产生冲突时,可为不同工作负载提供独立的运维生命周期(例如一次性分析或迁移沙箱与生产数据)。
  • 适用于不同团队或自动化流程存在冲突的迁移或管理权限的场景。
  • 适用于合规要求严格或禁止数据混合的场景,即单个数据库不得承载混合工作负载。
每个额外项目都会增加集群的运维复杂度:更多API密钥、更多消耗统计记录、更多运维工作及更高的运营成本——请将按租户分配项目作为默认架构,除非明确需要更高层级的隔离边界。
组织级隔离(超出赞助免费与付费的拆分)
  • Agent Plan与双组织架构中的双组织布局是基于商业需求的拆分(免费层级用户与付费客户)。该模式可与嵌入式产品的拆分方式叠加:例如为每个终端客户设置生产组织与开发组织,确保测试数据库永远不会与已上线的生产数据库共享组织范围。请清晰记录内部的组织与环境、层级的对应关系。
  • 此外,合作伙伴有时因合同需求(企业级“专属组织”)、经销商或MSP模式、地域或法律隔离等原因,需要额外的Neon组织或账户——产品默认值与限制请以官方文档为准,请勿自行编造上限。
  • 组织API密钥的作用范围仅限于单个组织。跨组织迁移需使用个人API密钥及项目迁移功能,如注意事项中所述——请勿假设组织密钥可跨组织操作。项目级密钥的权限范围进一步缩小至单个项目(API密钥文档)。
嵌入式产品最佳实践
  • 为每个平台服务(控制平面、租户运行时、计费或消耗统计任务)分配最小权限的密钥;请勿在错误层级的沙箱中复用生产密钥。
  • 当终端客户的生产与开发环境位于不同Neon组织时,请为每个组织单独配置自动化流程(通常为每个组织对应一个组织API密钥),并将
    org_id
    project_id
    /
    branch_id
    一起存储,确保任务与恢复操作指向正确的组织。
  • 保持你的台账(
    project_id
    branch_id
    、组织、检查点元数据)与所选的隔离层级一致,确保恢复、迁移及审计操作的一致性。

Snapshots and database versioning

快照与数据库版本控制

For snapshot semantics, active-branch patterns, and restore tutorials, defer to
**neon-postgres
** and AI database versioning. Here, emphasize tenant fleets:
  • Persist snapshot and branch IDs per tenant in your ledger. Tie each to non-Neon state via compound checkpoints.
  • After finalized restores, branch IDs change and orphaned
    (old)
    branches accumulate. Automate cleanup and update stored IDs.
  • Poll operations to completion before reconnecting tenant apps.
  • Product semantics (snapshot counts per tier, Beta pricing dates) change. Confirm on Agent Plan docs.
Typical platform-level checkpoint triggers:
  • Before promoting generated schema changes for a tenant
  • Start or end of an agent run that mutates a tenant's database
  • Before destructive migrations or customer-visible restore actions
关于快照语义、活跃分支模式及恢复教程,请参考
**neon-postgres**
AI数据库版本控制。本文重点介绍租户集群相关内容:
  • 在你的台账中为每个租户存储快照与分支ID。通过复合检查点将其与非Neon状态关联。
  • 完成恢复后,分支ID会变更,孤立的
    (old)
    分支会累积。请自动化清理并更新存储的ID。
  • 在重新连接租户应用前,请等待操作完成。
  • 产品语义(各层级的快照数量、Beta版定价日期)会发生变化。请以Agent Plan文档为准。
典型的平台级检查点触发场景:
  • 为租户推广生成的模式变更前
  • 启动或结束会修改租户数据库的Agent运行实例前
  • 执行破坏性迁移或客户可见的恢复操作前

Sandbox and preview databases

沙箱与预览数据库

Use this when a partner needs per-tenant preview or sandbox databases for generated apps. ("How do I create a branch?" for a single app goes to
**neon-postgres**
.)
  • Track
    project_id
    /
    branch_id
    per customer / agent run when spinning previews via the Management API.
  • Branch and storage counts scale with fleet size. Monitor caps and garbage-collect idle previews.
  • Short
    suspend_timeout_seconds
    on preview computes reduces cost.
  • Pair branch/snapshot lifecycle with secrets rotation and deploy URLs via compound checkpoints.
当合作伙伴需要为生成的应用提供租户级预览或沙箱数据库时,请使用本部分内容。(单个应用的“如何创建分支?”问题请使用
**neon-postgres**
。)
  • 通过Management API创建预览环境时,请为每个客户/Agent运行实例跟踪
    project_id
    /
    branch_id
  • 分支与存储数量会随集群规模增长。请监控上限并清理闲置的预览环境。
  • 为预览计算资源设置较短的
    suspend_timeout_seconds
    可降低成本。
  • 通过复合检查点将分支/快照生命周期与密钥轮换及部署URL关联。
相关链接: AI Agent集成指南

Cost, consumption, and entitlements

成本、消耗与权益

  • Never invent pricing, quotas, or limits. Confirm on Agent Plan and consumption metrics.
  • Use
    GET /api/v2/consumption_history/v2/projects
    for billing-aligned fields. Legacy endpoints differ. The legacy account-level endpoint has been retired; use v2 per-project metrics instead (legacy guide).
  • V2
    metrics
    query strings are exactly:
    compute_unit_seconds
    ,
    root_branch_bytes_month
    ,
    child_branch_bytes_month
    ,
    instant_restore_bytes_month
    ,
    snapshot_storage_bytes_month
    ,
    public_network_transfer_bytes
    ,
    private_network_transfer_bytes
    ,
    extra_branches_month
    .
  • Poll consumption roughly every 15 minutes. Polling does not wake suspended computes.
  • Run
    auth-users.ts meta
    from scripts/ for a routing map (Neon Auth REST vs Postgres roles vs consumption APIs).
  • 请勿自行编造定价、配额或限制。请以Agent Plan消耗统计指标为准。
  • 使用
    GET /api/v2/consumption_history/v2/projects
    接口获取与账单对齐的字段。旧版接口存在差异。旧版账户级接口已停用;请使用v2版本的按项目统计指标(旧版指南)。
  • V2版本
    metrics
    查询字符串的有效值为:
    compute_unit_seconds
    root_branch_bytes_month
    child_branch_bytes_month
    instant_restore_bytes_month
    snapshot_storage_bytes_month
    public_network_transfer_bytes
    private_network_transfer_bytes
    extra_branches_month
  • 大约每15分钟轮询一次消耗统计。轮询操作不会唤醒已暂停的计算资源。
  • 运行scripts/目录下的
    auth-users.ts meta
    可获取路由映射(Neon Auth REST接口与Postgres角色及消耗统计API的对应关系)。

Organization and project limit increases

组织与项目上限提升

  • Current defaults and ceilings are on Agent Plan and AI Agent integration. Do not invent limits.
  • For project increase requests, email agents@neon.tech with org ID(s), growth context, and timeline. Also flag in shared Slack if available.
  • 当前默认值与上限请以Agent PlanAI Agent集成指南为准。请勿自行编造限制。
  • 如需申请提升项目上限,请发送邮件至agents@neon.tech,并提供组织ID、增长背景及时间线。若有共享Slack渠道,也可在其中提交申请。

Co-marketing

联合营销

  • Co-marketing is an included Agent Plan benefit.
  • Available: joint blog posts, social promotion, hackathon sponsorship, case studies, landing page features.
  • Reach out via shared Slack or your Neon representative with context on what you're building.
  • 联合营销是Agent Plan包含的权益之一。
  • 可提供的合作内容:联合博客文章、社交推广、黑客松赞助、案例研究、落地页展示。
  • 请通过共享Slack渠道或你的Neon对接人联系,告知你的项目背景。
相关链接:Agent Plan

Support

支持服务

  • Shared Slack channel: fastest path for technical questions and urgent issues.
  • Neon representative: account-level requests, custom configuration, escalations.
  • Limit increases: email agents@neon.tech with org ID(s), growth context, and timeline.
  • Billing: raise via Slack or your Neon representative. Credit balances and invoices are in the Neon Console under Billing.
  • Community: Neon Discord · Docs · API reference
  • 共享Slack频道:技术问题与紧急事件的最快解决途径。
  • Neon专属对接人:账户级请求、自定义配置、问题升级。
  • 上限提升申请:发送邮件至agents@neon.tech,并提供组织ID、增长背景及时间线。
  • 账单问题:通过Slack或你的Neon对接人提交。余额与发票可在Neon控制台的账单页面查看。
  • 社区支持Neon Discord · 官方文档 · API参考

Repository samples

仓库示例

Runnable Management API automation from neondatabase/neon-for-agent-platforms.
These scripts use
@neon/sdk
only. Shared utils.ts builds the client and resolves the default branch; the SDK polls async operations (readiness) for you. For agent-facing Management API tools, see SDK vs agent tools above. For SQL access from app code (drivers, pooling, ORMs), use
**neon-postgres
**.
可运行的Management API自动化示例来自neondatabase/neon-for-agent-platforms
这些脚本仅使用
@neon/sdk
。共享的utils.ts用于构建客户端并解析默认分支;SDK会自动轮询异步操作(就绪状态)。如需面向Agent的Management API工具,请参考上文的SDK与Agent工具对比部分。如需从应用代码访问SQL(驱动程序、连接池、ORM),请使用
**neon-postgres**