superagnt

Postgres database for AI agents (a Postgres MCP server)

A real Postgres database for your workspace that your agent creates tables in, queries with SQL and writes to, from Claude, ChatGPT or Codex, with no connection string to hand out. It is created on the first call once your organization has a plan, a credit package or a running trial; ours was ready 13 seconds after that call.

// platform tool

What it touches: only your workspace's own database. Updates and deletes need a filter, a read-only query can't write, and DROP or TRUNCATE runs only with an explicit confirm.

updated Nov 3, 2026

Copy the setup prompt.
Your agent does the rest.

works with any agent+ 8 more
Install superagnt for me. It's the superagnt plugin from the github.com/superagnt/plugins marketplace, plus the superagnt MCP server (on Claude it's a connector I add in my browser; elsewhere I sign in through my browser). The setup guide for each kind of agent is at https://www.superagnt.com/install
or follow the detailed setup instructions

» the agnt_db_* tools are part of every server's base tools, so a fresh connection already has them.

01// what is inside

What can your agent do with postgres database?

Schema introspection

list_tables returns tables, columns, types and row-level security status, so the agent reads the schema instead of guessing at it.

Migrations

apply_migration runs DDL and records it, so the schema an agent built is auditable and repeatable.

Typed reads and writes

select, insert, upsert, update and delete with filters, so simple work needs no hand-written SQL.

Arbitrary SQL

execute_sql for anything the helpers don't cover, with a read_only flag for a statement that must not write.

CSV loading

load_csv streams a workspace file into a table server-side, with type inference, batched upsert and dedup on conflict.

Vectors and extensions

pgvector and pgcrypto are on hand, so embeddings sit next to the rows they describe; list_extensions shows what is installed.

tool names4 tools // 11 actionsas a new server lists them
  • agnt_db_readaction: status · list_tables · list_extensions · list_migrations · select
  • agnt_db_sqlaction: execute_sql · apply_migration
  • agnt_db_writeaction: insert · upsert · update · load_csv
  • agnt_db_deletecalled by its own name
per-operation names12older servers list these
agnt_db_statusagnt_db_list_tablesagnt_db_list_extensionsagnt_db_list_migrationsagnt_db_apply_migrationagnt_db_execute_sqlagnt_db_selectagnt_db_insertagnt_db_upsertagnt_db_updateagnt_db_deleteagnt_db_load_csv
02// recorded run

What does a real call return?

A run we recorded on superagnt, with the result trimmed to fit. Nothing on it is invented: the date, the wall time and the cost are the run's own.

recorded runrecorded Nov 3, 2026, 17:01 UTC · wall time 1.3 s · 3 calls · no charge

asked Make a leads table, add three rows, then try to mark every lead lost, sneak an insert into a read-only query, and drop the table.

  1. → call 1agnt_db_write
    { "action": "update", "table": "leads_probe", "values": { "status": "lost" } }
    ← resulttrimmed
    Missing required argument(s) for agnt_db_write action "update": filters. It was not executed.
  2. → call 2agnt_db_sql
    { "action": "execute_sql", "query": "insert into leads_probe (company) values ('Sneaky Insert')", "read_only": true }
    ← resulttrimmed
    Only read-only SELECT/CTE statements are allowed (got "insert")
  3. → call 3agnt_db_sql
    { "action": "execute_sql", "query": "drop table leads_probe" }
    ← resulttrimmed
    Destructive statement requires confirm=true

» The same run created the table and inserted the rows first, and agnt_db_delete with an empty filter list answered "delete requires at least one filter". With confirm_destructive true the DROP went through. Database calls carry no per-call charge.

03// measured

Are people letting agents run SQL straight on production?

Some are, and the fear is fair: a model that writes UPDATE without a WHERE clause can wipe a table. Here the dangerous statements need a deliberate second step. In our run an update with no filter was refused before it ran, a delete with no filter was refused, an INSERT inside a read_only query was refused, and DROP ran only when the call said confirm_destructive. The database is the workspace's own, separate from your production systems.

What the agent triedWhat happened
update with no filterRefused: filters are required. Not executed.
delete with no filterRefused: "delete requires at least one filter"
INSERT inside a read_only queryRefused: "Only read-only SELECT/CTE statements are allowed"
DROP TABLERefused until the call sets confirm_destructive true

sample · One run on a fresh workspace database, Nov 3, 2026

04// measured

Is a vector database enough, or can Postgres do it?

Postgres can. pgvector is on the same database, so embeddings live next to the rows they describe and one query can join them. In our test we loaded 10,000 random 1,536-dimension vectors with one SQL call in 4.4 seconds, and an exact nearest-neighbour query over all of them came back in 0.64 to 0.67 seconds, the round trip included, with no index. A separate vector database earns its place only at millions of vectors or with search features Postgres lacks.

sample · 10,000 rows, vector(1536), two queries, Nov 3, 2026

05// answered

Do agents need a database at all?

Any agent that works for more than one session does. Each run of a schedule or a queue starts fresh, so results, lists and state go in tables the next run reads. Keep documents in a knowledge base, small learned facts in memory and uploads and exports in files.

06// what it gets used for

What do people use it for?

01

A lead store an agent keeps up to date

The agent writes every lead it finds to one table with an upsert on the email, marks status as it works, and reads back only the rows that still need a step, so nothing is contacted twice.

02

Pipeline output the team can query

A scraping or enrichment job writes rows as it goes. Analysts query the same tables directly, so nothing important lives only in a chat transcript.

03

CSV in, structured out

Someone uploads a list. The agent loads it with load_csv, enriches each row with the lead tools, and writes the results back with an upsert.

07// cost

What does it cost?

The tools carry no per-call price: every plan includes them, and plans differ only in how much they hold. Plans are Starter $49 a month ($20 of data credit included), Growth $149 a month ($90) and Scale $399 a month ($300), and the no-card trial gives $3 of data credit with Growth limits.

  • Database tables: Starter 10, Growth 50 and Scale 250.
  • Database rows, across every table: Starter 25,000, Growth 250,000 and Scale 2,500,000.
  • Database storage: Starter 250 MB, Growth 1 GB and Scale 10 GB.
08// questions

What do people ask before they wire it up?

01What is the best database for AI agents?

For most agents, plain Postgres: tables for state, SQL the model already knows, and pgvector for embeddings, with guard rails on what the agent can change. This one adds the guard rails and needs no hosting or connection string.

02Where do AI agents get their data?

From the tools you give them: live data sources such as LinkedIn or the web, your own systems through connections, and a database they read and write between runs. The database is what lets the next run start from what the last one learned.

03Can AI agents connect to a database?

Yes. Over MCP an agent in Claude, ChatGPT, Codex or Cursor reads the schema, runs SQL, applies migrations and writes rows, as in the run above, without you handing it a connection string.

04Are people actually letting agents run SQL straight on production?

Some do, and that is where accidents happen. Here a filterless update or delete is refused, a read_only query can't write, and DROP needs an explicit confirm, on a database that belongs to the workspace rather than to your production app.

05Do agents need a database at all?

An agent that runs more than once does: each scheduled or queued run starts fresh, so its results and state have to live somewhere the next run can read.

06Is a vector database enough, or can Postgres do it?

Postgres with pgvector does it: in our test an exact nearest-neighbour query over 10,000 vectors of 1,536 dimensions returned in under 0.7 seconds, the round trip included. A vector database alone can't hold the rows, filters and joins an agent also needs.

09// keep going

What else can your agent reach?