For personal assistants and autonomous agents

The database for AI agents

Every agent needs real storage — memory, task state, data to query. DBaaS.dev gives it PostgreSQL on demand, whether the agent is the assistant you chat with every day or one you're building: ready in seconds, no infrastructure for you to babysit.

Your personal AI assistant

Give Claude, ChatGPT or Cursor a database of its own

Chat assistants forget, and pasted spreadsheets go stale. Connect your assistant to DBaaS.dev once and it can keep your data in a real PostgreSQL database — and answer questions about it later. No code: add one URL and your API key, then just ask.

“Track my expenses”

It creates the table, logs each purchase you mention, and tells you what you spent on food this month.

“Keep my reading list”

Books, articles, status and notes — ask “what did I rate highest this year?”

“Remember my clients”

A lightweight CRM your assistant maintains: contacts, last call, next follow-up.

“Log my workouts”

Every session stored; ask for weekly totals or your best lift since March.

Three ways your agent gets a database

REST API

Ephemeral databases

POST one endpoint → PostgreSQL with a TTL. No account needed. Auto-deletes when the task is done. Run SQL over HTTP or connect any Postgres driver.

MCP

Model Context Protocol

Claude, ChatGPT, Cursor and friends create and query databases conversationally through our hosted remote MCP server — one URL, no local install.

A2A

Agent-to-Agent

A full A2A agent with natural-language workflows: provision, design schemas, load sample data, migrate, query — chained autonomously from a single instruction.

Agent quickstart — database in one call

This is the entire integration. No API key required for ephemeral databases.

import requests, time, psycopg2

API = "https://api.dbaas.dev/v1"

# Your agent needs a database? One call. No signup, no credit card.
db = requests.post(f"{API}/ephemeral/create", json={"ttl": 30}).json()["data"]  # minutes

# Poll until ready (~15-30s), then connect with any Postgres driver
while True:
    state = requests.get(f"{API}/ephemeral/{db['id']}").json()["data"]
    if state["status"] == "running":
        conn = psycopg2.connect(state["connectionString"])
        break
    time.sleep(3)

# The agent now has a real PostgreSQL 18 database.
cur = conn.cursor()
cur.execute("CREATE TABLE memory (id SERIAL, role TEXT, content TEXT, ts TIMESTAMPTZ DEFAULT now())")
cur.execute("INSERT INTO memory (role, content) VALUES ('user', 'Remember: ship on Friday')")
conn.commit()

# TTL expires -> database deletes itself. Zero cleanup code.

As LangChain tools

# LangChain / LangGraph: give your agent a scratch database as a tool
from langchain_core.tools import tool
import requests

@tool
def create_database(ttl_minutes: int = 30) -> str:
    """Create a temporary PostgreSQL database (1-60 min). Returns the connection string."""
    db = requests.post("https://api.dbaas.dev/v1/ephemeral/create",
                       json={"ttl": ttl_minutes}).json()["data"]
    # ...poll until running (see quickstart), then:
    return db_connection_string

@tool
def run_sql(database_id: str, sql: str) -> list:
    """Run SQL over HTTP — no driver needed inside the agent sandbox."""
    r = requests.post(f"https://api.dbaas.dev/v1/ephemeral/{database_id}/sql",
                      json={"sql": sql})
    return r.json()["data"]["rows"]

Works identically from CrewAI, AutoGen, LangGraph, or hand-rolled agents — it's plain HTTP.

What agents build with it

Agent memory & state

Conversation history, task state, learned facts — structured in SQL instead of stuffed into context windows. Survives restarts; queryable with real WHERE clauses.

Safe SQL sandboxes

Let an agent practice schema changes or run untrusted generated SQL against a disposable database — production stays untouched, the sandbox deletes itself.

Data analysis tasks

Agent receives a CSV, loads it into Postgres, runs aggregations, returns answers. The heavy lifting happens in SQL, where it belongs.

Per-user / per-session stores

Multi-tenant agent products spin up an isolated database per customer session — clean blast radius, zero shared-state bugs.

Why not SQLite / vectors / a big shared DB?

SQLite dies with the sandbox. Agent environments are ephemeral by design — the moment the run ends, the file is gone. A hosted Postgres survives across runs, machines, and handoffs between agents.

Vector stores answer "what's similar?" — they can't answer "how many orders since Tuesday?" Agents doing real work need joins, aggregates, constraints, and transactions. That's SQL.

One big shared database means one agent's mistake is everyone's incident. Per-task databases give each run a clean blast radius — and TTL cleanup means nobody has to remember to delete anything.

Frequently asked questions

Can an AI agent create a database autonomously?

Yes — that's the point. The ephemeral endpoint needs no account or key, so an agent can POST and get PostgreSQL in seconds. For persistent databases, it authenticates with an API key via REST or MCP.

Is it really free?

Ephemeral databases are free with no signup. The free account tier adds persistent managed PostgreSQL with backups — no credit card.

How fast is provisioning?

Typically 15–30 seconds from API call to accepting connections.

What about cleanup?

Ephemeral databases carry a TTL and delete themselves on expiry. Your agent never needs teardown logic.

Can my personal AI assistant use it?

Yes. Claude, ChatGPT, Cursor and other assistants that support MCP connect with one URL and your free API key. After that you just ask — the assistant creates tables, stores what you tell it, and answers questions from your data.

Can agents use it for long-term memory?

Yes — use a persistent database (free tier) instead of an ephemeral one. Same API family, plus a dashboard and backups.

Which frameworks work with it?

Anything that can make an HTTP request or open a Postgres connection: LangChain, LangGraph, CrewAI, AutoGen, OpenAI tool-calling, or plain Python/JS. MCP covers Claude, ChatGPT, Cursor and other MCP clients.

Give your agent a real database

One POST request away. No signup for ephemeral DBs.