This release is a pre-release and may not be stable for production use.
pip install contextos-memory-runtime==1.0.0rc2 Copy PIP instructions
ContextOS is a local-first, model-independent AI memory runtime. It is not a chatbot. It accepts activity through a privacy boundary, extracts candidate facts, resolves temporal state, persists memories in SQLite, and supplies bounded context to a chosen model. A local daemon exposes a CLI and API; optional STDIO MCP and explicitly configured connectors use the same memory pipeline.
Long conversation histories are expensive and can carry stale or contradictory facts. ContextOS combines lexical and dense retrieval, temporal eligibility, a token-aware selector, and a context compiler. It records what it selected and what it could prove, without claiming that fewer context tokens automatically improve answers or provider billing.
Python 3.12+ is declared; this release has been verified on Windows with Python 3.13. Python 3.12 is not yet validated. Core defaults and the offline demo require no commercial API key, model download, or tokenizer cache.
Core lightweight installation (uses deterministic/local capabilities):
Rebuilt RC2 archives are approximately 220 KB for the wheel and 300 KB for the sdist (decimal units). These sizes exclude installed dependencies. Run python tools/validate_release_artifacts.py after a rebuild for exact byte counts.
With optional local sentence-transformers embeddings extra:
pip install -e ".[dev]" Usage contextos demo contextos start contextos doctor contextos stats "I prefer concise technical explanations." | contextos memories remember contextos inspect "What explanation style do I prefer?" contextos stop The daemon listens on loopback by default. Review your local configuration before changing its host, connector roots, MCP permissions, or provider settings. Prefer memories remember for private text: a command-line argument may be visible in process lists and shell history.
Input flows through privacy scanning, extraction, temporal acceptance, and SQLite persistence. Retrieval reads the memory store through ephemeral BM25 and dense indexes. The graph is a separate deterministic projection. The optimizer selects within a token budget; the compiler turns selected memories into context with fact/provenance evidence. The router sends the prepared request to a configured local or optional remote provider. Graph-assisted retrieval remains opt-in because its ranking performance is mixed in the local benchmark.
See architecture, explainability, and RAG inspector for exact boundaries. Explainability and inspection describe ContextOS preparation, not an unseen provider wire payload. Provider dispatch is NOT_ATTEMPTED during inspection.
Secret scanning does not universally redact private filesystem paths. Selected graph/provenance output surfaces suppress path-shaped labels; terminal sanitization removes control sequences. These are separate output protections.
Secrets are scanned before accepted memory is stored; the legacy --skip-secret-scan request field does not disable that boundary. Metadata dashboards omit memory bodies, prompts, source paths, and credentials by default. Explicit content-view commands can reveal private text on your terminal; use them deliberately. Local storage is not a substitute for OS disk encryption or trusted local-user access.
Credential-free local file and JSON/JSONL connectors must be configured explicitly; none are registered by default. See connectors. MCP is disabled by default, uses STDIO, and separates read, write, and telemetry permissions; see MCP. Ollama and compatible local endpoints are first-class options; external providers are optional. FakeProvider supports deterministic tests/demo and is identified as simulated.
The benchmark compares full history, vector, hybrid, hybrid+graph, and compiled ContextOS context on ten fixed questions at 100 and 1,000 synthetic memories. It reports relevance ranking and context tokens, not answer quality. The security, performance, demo, and release checklist documents separate measured, simulated, and unverified claims. A 5,000-memory run is opt-in. No cloud deployment or commercial-provider proof is implied by the local test suite.
Answer quality is NOT VALIDATED. Live providers have not been comprehensively validated. Graph retrieval stays opt-in because the current synthetic benchmark shows a recall/latency tradeoff. Latest independent cold CLI startup was approximately 2.27 seconds median on Windows; this is a local measurement, not a guarantee.
python -m pytest tests -q -ra python -m compileall -q src tests python -m contextos.benchmarks.final python -m pip check git diff --check make test, make lint, make typecheck, and make check are available when make is installed. The package is currently version 1.0.0-rc2. License: MIT.
Background contextos start polls the initialized daemon for up to 10 seconds before reporting success. Existing-daemon readiness requires the health PID to match the verified recorded PID at the configured host and port. Startup and stop share a Windows/POSIX lifecycle lock with a 15-second acquisition timeout; concurrent starters wait, then report the verified daemon as already running. The persistent contextos.lock file is reusable and OS lock ownership is released on process exit. PID publication is atomic, and failed startup cleans up only its own process tree and matching PID state. contextos doctor can be run immediately after a successful start.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




