Skip to main content

SQLite + FTS5 memory store and 19 MCP-style tools for OpenContext Runtime

Project description

opencontext-memory

SQLite + FTS5 memory store and 19 MCP-style tools for OpenContext Runtime.

This package is the concrete memory backend the conductor (opencontext-sdd) and the CLI (opencontext memory v2 …) read and write through. It is local only — no network, no cloud sync, no third-party drivers — and rides the Python 3.12 stdlib sqlite3 (FTS5 is built-in on the supported versions).

Public exports

from opencontext_memory import MemoryStore, WriteQueue

Storage shape

The canonical schema lives in opencontext_memory/store/schema.sql and is the single source of truth for tables, indices, and the FTS5 virtual table. MemoryStore loads it on first open.

Table Role
observations Canonical row store (id, sync_id, …, deleted_at)
observations_fts FTS5 mirror of observations(title, content)
memory_relations 7-verb × 4-status typed relations
sessions mem_session_start / mem_session_end

Cross-process safety

Concurrent writers in the same process serialise through a per-connection lock; concurrent writers across processes serialise through WriteQueue, which uses fcntl.flock on POSIX and a msvcrt-compatible lockfile on Windows.

Mock LLM

The package never makes network calls. The tests/conftest.py autouse fixture asserts no real LLM env vars are set during test execution so future tool surface inherits the same guarantee.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencontext_memory-0.1.0-py3-none-any.whl (53.9 kB view details)

Uploaded Python 3

File details

Details for the file opencontext_memory-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opencontext_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d78d568243ace83a36a8b98c7b23ff5d8e269cfdb03d3b9e957707583d4a6d7
MD5 b92f3f6326624fdb7379164a1dfd19d3
BLAKE2b-256 888f78bc0568088ed80c2f19ba1dd1858547751ce6c11b7bdcdc10a149267bd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page