Skip to main content

Neon

Let agents query and migrate your Neon serverless Postgres database.

Connect it with: Connection details. Neon's own documentation: https://neon.com/docs/connect/connect-from-any-app.

What agents can do​

Connect Neon so the agents working your tasks can reach it. With it connected, they can:

  • Query the database to answer a question or to check what a bug left behind.
  • Run a schema migration on a branch database before it reaches production.
  • Inspect tables, indexes and query plans with psql or the language's Postgres driver.
  • Seed a development branch with test data.

Before you start​

  • A Neon project, and a role and database for agents in it.
  • A Postgres client where the agent runs (psql, or a driver such as psycopg or node-postgres).
  • A connection string for a branch agents may change. Prefer a development branch over the main one.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Neon​

Jaah connects to Neon with connection details, not with a sign-in button.

Connect with an API key​

Find each value first:

  • Connection string: In the Neon console, open the project and select Connect (top of the dashboard); pick the branch, database and role, then copy the connection string with the password shown.

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the Neon card.
  2. Name the secret and choose who can use it.
  3. Fill in Connection string.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to Neon with connection details, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah checks that each value has the right shape, but does not call Neon: the result reads Format checked — Neon was not called. The first real check is when an agent uses it.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: connection_string.

Tell the agent in your task description which secret to use, for example “use the Neon secret org/neon”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Neon once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Neon's side too, delete the database role at Neon or change its password.

Limitations​

  • Jaah cannot open a Postgres connection to test: it adds no database drivers. Test checks that the string is a Neon connection string and that its host is a public address. The first real check is the agent's first query.
  • The string carries one role and one database. Add a secret per branch or role agents need.
  • Pooled strings (host ending in -pooler) suit many short queries; use the direct string for migrations that need session features.
  • Agents can do only what the connected Neon database role allows.

Troubleshooting​

Test says the connection string is not in the format Neon uses

Copy the string from Connect with the password shown (not masked). It must start with postgresql:// and name a host ending in neon.tech.

The agent's query fails with 'password authentication failed'

The role's password was reset. Copy a new connection string from Connect and select Replace on the secret.

The agent's connection is refused from its address

Neon IP Allow may be on for the project. Add the agent's address under Settings > Network security, or turn the rule off for the branch.

Still stuck? Select Test and read the result: it names the first value that is missing or not in the shape Neon uses. It does not call Neon, so Neon's own errors show only in the agent's session.

FAQ​

Can I use the Neon API instead?

Not on this card. It connects agents to a database; managing projects through the Neon API needs a custom connector.

Does a sleeping compute break the Test?

No. Test does not connect, and the first agent query wakes the compute, which takes a moment.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Neon account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.