orchid-storage-postgres
PostgreSQL storage plugin: chat persistence, checkpointer, and visibility fragment.
orchid-storage-postgres is the PostgreSQL storage plugin for the Orchid AI framework. It provides production-grade PostgreSQL backends for chat persistence, LangGraph checkpointing, and SQL visibility filtering — all in a single installable package that auto-registers via Python entry points.
Installation
pip install orchid-ai orchid-storage-postgresWhat It Provides
| Component | Class | Purpose |
|---|---|---|
| Chat storage | OrchidPostgresChatStorage | Full OrchidChatStorage implementation backed by asyncpg |
| Checkpointer | _build_postgres_checkpointer | LangGraph AsyncPostgresSaver for agent-state persistence |
| Visibility | _build_postgres_filter | PostgreSQL $1..$N positional-parameter visibility fragment |
| Migrations | PostgresMigrationRunner | Unified v001 DDL for all framework-owned tables |
Auto-Registration
The package registers itself via importlib.metadata entry points:
[project.entry-points."orchid.visibility_fragments"]
postgres = "orchid_storage_postgres:_register"
[project.entry-points."orchid.checkpointers"]
postgres = "orchid_storage_postgres:_register"No manual register_visibility_fragment() or register_checkpointer() calls are needed by integrators. The chat storage is referenced via dotted class path in YAML config.