jeevesagent.runtime.postgres

Convenience: JournaledRuntime rooted at a Postgres pool.

Usage:

runtime = await PostgresRuntime.connect("postgres://localhost/jeeves")
await runtime.init_schema()
agent = Agent("...", model="claude-opus-4-7", runtime=runtime)

The journal lives in two Postgres tables (journal_steps and journal_streams) which init_schema() creates idempotently. Same protocol as SqliteRuntime; production-grade durability when paired with a managed Postgres instance.

Classes

PostgresRuntime

JournaledRuntime backed by Postgres for cross-host

Module Contents

class jeevesagent.runtime.postgres.PostgresRuntime(pool: Any)[source]

Bases: jeevesagent.runtime.journaled.JournaledRuntime

JournaledRuntime backed by Postgres for cross-host durable replay.

async aclose() None[source]

Close the underlying connection pool.

classmethod connect(dsn: str, *, min_size: int = 1, max_size: int = 10) PostgresRuntime[source]
Async:

Open a fresh asyncpg pool and return the runtime rooted at it.

async init_schema() None[source]

Create the journal tables if they don’t already exist.

name = 'postgres'