Neon
Postgres for agents
Description
Neon is a serverless Postgres platform that lets your agents create and manage databases on demand. It supports ephemeral or long-lived Postgres instances for storing structured data.
Prerequisites
- A Neon account. If you do not have one, sign up at Neon.
- Get your API key from the Neon Console.
- The tool will automatically install required dependencies:
- neon-api
- psycopg2-binary
Installation
Configuration
Available Actions
The following actions are automatically included when you add the Neon tool to your agent:
-
create_database
Creates a new Neon project and returns a connection URI. Default settings create a database calledneondb
with theneondb_owner
role.The agent’s response to errors will depend on its reasoning about the specific situation. It may retry a failed action, but this behavior is probabilistic rather than deterministic. -
execute_sql_ddl
Run schema commands (e.g.,CREATE TABLE
) using a connection URI and SQL command. Transactions are automatically handled. -
run_sql_query
Run data queries (e.g.,SELECT
,INSERT
) using a connection URI and SQL query. Results are returned as formatted strings.
Using the Tool
Add the Neon tool to your agent:
For a complete example, see AgentStack/examples/web_researcher
where an agent stores collected data in Postgres as part of a multi-agent workflow.
Usage Note
When you add the Neon tool to an existing project, all its tools will be added to every agent in the agents.yaml
file. You may need to remove unused tools to keep each agent’s scope clear.