Skip to main content
This guide shows you how to add Snow Leopard data retrieval to a Pydantic AI agent.

Prerequisites

Don’t have data? Load the sample Northwind dataset into a PostgreSQL database that Snow Leopard Cloud can reach, such as a hosted Neon or Supabase database. Run the dataset’s northwind.sql script against your database, then add the database as a data source in your instance.

Start from scratch

Clone and run the complete working example:
Set your environment variables:
Run the agent:
You now have an interactive REPL where you can ask questions about your data:

Bring your own agent

Already have a Pydantic AI agent? Add Snow Leopard data retrieval with these steps.

1. Install dependencies

2. Create the Snow Leopard tool

Add a tool to your agent that calls Snow Leopard to retrieve data:

3. Customize the tool description

The tool’s docstring tells the agent when and how to use it. Update it to describe your specific data:

Next steps