Kontexta — context engine for coding agentsDWG NO. KX-66 · REV 4.0.0

AI agents forget. kontexta remembers.

Persistent context, governed execution, and cross-agent continuity for Claude Code, Cursor, Aider, Cline, Continue, Copilot, Gemini, Codex, Antigravity, OpenClaw, and more.

  • Local-first
  • No cloud
  • Your machine, your data
  • Apache-2.0
$npx -y kontexta-mcp
FIG. 1a
BRAIN
the vault
FIG. 1b
HANDS
the sandbox
FIG. 1c
EYES
the journal
66
MCP Tools
10+
Clients
100%
Local
4x
Token Savings
kontexta MCP server score
SEC. 01 — THE PROBLEM

The Context Gap


Every new agent session starts from zero. One page from the same log — before kontexta, and after.

Without kontexta, a new agent session cannot see the previous session's decisions — they are effectively redacted. With kontexta, the next agent recovers the same decisions from the journal.

SESSION_04.LOG — CLAUDE CODE
> decided to use for auth
> because
> known issue:
// session ends — none of this survives
SESSION_05.LOG — CURSOR
> decided to use JWT sessions for auth
> because refresh tokens leak in the old flow
> known issue: rate limit at 100 req/min
FIG. 1 — RECOVERED FROM JOURNAL
left: what a new session sees without kontexta · right: what it sees with kontexta
SEC. 02 — FIELD DEMONSTRATION

Product in Action



FIG. 2 — PRODUCT SPECIMENS · 06 PLATES
FIG. 2a
Interactive Dashboard

Interactive Dashboard

Local-first dashboard for managing memory, browsing context, and inspecting the Brain live.

PLATE 01/06 · DASHBOARD
FIG. 2b
Hand Creation

Hand Creation

Define governed capabilities via templated or custom project-specific commands.

PLATE 02/06 · HANDS
FIG. 2c
Git Persistence & History

Git Persistence & History

Two-way Git sync with granular version history and one-click restore.

PLATE 03/06 · SYNC
FIG. 2d
Agent Journal

Agent Journal

Distilled per-topic summaries auto-generated from every MCP tool call.

PLATE 04/06 · JOURNAL
FIG. 2e
Docs Publisher

Docs Publisher

Turn your knowledge base into a shareable, published documentation site.

PLATE 05/06 · PUBLISH
FIG. 2f
Secure Login

Secure Login

Sign in with one-time login codes — no passwords to leak, no shared secrets.

PLATE 06/06 · LOGIN

FIG. 3 — ADDITIONAL CAPABILITIES · 16+ UNITS
F-01
Vault ManagementLocal-first knowledge
F-02
Agent JournalingDistilled summaries
F-03
MCP ConnectorUniversal API integration
F-04
SQLite FTS5Zero-hallucination search
F-05
Markdown StudioNative MD editing
F-06
Mermaid VisualsMMD diagram rendering
F-07
Zero-Trust PrivacyLocal-only security
F-08
Clipping EngineInstant web docs
SEC. 03 — MEASURED · cl100k_base

Unmatched Context Efficiency


Dumping entire codebases into your AI's context window is expensive and degrades response quality. Kontexta's MCP server retrieves only the precise files needed.

72.8%
Fewer tokens consumed per task
4.0×
Context budget freed for reasoning
Surgical
Reads specific files & markdown sections
SEC. 04 — SYSTEM SCHEMATIC

Brain → Hands → Eyes


A closed feedback loop that turns observation into durable knowledge.

FIG. 4a · 01

Brain

The context engine.

Git-backed markdown vault with FTS5 search, surgical section edits, and token-aware reads.

FIG. 4b · 02

Hands

Governed execution.

Sandboxed, project-defined commands declared in kontexta.json with optional human approval.

FIG. 4c · 03

Eyes

Automatic feedback loop.

Every MCP tool call is captured to a per-project event log without agent involvement. Periodic distillation turns raw events into per-topic markdown summaries indexed alongside the vault.

OPERATING PRINCIPLE

kontexta turns AI agents from isolated chat sessions into a continuous operational system.

SEC. 05 — INSTALLATION

Install


Choose your setup. Use Docker or Manual to unlock the full powerhouse of WebUI features.

OPT-01
Docker
Recommended

Persistent vault on a host volume.

View procedure →✓ Full WebUI
OPT-02
Manual
Advanced

Clone, build, run. Apache-2.0.

View procedure →✓ Full WebUI
OPT-03
npm
Quick Start

No install required — npx fetches and runs.

View procedure →
SEC. 06 — NOTES & TOLERANCES

Questions & security


The honest answers to the things you should be asking before you point an agent at your codebase.

