2026-04-12

Postgres, Neon, and Drizzle

Serverless-friendly Postgres and a typed ORM; boring data paths keep the agent layer honest.

See also: docs/database-patterns.md, docs/setup-and-env.md

Agents need durable state: sessions, plans, results, and knowledge rows. The database is not the exciting slide in a board deck. It is where the product keeps its promises.

We use Neon for managed Postgres. Their introduction covers the model we care about: branching-friendly, serverless connection handling, and standard Postgres.

Drizzle ORM gives typed queries and schema-first migrations. That matters because agent systems change fast; untyped string SQL is how regressions ship quietly.

So what

Ask any agent vendor where state lives. "We keep it in the model" is not a retention policy. It is a gap.