PostgreSQL adapter for AgentLedger Runtime, enabling ledger persistence and migration management. Version 1.2.4 is current stable; released as needed. Differentiators: minimal API surface (applyMigrations), works with any pg-compatible client (exec/query/execute), and full TypeScript support. It requires agentledger-runtime as a peer dependency.
npm install agentledger-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a PostgresAdapter with a pg Client and applies ledger migrations.
Remove second argument or merge into client config.
Replace adapter.runMigrations() with adapter.applyMigrations().
Call await client.connect() before new PostgresAdapter(client).
Pass any pg-compatible client instead of a config object.
Use pool.connect() to get a client, then pass that client to the adapter.
Ensure you pass a pg.Client instance (or similar) that has a query method.
Create a ./migrations folder or set the path via options (if available).
Run npm install agentledger-runtime