Brain
The context engine.
Git-backed markdown vault with FTS5 search, surgical section edits, and token-aware reads.
AI coding agents are stateless by default. Every new session loses architectural decisions, prior debugging context, operational conventions, and execution history.
Teams compensate with bloated CONTEXT.md files that dump everything into the context window on load (consuming massive tokens), get locked into vendor-specific memories, or waste time on repetitive re-explanation when switching agents.
Kontexta turns agent context into a persistent, local-first system. Instead of blindly loading whole files, it surgically fetches only the specific context needed, drastically reducing token consumption.
Claude Code solves a bug and automatically journals it. Cursor reads the journal and picks up exactly where Claude left off. Zero re-explanation.
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.
A closed feedback loop that turns observation into durable knowledge.

The context engine.
Git-backed markdown vault with FTS5 search, surgical section edits, and token-aware reads.
Governed execution.
Sandboxed, project-defined commands declared in kontexta.json with optional human approval.
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.



Manage your agent's memory with a powerful, local-first web interface. Select projects, browse indexed context files, and inspect the Brain in real-time.
Define powerful, governed agent capabilities using the Hands builder. Use the Template Gallery to quickly add standard tools or create custom, project-specific commands.
Synchronize your context across devices with two-way Git integration. Track changes with granular version history (Time Travel) and restore previous states directly from the dashboard.
Explore 16+ More Powerful Developer Features
Switch from Claude Code to Aider or Continue mid-project. Both read the same vault and journal back into it.
Every tool call is captured server-side without agent involvement. Periodic distillation turns the raw event log into per-topic markdown summaries you can search, share, and version.
Every Hands command is declared in kontexta.json. Approval gates for the destructive ones. No rogue shell.
SQLite FTS5, not vectors. Exact keyword and regex search — no embedding hallucination, no third-party API.
Surgical fetching: outlines, sections, search excerpts. Every response carries est_tokens so agents budget intentionally.
Your vault on your SSD. No cloud sync, no upload. KONTEXTA_DATA_DIR points wherever you want.
kontexta turns AI agents from isolated chat sessions into a continuous operational system.
Choose your setup. Use Docker or Manual to unlock the full powerhouse of WebUI features.
Persistent vault on a host volume.
Clone, build, run. Apache-2.0.
No install required — npx fetches and runs.
Where your agent configuration files reside. Copy and paste these paths to your terminal, or use the Kontexta WebUI for pre-filled setup commands.
Access http://localhost:3000 in your browser.
Click Configure in the top bar or navigate directly to /docs.
Select MCP SERVER CONFIG, choose your agent, and copy the pre-filled snippet.
Link your knowledge vault to a private git remote via the Sync menu. This enables two-way synchronization, ensuring your project context and agent configurations are securely backed up and shared across all your development environments.
Configuration for Claude Code, including API keys and agent settings.
Cursor's configuration file for agent behavior and workspace settings.
Gemini's configuration file for agent settings and API access.

Cline's configuration file for agent behavior, model settings, and MCP server integrations.

Continue.dev uses a JSON configuration file for custom MCP servers and system prompts.
Configuration for the Antigravity agentic workspace and tool integrations.
OpenClaw's configuration file for agent behavior, model settings, and MCP server definitions under mcp.servers.

Aider's configuration file for agent settings, model preferences, and MCP server integrations.
A deterministic, governable suite of capabilities for your agents.
FTS5 keyword search with inline match excerpts and tag/token metadata.
query: string (FTS5 query) project_id: number | null (Filter by project) tags: string[] (Required tags)
{
"results": [
{ "id": number, "title": string, "excerpt": string }
]
}The honest answers to the things you should be asking before you point an agent at your codebase.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
Apache-2.0. Use it commercially, fork it, embed it. No telemetry callback, no rug pull.
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.