Kontext is Ionut's long-term memory and project-continuity infrastructure for Codex, Claude, ChatGPT, and related agent workflows.
This is the standalone Kontext repository. It is not an Open Brain fork and it is not a generic notes app. The repo contains the original local Kontext tooling plus the current Kontext V2 backend, MCP bridge, client hooks, benchmark/evaluation tooling, and safety gates.
- Kontext V2 is the primary memory backend.
- Legacy Mem0 is compatibility, parity, and rollback only.
- Old project labels inside tests or historical gates are not product identity.
- Do not commit secrets, raw memory dumps, private benchmark bundles, auth/session files, or
.envfiles. - VPS deployment state lives at
/opt/kontext; do not mutate it unless a task explicitly requires deploy/server work.
| Path | Purpose |
|---|---|
tools/kontext-v2/ |
Current Kontext V2 backend, MCP bridge, scripts, benchmarks, gates, and tests |
cloud/, mcp_server.py, db.py, sync.py |
Earlier standalone Kontext implementation and compatibility tooling |
routing/, hooks/, .claude/ |
Client hook/routing helpers |
static_dashboard/ |
Local dashboard assets |
docs/ |
Runbooks, benchmark/evidence notes, and retained Kontext reports |
tests/ |
Tests for the earlier standalone implementation |
For the earlier standalone tooling:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtFor Kontext V2:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r tools/kontext-v2/requirements.txtRun from the repo root.
python -m pytest tests -q
python -m pytest tools/kontext-v2/tests -q
python -m py_compile tools/kontext-v2/scripts/*.py
git diff --checkSome V2 tests require the disposable local Postgres database from tools/kontext-v2/docker-compose.yml:
docker compose -f tools/kontext-v2/docker-compose.yml up -dIf a check needs private bundles, paid model credentials, or VPS-only files, do not fake the result. Say exactly what could not be verified.
- Never ingest raw chats, raw logs, unprocessed transcripts, secrets, or auth/session files.
- Write durable memories through the Kontext MCP/write path, not by editing generated memory artifacts directly.
- Cleanup must be exact-ID or benchmark-namespace scoped with backups.
- Archive/category noise is not permission for bulk deletion.
- Kontext V2 package:
tools/kontext-v2/ - Benchmark/evidence matrix:
docs/kontext-v2-benchmark-matrix.md - Retirement/cutover tooling:
tools/kontext-v2/scripts/
See LICENSE.