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.2.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.2.0
File Size Uploaded Provenance Actions
orchid_storage_sqlite-1.2.0.tar.gz 46.2 kB With provenance Details for orchid_storage_sqlite-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 79.9 kB

Release files / orchid_storage_sqlite-1.2.0.tar.gz

Download URL orchid_storage_sqlite-1.2.0.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
037d36358779199844fac64874740af63c5444c5a1501c9ffa7b00b8665deb58
BLAKE2b-256 checksum
How to use checksums
af691e5f100c4d8bcf26ce99049bc66227a32d6f194d3cb65b98ea23e2747f0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

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

Download URL orchid_storage_sqlite-1.2.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae175d9e579deddabb6bad59d3af7f130635d1c2dd8d9dc438ffac22856e6542
BLAKE2b-256 checksum
How to use checksums
3bef361756d7e9e42160182f1e1d2e35cf5330782f93c207f79fa647f8ee2ae3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 20, 2026.

Transparency log

Security for orchid-storage-sqlite 1.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for orchid_storage_sqlite-1.2.0.tar.gz

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 Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files Full provenance

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