Skip to main content

Overview

SQLite tool allows you to query and manage SQLite databases. No server required - perfect for local development and embedded applications. The user asks a data question; the agent runs SQL against the database and returns rows.

Installation

No additional dependencies required - SQLite is built into Python!

Quick Start

1

Simple Usage

2

With Configuration

Use the same tool with an agent — see Usage with Agent below, or pass env vars and options from the sections above.

Usage with Agent

Available Methods

query(sql)

Execute a SQL query.

execute(sql)

Execute a SQL statement (INSERT, UPDATE, DELETE, CREATE).

list_tables()

List all tables in the database.

Configuration Options

Function-Based Usage

In-Memory Database

Error Handling

Common Errors

How It Works


Best Practices

List tables and columns before querying so the agent writes valid SQL.
Bind values instead of string-formatting them to avoid SQL injection.
Add LIMIT so the agent works with a focused result set.

PostgreSQL

PostgreSQL database

MySQL

MySQL database

DuckDB

Analytics database