Skip to main content
PostgresTools enable an Agent to interact with a PostgreSQL database.

Prerequisites

The following example requires the psycopg2 library.
You will also need a database. The following example uses a Postgres database running in a Docker container.

Example

The following agent will list all tables in the database.
cookbook/14_tools/postgres.py

Toolkit Params

Toolkit Functions

You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Developer Resources