Skip to main content

orchid-storage-sqlite

SQLite storage backend package for the Orchid AI framework.

What it provides

SQLite implementations of the framework's storage / persistence ABCs:

  • OrchidSQLiteChatStorage — chat sessions + messages + conversation summaries
  • OrchidSQLiteConfigStorage — agent configuration CRUD
  • OrchidSQLiteMCPTokenStore — per-user MCP OAuth tokens
  • OrchidSQLiteMCPClientRegistrationStore — RFC 7591 dynamic-client registrations
  • OrchidSQLiteMCPGatewayStateStore — inbound gateway clients / auth codes / tokens
  • OrchidSQLiteIngestionManifest — content-hash tracking for idempotent indexing
  • SQLiteEventStorage (+ four narrow stores) — Pollen + Bloom signal / job / schedule / trigger persistence
  • SQLiteSignalQueue — durable lease-based signal queue with dead-lettering
  • SQLiteMigrationRunner + migrations v001 (all framework-owned tables) and v002 (ingestion manifest)
  • A SQLite visibility fragment for build_run_filter_clause
  • An async SQLite LangGraph checkpointer (registered as the sqlite type)

The visibility fragment and checkpointer auto-register through importlib.metadata entry points — no manual register_* calls.

Installation

pip install orchid-storage-sqlite

Usage

Reference the classes you need in your orchid.yml:

storage:
  class: orchid_storage_sqlite.chat_storage.OrchidSQLiteChatStorage
  dsn: ~/.orchid/chats.db

config_storage:
  enabled: true
  class: orchid_storage_sqlite.config_storage.OrchidSQLiteConfigStorage
  dsn: ~/.orchid/chats.db

checkpointer:
  type: sqlite
  dsn: ~/.orchid/checkpoints.db

For MCP gateway / OAuth deployments, add:

mcp_token_store:
  class: orchid_storage_sqlite.mcp_token_store.OrchidSQLiteMCPTokenStore
  dsn: ~/.orchid/chats.db

mcp_client_registration_store:
  class: orchid_storage_sqlite.mcp_client_registration_store.OrchidSQLiteMCPClientRegistrationStore
  dsn: ~/.orchid/chats.db

mcp_gateway_state_store:
  class: orchid_storage_sqlite.mcp_gateway_state_store.OrchidSQLiteMCPGatewayStateStore
  dsn: ~/.orchid/chats.db

For the events block (Pollen + Bloom):

events:
  enabled: true
  store:
    class: orchid_storage_sqlite.event_storage.SQLiteEventStorage
    extra_args:
      dsn: ~/.orchid/chats.db
  queue:
    class: orchid_storage_sqlite.event_queue.SQLiteSignalQueue

Or build any of them programmatically:

from orchid_storage_sqlite import OrchidSQLiteChatStorage, SQLiteSignalQueue, SQLiteEventStorage

storage = OrchidSQLiteChatStorage(dsn="~/.orchid/chats.db")
await storage.init_db()

Use :memory: for tests and ephemeral runs.

Schema ownership

The single v001_initial_schema migration creates all framework tables (chat, MCP, events, agent_configs, conversation_summaries) in one pass; v002_ingestion_manifest adds the indexing manifest. All store classes share the same migration runner, so it does not matter which class triggers init_db() first; subsequent calls become no-ops thanks to CREATE TABLE IF NOT EXISTS.

Integrators can append their own migrations on top of this package's by setting extra_migrations_package (a dotted import path) on the storage class — their migrations run after the framework's and are recorded with an ext: prefix in the shared _migrations table.

Development

cd orchid-storage-sqlite
pip install -e ".[dev]"
pytest tests/ -x
ruff check orchid_storage_sqlite/ tests/

Tests use :memory: / tmp_path SQLite databases — no services required.

License

MIT

Metadata

Release files for orchid-storage-sqlite 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orchid-storage-sqlite 1.1.0
File Size Uploaded
orchid_storage_sqlite-1.1.0.tar.gz 45.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for orchid-storage-sqlite 1.1.0
File Interpreter ABI Platform
orchid_storage_sqlite-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 78.8 kB

Release files / orchid_storage_sqlite-1.1.0.tar.gz

Download URL orchid_storage_sqlite-1.1.0.tar.gz
Size 45.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2f875c7a8322c5f927880d6618b2bdc069c258ae6ae559278141a4fb9862e80f
BLAKE2b-256 checksum
How to use checksums
6b9eac45dbc72a0fa50c6387065c86bd6ebb6a785df51a2256ad00485297b410
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / orchid_storage_sqlite-1.1.0-py3-none-any.whl

Download URL orchid_storage_sqlite-1.1.0-py3-none-any.whl
Size 33.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e37fc1d0bb8d7f4e8e8249e00cea5a009c551cceeee58aa9e208f27de94e73fc
BLAKE2b-256 checksum
How to use checksums
0c8cf8e7ba84a796e9ab2abdf6e3fe02a8f57480ede2238f35892dcd375aeecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page