Local-first, IDE-agnostic agentic memory lifecycle manager
Project description
ContextOS
Local-first agentic memory lifecycle manager for Claude Code, Cursor, Codex, Continue, and Aider.
ContextOS runs as a background daemon between your IDE and the cloud LLM. It classifies your conversation history by relevance, compresses stale turns into narrative summaries via a small on-device model, and forwards a clean, minimal payload upstream — cutting input tokens 50–70% on long sessions without quality loss.
Zero bytes of your session content leave your machine except the request that goes to your chosen cloud LLM (Anthropic, OpenAI) — which is exactly what your IDE was going to send anyway, just smaller.
Built by DataDojo. Apache-2.0.
Install
pip install contextos-dd
contextos install
That's it. contextos install:
- Detects supported IDE configs (Claude Code, Cursor, Codex CLI, Continue, Aider)
- Backs them up to
~/.contextos/backups/ - Patches them to route through the local proxy on
127.0.0.1:9137 - Downloads two small models (~430 MB total, one time) to
~/.contextos/models/ - Starts the daemon
The model download happens once during install so the first long session doesn't pause for it. For air-gapped or offline installs, use contextos install --skip-models.
See INSTALL.md for the full first-run walkthrough, paths, privacy guarantees, troubleshooting, and uninstall semantics.
What gets downloaded
| File | Size | Purpose | Where |
|---|---|---|---|
Qwen2.5-0.5B-Instruct-Q4_K_M.gguf |
~400 MB | Compaction (summarising stale turns) | ~/.contextos/models/ |
bge-small-en-v1.5 ONNX |
~30 MB | Embeddings (vector recall) | ~/.contextos/models/ |
Both download once, then live on disk forever. Subsequent runs use the cache. Re-pull anytime with contextos warmup.
Commands
| Command | What it does |
|---|---|
contextos install |
Detect IDEs, back up configs, patch URLs, download models, start daemon |
contextos install --skip-models |
Same as above but skip the model download |
contextos warmup |
Download / refresh local models |
contextos status |
Show daemon health and detected IDEs |
contextos start / stop |
Daemon lifecycle |
contextos dashboard |
Launch the Streamlit dashboard at http://127.0.0.1:9138 |
contextos doctor |
Preflight checks: paths, deps, ports, IDE configs |
contextos uninstall |
Restore original IDE configs, stop daemon |
How it works
- IDE sends API call →
localhost:9137 - Proxy parses messages, classifies turns HOT / WARM / COLD / DEAD
- DEAD (duplicates) dropped, COLD runs replaced with a narrative summary from the local Qwen2.5 model
- Clean payload forwarded to
api.anthropic.com/api.openai.com - Response streamed back unchanged; trigger phrases like "as we discussed" fire a vector recall from a local LanceDB archive for the next turn
Privacy
- Your code never goes to a third party. The only outbound network call ContextOS makes is forwarding your IDE's API request to the cloud LLM you already configured your IDE to use.
- No telemetry. Zero. We do not phone home.
- No cloud sync. Sessions, summaries, embeddings, and logs live in
~/.contextos/on your machine. - No background uploads. Ever.
The only network traffic ContextOS initiates on its own:
- Model downloads during
installorwarmup— fetched from HuggingFace. - Forwarding your IDE's chat requests upstream — exactly the request your IDE built.
Where stuff lives
~/.contextos/
ledger.duckdb # session + turn ledger
daemon.pid # daemon process id
backups/ # IDE configs we modified (so uninstall is reversible)
archive/ # LanceDB vector store of compacted turns
models/ # Qwen2.5 GGUF + bge-small ONNX
logs/contextos.log # rolling daemon log
contextos uninstall restores IDE configs and stops the daemon. By default it does not delete the ledger or models — they stay in case you reinstall. To wipe everything, delete ~/.contextos/ manually.
Status
Phase 1 MVP (this package): proxy, ledger, classifier, compactor, retrieval, Streamlit dashboard, auto-install for 5 IDEs.
context-os-pro (separate package, deferred): MCP server, team / shared memory, cloud rollups, React dashboard, advanced semantic classifier.
Develop
git clone https://github.com/DataDojo/context-os
cd context-os
pip install -e ".[dev,dashboard]"
ruff check .
pytest -q
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextos_dd-0.1.2.tar.gz.
File metadata
- Download URL: contextos_dd-0.1.2.tar.gz
- Upload date:
- Size: 39.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
496a881729bea7f046b29736dc714e265975c734860d802e691127e3a3868455
|
|
| MD5 |
11aaf81701f587619c059d39a3d78ece
|
|
| BLAKE2b-256 |
a8e8024d3117542d1daac75cd30135e3461bbea7eea65ced73a46114354166b1
|
Provenance
The following attestation bundles were made for contextos_dd-0.1.2.tar.gz:
Publisher:
release.yml on skappal7/context-os
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextos_dd-0.1.2.tar.gz -
Subject digest:
496a881729bea7f046b29736dc714e265975c734860d802e691127e3a3868455 - Sigstore transparency entry: 1554002590
- Sigstore integration time:
-
Permalink:
skappal7/context-os@3ca1bdf17f204dc350d45f097a38cfc03b7e9a78 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/skappal7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3ca1bdf17f204dc350d45f097a38cfc03b7e9a78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file contextos_dd-0.1.2-py3-none-any.whl.
File metadata
- Download URL: contextos_dd-0.1.2-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a11a776c5f43b6cf32f4dfc384435bf047e7303c2fe087a8292ae6d5c3e30aba
|
|
| MD5 |
4052cf48b028a03ddc64e0e6a62d3f07
|
|
| BLAKE2b-256 |
9a9de3c34df6236604354e9f52b1253a523bb1d1b00d8d9aa98b40a054c361ec
|
Provenance
The following attestation bundles were made for contextos_dd-0.1.2-py3-none-any.whl:
Publisher:
release.yml on skappal7/context-os
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextos_dd-0.1.2-py3-none-any.whl -
Subject digest:
a11a776c5f43b6cf32f4dfc384435bf047e7303c2fe087a8292ae6d5c3e30aba - Sigstore transparency entry: 1554002604
- Sigstore integration time:
-
Permalink:
skappal7/context-os@3ca1bdf17f204dc350d45f097a38cfc03b7e9a78 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/skappal7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3ca1bdf17f204dc350d45f097a38cfc03b7e9a78 -
Trigger Event:
push
-
Statement type: