Skip to main content
Query PostgreSQL databases using natural language. The agent translates your questions into SQL and returns results.

Quick Start

1

Simple Usage

2

With Configuration

As Agent Tool

Schema Introspection

Query Examples

Query Result

Safety Features

Read-Only Mode (Default)

Table Restrictions

Parameterized Queries

All generated SQL uses parameterized queries to prevent SQL injection.

Write Operations (Use with Caution)

Environment Variables

Connection URL Format

Best Practices

  1. Always use read-only mode unless writes are necessary
  2. Whitelist tables to limit access
  3. Set row limits to prevent large result sets
  4. Review generated SQL before executing in production
  5. Use connection pooling for high-traffic applications

Database

Database adapters

Agent Tools

Creating custom tools