---
title: "Documentation"
description: "Complete documentation for AI for Database. Learn how to connect databases, write queries in natural language, build dashboards, and set up automated workflows."
canonical: "https://www.aifordatabase.com/docs/"
---

# Learn AI for Database

Documentation



Everything you need to connect your database, ask questions in plain English, build dashboards, and automate workflows.

## Get started quickly

[

01 · Connect

### Connect

Add your database in seconds. PostgreSQL, MySQL, MongoDB, SQL Server, or Google Sheets.

Get started](https://www.aifordatabase.com/docs/connect-database)[

02 · Query

### Query

Ask questions in plain English. Get instant answers from live data without writing SQL.

Get started](https://www.aifordatabase.com/docs/natural-language-queries)[

03 · Automate

### Automate

Build workflows that monitor your data and take action automatically.

Get started](https://www.aifordatabase.com/docs/create-workflow)

## Getting Started

Set up your account, connect a database, and run your first query.

[

#### Quickstart Guide

beginner

Get up and running with AI for Database in under five minutes. Connect your first database, ask a question, and see results.

5 min read

](https://www.aifordatabase.com/docs/quickstart/)[

#### Your First Query

beginner

Learn how to write effective natural-language questions and understand how AI for Database translates them into SQL.

6 min read

](https://www.aifordatabase.com/docs/first-query/)[

#### Connect Your Database

beginner

A general overview of how database connections work, including security, permissions, and supported databases.

4 min read

](https://www.aifordatabase.com/docs/connect-database/)

## Database Connections

Detailed guides for every supported database and troubleshooting.

[

#### PostgreSQL

intermediate

Step-by-step guide to connecting PostgreSQL, including user creation, permissions, SSL configuration, and SSH tunnels.

7 min read

](https://www.aifordatabase.com/docs/postgresql/)[

#### MySQL

intermediate

Connect MySQL or MariaDB to AI for Database with read-only access, SSL, and SSH tunnel support.

6 min read

](https://www.aifordatabase.com/docs/mysql/)[

#### MongoDB

intermediate

Connect MongoDB and MongoDB Atlas. Learn how AI for Database translates natural language into aggregation pipelines.

6 min read

](https://www.aifordatabase.com/docs/mongodb/)[

#### SQL Server

intermediate

Connect Microsoft SQL Server, Azure SQL, or Amazon RDS SQL Server with Windows or SQL authentication.

5 min read

](https://www.aifordatabase.com/docs/sql-server/)[

#### Google Sheets

beginner

Use Google Sheets as a data source. AI for Database reads your spreadsheets and lets you query them with natural language.

4 min read

](https://www.aifordatabase.com/docs/google-sheets/)[

#### Connection Troubleshooting

intermediate

Diagnose and fix common connection issues including timeouts, SSL errors, permission denied, and firewall blocks.

5 min read

](https://www.aifordatabase.com/docs/connection-troubleshooting/)

## Querying

Master natural language queries and get the most out of your data.

[

#### Natural Language Queries

beginner

Deep dive into how AI for Database converts plain English into SQL, including tips, examples, and advanced techniques.

8 min read

](https://www.aifordatabase.com/docs/natural-language-queries/)[

#### Query History

beginner

Access, search, and manage your past queries. Re-run, favorite, or share any previous question.

3 min read

](https://www.aifordatabase.com/docs/query-history/)[

#### Query Results

beginner

Understand result formats including tables, charts, and single values. Export data as CSV, JSON, or to dashboards.

4 min read

](https://www.aifordatabase.com/docs/query-results/)[

#### Advanced Queries

advanced

Power-user techniques: parameterized queries, variables, cross-database joins, and scheduled queries.

7 min read

](https://www.aifordatabase.com/docs/advanced-queries/)

## Dashboards

Build, customize, and share live dashboards with your team.

[

#### Create a Dashboard

beginner

Build your first live dashboard by combining multiple queries into a visual overview. Customize layout and refresh schedules.

6 min read

](https://www.aifordatabase.com/docs/create-dashboard/)[

#### Widgets

intermediate

All widget types: metric cards, tables, bar charts, line charts, pie charts, and text blocks. Configuration and styling options.

5 min read

](https://www.aifordatabase.com/docs/widgets/)[

#### Sharing Dashboards

beginner

Share dashboards via links, embeds, email digests, or Slack. Manage viewer permissions and access controls.

4 min read

](https://www.aifordatabase.com/docs/sharing-dashboards/)

## Workflows

Automate tasks with triggers, conditions, and actions.

[

#### Create a Workflow

intermediate

Build automated workflows that run queries, check conditions, and take actions based on your database data.

7 min read

](https://www.aifordatabase.com/docs/create-workflow/)[

#### Triggers

intermediate

Configure scheduled and manual workflow triggers, draft runs, and immutable publishing.

4 min read

](https://www.aifordatabase.com/docs/triggers/)[

#### Actions

intermediate

Configure email and reliable authenticated webhook actions, templates, tests, retries, and delivery receipts.

5 min read

](https://www.aifordatabase.com/docs/actions/)[

#### Workflow Templates

beginner

Pre-built workflow templates for common automation patterns: alerts, reports, data syncs, and notifications.

4 min read

](https://www.aifordatabase.com/docs/workflow-templates/)

## Alerts

Monitor your data and get notified when conditions are met.

[

#### Setup Alerts

beginner

Create data-driven alerts that notify you when database conditions are met. Step-by-step setup guide.

5 min read

](https://www.aifordatabase.com/docs/setup-alerts/)[

#### Alert Channels

intermediate

Configure notification channels: email, Slack, webhooks, PagerDuty, and more. Test and manage channel settings.

4 min read

](https://www.aifordatabase.com/docs/alert-channels/)[

#### Alert Conditions

intermediate

All condition types: thresholds, change detection, anomaly detection, and compound conditions. Examples for each.

5 min read

](https://www.aifordatabase.com/docs/alert-conditions/)

## Security

Encryption, permissions, audit logs, and self-hosting.

[

#### Security Overview

intermediate

How AI for Database protects your data: encryption, read-only access, network security, and compliance certifications.

6 min read

](https://www.aifordatabase.com/docs/security-overview/)[

#### Permissions

intermediate

Role-based access control: admin, editor, and viewer roles. Custom roles and fine-grained permissions on Enterprise.

4 min read

](https://www.aifordatabase.com/docs/permissions/)[

#### Audit Logs

intermediate

Track who did what and when. Search audit logs, export for compliance, and set up log forwarding.

4 min read

](https://www.aifordatabase.com/docs/audit-logs/)[

#### Self-Hosting

advanced

Run AI for Database in your own infrastructure. Docker, Kubernetes, and bare-metal deployment guides.

8 min read

](https://www.aifordatabase.com/docs/self-hosting/)

## API

Integrate AI for Database into your own applications.

[

#### API Overview

intermediate

Introduction to the AI for Database REST API. Base URLs, versioning, rate limits, and response formats.

5 min read

](https://www.aifordatabase.com/docs/api-overview/)[

#### Authentication

intermediate

API key management, token scopes, and security best practices for API authentication.

5 min read

](https://www.aifordatabase.com/docs/authentication/)[

#### API Endpoints

advanced

Complete public API reference: queries, dashboards, workflows, connections, webhooks, usage, and keys.

8 min read

](https://www.aifordatabase.com/docs/endpoints/)[

#### Agent-Created Database Alerts

advanced

Let an AI agent inspect a database, preview eligible rows, and safely publish a scheduled authenticated webhook alert.

10 min read

](https://www.aifordatabase.com/docs/agent-created-alerts/)[

#### Query Databases from an Agent

intermediate

Discover sanitized connections and schemas, then return raw query results to an AI agent through the REST API.

7 min read

](https://www.aifordatabase.com/docs/agent-querying-databases/)[

#### Agent Workflow Lifecycle

advanced

Create a paused workflow, preview rows safely, test one action, publish explicitly, and inspect production runs.

9 min read

](https://www.aifordatabase.com/docs/agent-workflow-lifecycle/)[

#### Outbound Workflow Credentials

advanced

Store API keys and bearer tokens as encrypted, write-only, destination-bound workflow credentials.

6 min read

](https://www.aifordatabase.com/docs/outbound-credentials/)[

#### API Errors and Retries

advanced

Handle response envelopes, validation errors, rate limits, delivery failures, and retries without duplicating external actions.

7 min read

](https://www.aifordatabase.com/docs/api-errors-and-retries/)

## Ready to get started?

Connect my database and start asking questions in minutes.

[Start free](https://app.aifordatabase.com/signup)[Read the quickstart](https://www.aifordatabase.com/docs/quickstart)

Source: https://www.aifordatabase.com/docs/