N-01Where does my data live?
On your machine. By default, data lands at ~/.local/share/kontexta (Linux), ~/Library/Application Support/kontexta (macOS), or %APPDATA%\kontexta (Windows) — no configuration needed. You can override this with KONTEXTA_DATA_DIR. Everything is indexed in a local SQLite database. Nothing is sent to a third-party service — no embeddings API, no telemetry, no cloud sync. Your only outbound traffic is the optional git push to a remote you configure yourself.
N-02How is this different from a vector DB or RAG pipeline?
Kontexta uses SQLite FTS5 for deterministic keyword and regex retrieval — no embeddings, no semantic-similarity guesswork. The same query returns the same results, every time. You also get exact substring/regex search (catches URLs, identifiers, hyphenated terms that tokenisers miss).
N-03How is Hands execution sandboxed?
Hands tools are declared per-project in kontexta.json — agents cannot invent commands. Each invocation runs with no shell interpreter, a locked working directory, and a scrubbed environment (only PATH, HOME, USER, LANG, TZ are forwarded). Output is capped via a ring buffer; timeouts kill the entire process group. Argv parameters are validated by re2 patterns (ReDoS-proof) with an 8 KB UTF-8 cap, and the default pattern blocks leading-dash argv injection.
N-04Does the agent need to remember to log its work?
No. The MCP server wraps every tool registration at boot, so every call writes a per-event line to the project's append-only event log automatically — fsynced per write, redacted for sensitive args, with git branch/commit context attached. Agents can enrich the log with journal_note (decisions) or journal_intent (topic pivots), but the durable capture happens with zero agent involvement. Periodic distillation (manual via distill_journal, or scheduled via the WebUI) turns the raw event log into per-topic markdown summaries indexed in the same FTS5 surface as the rest of the vault.
N-05Can I require human approval before destructive commands run?
Yes. Mark a Hands tool as confirm-required and it returns a single-use, CSPRNG-bound token that expires in 60 seconds. The agent must call confirm_hand with that token to actually execute — the token is the auth, and it cannot be replayed.
N-06What stops a malicious URL from hitting my internal network?
The URL clipper performs DNS resolution and rejects every resolved address against a blocklist: loopback, private IPv4/IPv6, link-local, CGNAT, multicast, IPv4-mapped IPv6, and special hostnames (localhost, *.local, *.internal, *.lan). Cloud-metadata endpoints like 169.254.169.254 are blocked. Redirects are followed manually with per-hop re-validation (max 5 hops), so a public URL that 302s into the metadata service is still refused. Response bodies are streamed with a 10 MiB ceiling.
N-07How are file-system operations protected?
Every path is checked with assertPathInside before read or write — files cannot escape their project root or KB base. move_file validates both source and destination containment. Symlinks are skipped (lstatSync) so a loop under your vault cannot recurse forever. Writes are atomic (tmp file + rename) so a crash mid-write cannot corrupt a file. Download responses strip CR/LF from filenames and use RFC 5987 encoding to block HTTP response splitting.
N-08What about secrets in error messages or git output?
Git error output is run through redactCredentials() before logging or returning to clients — user:pass@ patterns in URLs are stripped. Hands output is similarly capped and bounded so a runaway process cannot leak via log volume.
N-09Does it work offline?
Fully. The MCP server, the web UI, and the SQLite index are all local. Git push for backup is optional and the only operation that touches the network.
N-10Which agents work with kontexta?
Anything that speaks MCP: Claude Code, Cursor, Gemini CLI, Codex, Continue, Antigravity, Claude Desktop, Aider, Cline, and OpenClaw. The onboard_agent tool auto-detects and writes the right context file (CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules/*, .continue/rules/*, .aider/kontexta.md, .cline/kontexta.md, .openclaw/kontexta.md) so agents pick up the workflow automatically.
N-11What's the license?
Apache-2.0. Use it commercially, fork it, embed it. No telemetry callback, no rug pull.
N-12How do I configure kontexta for OpenClaw?
Add the Kontexta MCP server to your OpenClaw configuration. For a local Kontexta instance, configure OpenClaw to connect via stdio with command openclaw and args ["mcp", "serve", ...]. For a remote Gateway, use openclaw mcp serve --url wss://gateway-host:18789 --token-file ~/.openclaw/gateway.token. OpenClaw also supports file-based context via .openclaw/kontexta.md.
APPENDIX A — DISTRIBUTION

Get it where you live


PEERLIST LAUNCHED
APPENDIX B — ACKNOWLEDGEMENTS

Thank You Supporters!


We launched Kontexta on Peerlist and received incredible support from the community. A massive thank you to everyone who backed our launchpad debut!

PLATE B — PEERLIST LAUNCHKontexta Peerlist Supporters
kontexta (kon-TEX-tah) · by safiyu · DWG NO. KX-66 · REV 4.0.0 · Apache-2.0