Skip to content

PostgreSQL in your app, agent, and browser

PostgreSQL 19 · native + browser

Give your apps and AI agents PostgreSQL. Embed it with Python or C, run it as a threaded server, or use it in your browser.

  • Embedded · Server · Browser
  • Server source build · Browser preview
  • PostGamma · Apache-2.0
Loading PostgreSQL…
Starting PostgreSQL
~2%

Preparing your browser

Estimated0s
19PostgreSQL core
3.10–3.14CPython wheels
2.17+Wheel glibc baseline
C ABIStatic SDK
0.8.6Bundled pgvector

Embedded, Server and Browser

Choose how you run PostgreSQL.

Own the database inside your app, connect to a threaded server, or run SQL locally in the browser.

API
EmbeddedPython + Static C
Published alpha

PostgreSQL inside
your application.

Import the Python package or link libpostgamma.a. Your app owns the database lifecycle, with no separate server to manage. Install the current alpha from PyPI, or see downloads for the wheels and static C SDK.

postgamma.connect("agent.pgm")
PG
ServerThreaded PostgreSQL
Source build

A familiar server.
A threaded engine.

Run PostgreSQL roles as threads in a standalone server. Connect with psql or a PostgreSQL driver. Build from source today; a separate server binary package is not yet available.

make threaded-postgresql-build
JS
BrowserWebAssembly + Workers
Preview

Real PostgreSQL.
Right in your browser.

Run SQL, JSONB, transactions and pgvector locally. Start in memory, or explicitly enable OPFS storage. The browser package is currently built from source.

const db = await Database.open();

The PostgreSQL core, reframed

Keep the database semantics.
Choose the runtime boundary.

The threaded kernel powers each mode. PostgreSQL owns parsing, planning, catalogs, transactions, WAL, and recovery; you choose an embedded API, a server connection, or a browser Worker.

01 PostgreSQL behavior, preserved

Use the SQL and semantics you already know.

Preserved behavior includes PostgreSQL syntax and types, SQLSTATE diagnostics, prepared statements, COPY, notices, notifications, and logical dump and restore.

SQLACIDJSONBCOPYWALVector
postgres=#select id, body from notes;
1local memory1 row
Compatibility contract
02 Embedded mode

One process.
One lifecycle.

No database server to install, configure, or supervise.

OS process
HostYour app
EnginePostgreSQL
See the architecture
03 Embedded lifecycle

Open, connect, query, and close explicitly.

  1. 01Openinitialize or recover
  2. 02Connectcreate logical sessions
  3. 03QuerySQL, COPY, vectors
  4. 04Closeclean shutdown
Paths and creation
04 Reviewed extension surface

Vector search,
inside the same process.

pgvector 0.8.6 is bundled and validated with the embedded kernel. Only reviewed extensions are linked into each build.

0.8.6pgvectorbundled
Build vector search

Embedded and browser use cases

Put PostgreSQL where a separate service does not fit.

Choose deliberately

Use embedded mode when the app owns its database. For independent clients, explore the threaded server source build. Each native cluster directory still has one owner process.

Read the selection guide
01

Agents and developer tools

Structured state, task data, and vector search beside the application.

02

Desktop and edge software

A PostgreSQL data layer that ships with the application itself.

03

Tests and reproducible jobs

Isolated PostgreSQL clusters through an API, without provisioning a server.

Start small. Keep PostgreSQL.

Choose your runtime.
Run your first query.

Start with the project overview, then follow the Python, C, server, or browser quickstart for your application.