Skip to main content
SQLTools enable an Agent to run SQL queries and interact with databases.

Prerequisites

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

Example

The following agent will run a SQL query to list all tables in the database and describe the contents of one of the tables.
cookbook/tools/sql_tools.py

Toolkit Params

Toolkit Functions

Information