Skip to content

PostgreSQL

Connect any PostgreSQL-compatible database to Agent Context. This includes standard PostgreSQL, as well as managed services like Supabase, Neon, CockroachDB, AlloyDB, and Amazon RDS for PostgreSQL.

  1. Go to Agent Context in the dashboard
  2. Click Add SourcePostgreSQL
  3. Enter your connection details (or paste a connection string)
  4. Click Test Connection to verify, then Save
ParameterRequiredDefaultDescription
HostYesHostname or IP address of the PostgreSQL server
PortNo5432Port number
DatabaseYesName of the database to connect to
UsernameYesUsername for authentication
PasswordYesPassword for the specified user
TableNoTable or view name (e.g., public.my_table). Leave empty to discover all tables.

Alternatively, you can paste a connection string:

postgresql://user:password@host:5432/database

When the Table field is left empty, Agent Context automatically discovers all accessible tables and views in the database. You can then select which ones to expose to your agents.

When a specific table is provided, only that table is connected.

These PostgreSQL-compatible services work with the PostgreSQL connector — just paste the connection string from your provider’s dashboard:

ServiceWhere to find the connection string
SupabaseProject Settings → Database → Connection string
NeonDashboard → Connection Details
Amazon RDSRDS Console → Connectivity & security
Google AlloyDBAlloyDB Console → Instance details
CockroachDBCloud Console → Connect → Connection string
IssueFix
Connection refusedVerify the host, port, and that the database server is accepting connections. Check firewall rules.
Authentication failedVerify username and password. Check that the user has SELECT permission on the target tables.
TimeoutCheck network connectivity. For cloud databases, ensure your IP is allowlisted.