Built for autonomous software
Your agent needs real storage — scratch space, memory, query targets. DBaaS.dev gives it PostgreSQL on demand: one API call, ready in seconds, cleaned up automatically. No signup flow in the loop, no infrastructure for you to babysit.
REST API
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
Claude, ChatGPT, Cursor and friends create and query databases conversationally through our hosted remote MCP server — one URL, no local install.
A2A
A full A2A agent with natural-language workflows: provision, design schemas, load sample data, migrate, query — chained autonomously from a single instruction.
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": 2}).json()["data"]
# 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 17 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.# LangChain / LangGraph: give your agent a scratch database as a tool
from langchain_core.tools import tool
import requests
@tool
def create_database(ttl_hours: int = 2) -> str:
"""Create a temporary PostgreSQL database. Returns the connection string."""
db = requests.post("https://api.dbaas.dev/v1/ephemeral/create",
json={"ttl": ttl_hours}).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.
Conversation history, task state, learned facts — structured in SQL instead of stuffed into context windows. Survives restarts; queryable with real WHERE clauses.
Let an agent practice schema changes or run untrusted generated SQL against a disposable database — production stays untouched, the sandbox deletes itself.
Agent receives a CSV, loads it into Postgres, runs aggregations, returns answers. The heavy lifting happens in SQL, where it belongs.
Multi-tenant agent products spin up an isolated database per customer session — clean blast radius, zero shared-state bugs.
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.
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.
Ephemeral databases are free with no signup. The free account tier adds persistent managed PostgreSQL with backups — no credit card.
Typically 15–30 seconds from API call to accepting connections.
Ephemeral databases carry a TTL and delete themselves on expiry. Your agent never needs teardown logic.
Yes — use a persistent database (free tier) instead of an ephemeral one. Same API family, plus dashboards, backups, and connection pooling.
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.
One POST request away. No signup for ephemeral DBs.