postgres
The log and artifact store on Postgres: every host process on every machine points at the same database.
Opens lazily: nothing connects until first use, which creates the schema in an empty database and refuses one of another store version or a server before Postgres 16 (unsupported_format). Artifacts are rows of the database. localMemory() and localKnowledge() are refused on it.
Import from @threads/postgres (TypeScript) or threads.postgres (Python).
function postgres(url?: string): StoreParameters
urlstringA postgres:// connection URL. Omitted: DATABASE_URL. With neither, the first use is invalid_config naming DATABASE_URL.
Returns
Throws ConfigError with one of these codes: invalid_config.