Postgres for AI agents

Why

Agents need transactional state: conversation/session memory, tool results, task queues, per-user feature values, idempotent writes. That is OLTP, not warehouse work, and Postgres (with extensions) is the default engine. In 2025-26 the lakehouse vendors bought or built Postgres so operational and analytical data sit on one governed platform.

Vendor moves (as of 2026-10-07)

  • Databricks Lakebase: fully managed Postgres in Databricks; docs describe GA with Change Data Feed storage in public preview; autoscaling, scale to zero, instant branching, read replicas, point-in-time restore; syncs Unity Catalog tables into Postgres and captures Postgres changes as Delta tables; named use as online feature store or agent state store. Databricks acquired Neon in 2025 for “around $1 billion” and launched Lakebase June 2025 (Wikipedia, secondary). See Databricks.
  • Neon: serverless Postgres with branching, autoscaling, scale to zero, instant restore, now also auth, object storage, AI Gateway, vector and hybrid search; MCP integrations for Cursor and Claude Code (neon.com docs).
  • Snowflake Postgres: Postgres instances managed from Snowflake on dedicated VMs; docs show GA; Postgres 16-18; AWS and Azure (not GCP); PgBouncer built in. Snowflake announced the Crunchy Data acquisition in June 2025 for about $250 million (Wikipedia, secondary; the docs page does not mention it). See Snowflake.
  • Supabase: Postgres backend-as-a-service: see supabase.
  • Google AlloyDB: Postgres-compatible, compute/storage separated; AlloyDB AI offers vector search with a customized pgvector, ScaNN indexes, ML model calls and natural-language-to-SQL extension.
  • AWS Aurora PostgreSQL-compatible and Azure Database for PostgreSQL flexible server (burstable/general-purpose/memory-optimized tiers; V6 SKU in public preview per page updated 2026-09-05). Aurora DSQL and Azure HorizonDB not covered: unverified.

pgvector

Open-source vector similarity search in Postgres: HNSW and IVFFlat indexes; vector, halfvec, bit, sparsevec types; docs show 0.8.7, Postgres 13+. Lets RAG keep embeddings next to transactional rows (see Vector embeddings).

Patterns

  • Branch-per-agent or per-task databases (Neon/Lakebase) for safe experimentation.
  • OLTP → lake sync for analytics; lake → OLTP “reverse” sync for serving.
  • Governance: keep the same catalog/IAM across both sides where the platform allows.

Strengths and weaknesses (opinion)

One familiar protocol and ecosystem; but Postgres is single-writer per primary and large-scale vector search needs tuning.

Self-learning

Sources (fetched 2026-10-07)

URLs above; https://learn.microsoft.com/en-us/azure/postgresql/overview ; https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html ; https://en.wikipedia.org/wiki/Databricks and /Snowflake_Inc. (secondary)

Open items

  • Prices excluded by rule; Aurora DSQL, Azure HorizonDB, Supabase agent features, Neon-Databricks integration details unverified; Neon/Databricks deal date not confirmed from a primary source.