Postgres but for agents_
Query it. Or cat it._
Create, manage, and query serverless PostgreSQL databases from your terminal. Branching, migrations, observability, type generation — all built in.
Full PostgreSQL and a cloud filesystem for AI agents. SQL when you need power. File ops when you need simplicity. One database, unified interfaces.
$ curl -fsSL https://db9.ai/install | sh macOS / Linux (x86_64, arm64)
Read https://db9.ai/skill.md and follow instructions Your agent learns to install, auth, and use db9 autonomously
Personal assistants & customer copilots
Memory in tables. Context in files.
Structured state lives in Postgres. Raw context, transcripts, and session snapshots stay as files — all in one workspace.
| agent_id | kind | file_path | topic |
|---|---|---|---|
| a1 | session | /a1/sessions/mar09.md | pricing |
| a1 | pref | /a1/prefs.json | tone |
| a1 | task | /a1/tasks/launch.md | launch |
Research, docs & coding agents
Knowledge from files. Retrieval from SQL.
Source documents stay in the filesystem. Chunks, metadata, and vectors live in Postgres — agents retrieve grounded context from one backend.
| title | file_path | topic |
|---|---|---|
| Auth overview | /kb/auth.md | auth |
| Error codes | /kb/api/errors.md | auth |
Automation, reports & multi-agent runs
Outputs in files. History in Postgres.
Reports, traces, and artifacts persist as files. Run history, status, and metadata live in Postgres — one workspace per agent run.
| id | agent | status | report |
|---|---|---|---|
| 42 | researcher | completed | /runs/42/report.md |
| 41 | browser | failed | /runs/41/report.md |
| 40 | planner | completed | /runs/40/summary.md |
Everything your agent needs
Auto-embeddings, vector search, environment branching, file storage, cron — built in, not bolted on.
Auto-embeddings, vector search, and HTTP — all in SQL.
Call embedding() in a query and get vectors back — no external pipeline, no API keys in application code. Similarity search and outbound HTTP are native too.
-- similarity search with built-in embeddings SELECT title, content FROM docs ORDER BY vec <-> embedding('deploy to production') LIMIT 5; -- generate embeddings inline UPDATE docs SET vec = embedding(content) WHERE vec IS NULL; -- call external APIs from SQL SELECT body::json>>'status' FROM http_get('https://api.example.com/health');
Clone your entire environment. Not just tables.
One command creates an isolated copy — data, files, cron jobs, and user permissions. Test against real conditions, then delete it.
$ db9 branch create myapp --name staging Branch 'staging' created from database myapp. Name staging State ready Admin User admin
Upload, download, and mount files alongside your data. No S3 buckets to configure.
$ db9 fs cp ./data.csv myapp:/imports/ data.csv -> /imports/data.csv $ db9 fs mount myapp ~/local Mounted myapp at ~/local
Distributed job scheduling from SQL or CLI. No idle timeouts, no missed runs.
$ db9 db cron myapp create \ '*/5 * * * *' \ 'SELECT sync_embeddings()' Cron job created. jobid: 1
Zero setup, 600+ ORM tests passing. One command to generate TypeScript or Python types.
$ db9 create Name brave-tiger-42 $ db9 gen types brave-tiger-42 interface Document { id: number; }
Start building in seconds
One command to install. One command to create a database. Zero config.
$ curl -fsSL https://db9.ai/install | sh Native to your agent
db9-bootstrap
CLIServerless Postgres for AI agents. Create, query, branch, and manage databases from the terminal — zero config. Built-in JSONB, vector search, HTTP extension, filesystem queries, cron jobs, and full-text search.
Read https://db9.ai/skill.md and follow the instructions my-claw-dash
OpenClawUnlock deep insights and enterprise-grade observability. Stream OpenClaw events into db9 and secure runtime events as immutable JSONL audit logs.
Read https://db9.ai/plugins/my-claw-dash.md and follow instructions to use my-claw-dash