INSTANT
DATABASES FOR
AI AGENTS
ANY
AGENT
ANY
TOOL
DATABASES
Instant database provisioning with just a unique ID and no setup enables agents to scale applications and features instantly.
TEMPLATES
Dynamic schema and migration definitions allow AI agents to immediately start using databases effectively.
MCP
Remote MCP servers for any combination of databases and templates can be used in AI applications that support them.
& DEVELOPERS

An agent decides it needs a database to complete its task

It creates one simply by generating a unique ID

The agent can then create a schema or use templates for the tables it needs

Templates also enable agents to properly write data into tables

Remote MCP servers for any combination of databases and templates can be used in AI applications.

All databases are truly serverless so no need to manage compute.

Each database is isolated and can be reused, downloaded, deleted, etc.

CODE SAMPLES

import { DatabaseService } from "@agentdb/sdk";
import fs from "fs";
import "dotenv/config";

const agentdb = new DatabaseService("https://api.agentdb.dev", process.env.AGENTDB_API_KEY, true);

// Generate a new UUID for the database token
const newDatabaseToken = crypto.randomUUID();
console.log(`Generated new database token: ${newDatabaseToken}`);

const connection = agentdb.connect(newDatabaseToken, "users_db", "sqlite");

const main = async () => {
  try {
    console.log("Creating users table...");

    // Create the users table
    await connection.execute({
      sql: `CREATE TABLE IF NOT EXISTS users (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        name TEXT NOT NULL,
        email TEXT UNIQUE NOT NULL,
        age INTEGER,
        created_at DATETIME DEFAULT CURRENT_TIMESTAMP
      )`
    });

    console.log("Populating users table with sample data...");

    // Insert sample data
    const sampleUsers = [
      { name: "Alice Johnson", email: "alice@example.com", age: 28 },
      { name: "Bob Smith", email: "bob@example.com", age: 34 },
      { name: "Carol Davis", email: "carol@example.com", age: 25 },
      { name: "David Wilson", email: "david@example.com", age: 42 },
      { name: "Eve Brown", email: "eve@example.com", age: 31 }
    ];

    for (const user of sampleUsers) {
      await connection.execute({
        sql: "INSERT INTO users (name, email, age) VALUES (?, ?, ?)",
        params: [user.name, user.email, user.age]
      });
    }

    console.log("Querying all users from the database...");

    // Query all users
    const allUsers = await connection.execute({
      sql: "SELECT * FROM users ORDER BY created_at"
    });

    console.log("All users:");
    console.log(JSON.stringify(allUsers, null, 2));

    console.log("Querying users older than 30...");

    // Query users with a condition
    const olderUsers = await connection.execute({
      sql: "SELECT name, email, age FROM users WHERE age > ? ORDER BY age DESC",
      params: [30]
    });

    console.log("Users older than 30:");
    console.log(JSON.stringify(olderUsers, null, 2));

    // Download the sqlite database
    const download = await agentdb.getDownloadUrl(newDatabaseToken, "users_db", "sqlite");
    const database = await fetch(download.downloadUrl).then((res) => res.arrayBuffer());
    // Write the database to a file using node
    fs.writeFileSync(download.fileName, Buffer.from(database));

    console.log("Database operations completed successfully!");
  } catch (error) {
    console.error("Error during database operations:", error);
  }
};

main();
INFINITELY
SCALABLE
Agents create 1000x more databases than humans: instantly provision with just a unique ID, no setup, no configuration.
AGENT
READY
AgentDB is also an MCP server. Database templates enforce schemas and migration so agents can immediately use them.
MINIMIZED
COST
AI systems are expensive enough, only pay for queries and storage of databases made by agents at scale.
DATA
PROVENANCE
All AgentDB databases are isolated for easy download, reuse as context, and deletion for compliance.

FEATURES

Vector Search

Built-in vector search with sqlite-vec extension. Store embeddings, perform semantic search, and build RAG systems.

SQLite + DuckDB

Choose between SQLite for fast, reliable transactional operations and DuckDB for powerful analytical queries.

No Setup Time

Databases are ready instantly. Serverless architecture scales from zero to millions of requests.

SIMPLE
TRANSPARENT
PRICING

Starter

$0

  • 1M agent requests/month
  • SQLite & DuckDB support
  • Vector search with sqlite-vec
  • Unlimited databases
  • Community support
  • 1GB storage
Get Starter

Pro

$29/month

  • 10M requests/month
  • All Starter features
  • Priority support
  • Advanced monitoring
  • Custom domains
  • 100GB storage
Choose Pro

Enterprise

CUSTOM

  • Unlimited requests
  • All Pro features
  • Dedicated support
  • SLA guarantees
  • Custom integrations
  • Unlimited storage
Contact Sales