Long-lived memory creates a different failure mode from a one-off bad answer: a weak or misunderstood memory can be recalled again in later sessions.
Kosh Verify is LLM-Kosh's evidence-aware verification surface. Given the evidence already present in a cartridge, it can produce a structured report containing temporal context, supporting facts, causal paths, contradictions, inferred-but-not-discovered relationships, missing evidence, stability information, and an explicit abstention state when there is not enough evidence.
It is not a universal truth oracle and it does not make an imported source trustworthy simply because it was stored. The aim is to preserve the difference between what the cartridge observed, what it inferred, what conflicts, and what it cannot support.
Try the deterministic synthetic incident demo:
llm-kosh --root ./kosh-demo kosh-verify \
"Why did checkout fail and what evidence contradicts the explanation?" \
--when "2026-05-01T13:30:00+00:00" \
--depth 5 \
--demo-seed \
--json
--demo-seed writes synthetic incident evidence into the selected root, so use a disposable directory. The same behavior is covered by automated tests and a network-free acceptance harness:
python scripts/kosh_verify_acceptance.py
See Kosh Verify for the contract, boundaries, API example, MCP surface, and reproducible checks.
What makes LLM-Kosh different
Capability
LLM-Kosh
Local-first persistent memory
✅
MCP-native access
✅
Human-inspectable storage
✅
Tamper-evident mutation ledger
✅
Read-only-by-default agent access
✅
Evidence-backed context packs
✅
Temporal/causal verification
✅
Contradiction and evidence-gap reporting
✅
Explicit no-evidence abstention
✅
Hosted memory service required
❌
Automatic cloud sync required
❌
Architecture
flowchart TB
A[AI client / agent] -->|MCP| R[Access layer]
M[CLI] --> R
N[Background service] --> R
O[Local HTTP MCP - optional] --> R
subgraph KOSH[LLM-Kosh]
R
C[Memory]
D[Evidence]
E[Search]
F[Policy]
G[Ledger]
H[Context packs]
V[Kosh Verify]
R --> C
R --> D
R --> F
C --> E
C --> G
C --> H
C --> V
D --> V
end
C --> I[(Local cartridge)]
D --> I
E --> I
G --> I
I --> J[Plain files]
I --> K[SQLite / FTS]
I --> L[Audit ledger]
The repository root contains the code. The cartridge root contains the live memory store. Watched intake folders can feed new material into the cartridge without mixing runtime data into the source checkout.
That installs the package, creates the default cartridge at ~/.llmkosh/cartridge, configures local defaults, and registers supported desktop integration where possible.
local CLI for creating, searching, importing, packing, and verifying cartridges
governed llm-kosh-memory CLI for proposing, recalling, inspecting, conflicting, and explicitly reviewing Trusted Memory
Kosh Verify CLI and Python API for evidence-aware temporal/causal verification
deterministic Kosh Verify incident demo and acceptance tests
local MCP server with explicit write, mutation, and private-export capability gates
source-level MCP composition that adds read-only kosh_verify plus governed Trusted Memory tools without changing those gates
background service for intake and maintenance jobs
plain-file, inspectable storage with local indexes
tamper-evident mutation ledger
GitHub Actions test, quality, security-scanning, and publishing workflows
experimental company-brain foundation for evidence-backed memory and cited context
The remaining release work is primarily desktop packaging polish and signing across Windows, macOS, and Linux. The llm-kosh-mcp and llm-kosh-memory entry points described here are present on current master source and are intended for the next package release; the currently published PyPI 2.1.3 package predates those entry points.
Use with MCP clients
The currently published package exposes the standard MCP server through the existing CLI:
llm-kosh --root ./my-cartridge mcp-server
On current source, the composed MCP entry point exposes the standard server, read-only kosh_verify, and governed Trusted Memory tools:
The Trusted Memory MCP surface is deliberately permissioned:
trusted_memory_recall, trusted_memory_inbox, trusted_memory_conflicts, and trusted_memory_explain are read-only.
trusted_memory_propose requires --allow-write.
trusted_memory_review requires --allow-mutate.
agent-created proposal evidence is recorded as agent_observation, never self-elevated to user_direct.
explicit review can change lifecycle without rewriting the original source authority; strict recall still requires authoritative/trusted evidence.
Kosh Verify does not require additional privileges. Write, mutation, and private-export capabilities remain opt-in and continue to use the standard server flags:
Treat HTTP transport as a real network boundary if you expose it beyond loopback. See Trusted Memory over MCP for the governed memory contract, Kosh Verify for the kosh_verify contract, and MCP guide for general MCP setup.
Company-brain foundation
The experimental company-brain layer extends the cartridge beyond simple note recall. It introduces reference-first evidence, session and episode understanding, evidence-backed memories, review lifecycles, permission-first retrieval, and structured cited context packs.
Migrate an existing cartridge:
llm-kosh --root ./my-cartridge brain migrate --dry-run
llm-kosh --root ./my-cartridge brain migrate
llm-kosh --root ./my-cartridge brain health
llm-kosh --root ./my-cartridge brain context "Prepare the next project decision"
Register existing files without copying their source bytes:
Cartridge root — the live memory store selected by --root or LLMKOSH_ROOT.
Watched intake folders — receipts/, intake/, and configured external drop folders.
If files are dropped into cartridge intake areas, the service can process them asynchronously. External folders can also be watched through [daemon].watched_directories.
LLM-Kosh is intentionally conservative around agent privilege and export boundaries:
storage and search are local by default
there is no automatic cloud sync or package telemetry
MCP starts read-only
write, mutation, and private-export capabilities require explicit opt-in
optional HTTP transport is a real network boundary and should be configured accordingly
exported context is checked for common secret patterns before sharing
cartridge files are plaintext by design, so use operating-system disk encryption when local data at rest requires encryption
See SECURITY.md for the canonical threat model, reporting guidance, and current security boundaries.
Project status
LLM-Kosh is actively maintained open-source infrastructure for durable agent memory.
The Python package, CLI, MCP server, local service, Kosh Verify surface, test workflow, and publishing path are operational. Current work focuses on interoperability, packaging, governed memory, evidence-aware verification, and making the project easier for external contributors to extend safely.
The Electron desktop app is packaged separately from the Python package. Local developer builds and Windows installer smoke tests are supported; public GA desktop distribution still requires verified Windows code signing and macOS Developer ID signing/notarization.
Run the small public verification acceptance contract separately:
python scripts/kosh_verify_acceptance.py
For packaging or release changes:
python -m build
python -m twine check dist/*
Native C++ math acceleration is optional. Set LLM_KOSH_BUILD_NATIVE=1 and install pybind11 before building to test it. Release wheels use the portable pure-Python fallback.
Contributing
Contributions are welcome, especially around:
MCP interoperability
tests and regression coverage
packaging and cross-platform reliability
documentation
local-first memory workflows
security hardening
evidence and retrieval quality
reproducible verification and benchmark methodology
Please read CONTRIBUTING.md before proposing substantial changes. Use GitHub Issues for reproducible, non-sensitive bugs and feature proposals, and follow SECURITY.md for security-sensitive reports.