REF. C: COMPARATIVE ANALYSIS

How kontexta compares


MATRIX C: CAPABILITY COMPARISON
CapabilityCLAUDE.mdVendor memorymem0LinkseeCosmoskontexta
Setup costNone, just a fileNone, built inSDK integration in your appnpx linksee-memory setupCurl install + macOS handler for iMessage / calendarnpx kontexta start + kontexta.json
Cross-agent portabilityPer-agent flavored files drift apartLocked to one vendorApp-level, not agent-levelOne SQLite read by Claude, Cursor, Codex, GeminiOne .polarity graph across any MCP clientSame MCP surface for Claude Code, Cursor, Codex, Gemini, Aider
Retrieval modelWhole file dumped into contextWhole file / vendor-managedVector + graph (semantic)6-layer structured memory + AST diff cacheKnowledge graph, NL-synthesized on queryFTS5 + local cross-encoder reranking + regex; surgical section reads
Self-editing memoryManual edits onlyAppend-only per sessionAppend-only + dedupDrift detection vs locked decisions (map.yaml)Append-only, graph re-synthesized on readDistill loop rewrites summaries from event log
Command executionN/AVendor-defined toolsN/A (memory only)N/A (memory only)N/A (memory + graph only)Sandboxed Hands with per-command contracts and approval
Token accountingNoneNoneNone exposed to agentDiff cache reduces re-read costNone exposed to agentEvery response carries est_tokens / size_bytes
StorageRepo file (clutters PRs)Vendor cloudSelf-host or hosted, vector DBLocal SQLiteHosted cloud graph (.polarity export)Sealed local SQLite + Brotli revisions; optional E2E Brain sync
Data ingestionNoneChat history onlyVia SDK ingestionAgent-writes onlyiMessage, browser, calendar, shell historyURL clipping + agent-writes; no personal-data vacuum
Best atStatic project conventionsZero-config personal memorySemantic recall inside one appCatching agent drift from locked decisionsPersonal knowledge graph across life appsMulti-agent handoff + governed local execution
REF. C.1: DESIGN RATIONALE

Why kontexta


R-01

One vault, every agent

Same MCP surface for Claude Code, Cursor, Codex, Gemini, Aider, Copilot. Switch tools mid-project; the vault and journal follow.

R-02

Self-editing memory

Everyone else appends. Kontexta's distill loop rewrites the raw event log into per-topic markdown summaries the next session searches instead of re-deriving.

R-03

Governed execution

Every Hands command is declared in kontexta.json. Approval gates for the destructive ones. No rogue shell.

R-04

Deterministic retrieval

SQLite FTS5, not vectors. Exact keyword and regex search, no embedding hallucination, no third-party API.

R-05

Context economy

Surgical fetching: outlines, sections, search excerpts. Every response carries est_tokens so agents budget intentionally.

R-06

Local-first architecture

Your vault on your SSD, fully offline. Sync across machines is optional and end-to-end encrypted: the relay only ever stores ciphertext.

NOTES & TOLERANCES

Security & internals


How retrieval, journaling, and sandboxing actually work under the hood.

How 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).
Does 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_write (kind: 'note' for decisions, kind: 'intent' for topic pivots), but the durable capture happens with zero agent involvement. Periodic distillation (manual via journal_distill, 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.
What 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.
How are file-system operations protected?
Every path is checked with assertPathInside before read or write; files cannot escape their project root or KB base. files_move 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.
Does ranking search results send my notes to an AI service?
No. Candidates come from SQLite FTS5, then a small cross-encoder reranks them on your own CPU. The model ships in the kontexta-reranker-model npm package, so nothing is downloaded or called at query time. Each match carries its rerank_score.
What happens if the reranker is slow or unavailable?
You get the keyword order, not an error. Reranking has a 300 ms budget by default (about 220 ms for 30 candidates on an Apple M4). If it runs out, the response is flagged rerank_fallback: true. Raise search.rerank.timeout_ms or set search.rerank.enabled to false in kontexta.json to change that.
What about secrets in logs and the journal?
Tool arguments are redacted before they reach the journal: keys that look like passwords, tokens, secrets, cookies or API keys are replaced, and oversized values are truncated. Hands output is capped and bounded so a runaway process cannot leak via log volume. Anything synced to a relay is encrypted on your machine first.
kontexta (kon-TEX-tah) · by safiyu · REV 7.2.2 · Apache-2.0