For AI Agent Builders

Your company's data layer for AI agents

Connect any database. Your agent queries it with natural language. Read-only. Scoped API keys. Works with any framework.

Why not just connect directly?

Raw Database MCP

  • Agent gets column names only
  • Guesses what metrics mean
  • Can DROP TABLE
  • No usage tracking
  • No shared state

AI for Database

  • Schema + business context
  • Canonical metric definitions
  • Read-only guardrailed
  • Every query audited
  • Cross-agent shared state

How it works

1

Connect

Add your Postgres, MySQL, or MongoDB. We introspect the schema, map relationships, and generate a summary.

2

Configure

Annotate columns with business context. Define metrics. Create saved query templates. Set access scopes.

3

Query

Your agent calls the API or MCP server. Natural language or SQL. Structured JSON. Every query tracked.

What agents build with this

Autonomous Reporting

Agent pulls metrics on a schedule, posts to Slack

APIPOST /api/v1/chat

Smart Customer Support

Agent checks order status before responding to tickets

APIPOST /api/v1/connections/{id}/query

Anomaly Detection

Workflow detects failures, webhooks your agent

APIPOST /api/v1/workflows

Investor Updates

Agent builds dashboards with 12 months of data

APIPOST /api/v1/dashboards

Cross-Database Analysis

Query Postgres + MySQL in one conversation

APIPOST /api/v1/chat

Data Pipeline Monitoring

Freshness checks + schema drift alerts

APIPOST /api/v1/workflows

Built for agents, not humans in a browser

Smart Connections

When you connect a database, we introspect every table, column, and relationship. Your agent gets a structured schema summary without needing to run discovery queries.

GET /api/v1/connections/{id}/schema

{
  "tables": [
    {
      "name": "orders",
      "columns": ["id", "customer_id", "total", "status"],
      "relationships": ["customers.id -> orders.customer_id"],
      "description": "All customer orders with payment status"
    }
  ]
}

Semantic Layer

Define what "revenue" means once. Every agent that queries your database uses the same definition. No more conflicting metrics across tools.

// Metric definition stored in AI for Database
{
  "metric": "revenue",
  "sql": "SUM(orders.total) WHERE orders.status = 'paid'",
  "description": "Total paid order revenue, excluding refunds"
}

// Agent asks: "What is revenue this quarter?"
// AI for Database applies the canonical definition automatically

Saved Queries

Create reusable query templates with parameters. Your agent calls them by name instead of generating SQL from scratch every time.

POST /api/v1/chat
{
  "message": "Run saved query: top_customers",
  "parameters": { "limit": 10, "period": "last_30_days" }
}

// Returns structured JSON, not raw SQL
{
  "data": {
    "rows": [...],
    "columns": ["customer_name", "total_revenue", "order_count"]
  }
}

Query Approval

Set rules for which queries run automatically and which need human approval. Critical for production agents that touch sensitive data.

// Approval policy configuration
{
  "auto_approve": [
    "SELECT on public.*",
    "Saved queries tagged 'safe'"
  ],
  "require_approval": [
    "Queries touching PII columns",
    "Cross-database joins",
    "Queries estimated > 10s execution"
  ]
}

Drop-in integration

curl -X POST https://app.aifordatabase.com/api/v1/chat \
  -H "Authorization: Bearer afd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Top 10 customers by revenue",
    "connectionId": "conn_abc123"
  }'

Works with everything

Frameworks & Platforms

Claude MCPGPT ActionsLangChainCrewAIVercel AI SDKAutoGen

Databases

PostgreSQLMySQLMongoDBSQL ServerSQLite

Pricing

Free

Prototype your agent

$0forever
  • Free AI models
  • 3 workflows
  • 60 req/min
  • Community support
Start free

Pro

Production agents

$19/mo
  • All premium models
  • Unlimited workflows
  • 300 req/min
  • Priority support
Get Pro

Enterprise

Custom deployment and SLA

Custom
  • Self-hosted option
  • SSO & audit logs
  • Custom rate limits
  • Dedicated support
Contact us

Give your agent a database in 5 minutes

Sign upAdd connectionGet API keyAgent is live
Start free