ContextLattice
This server provides runtime health checks and project-scoped durable memory retrieval/write capabilities.
health: Runs a non-destructive readiness check and returns status, services, components, and queue information; auth failures may occur if credentials are missing.
memory.search: Performs read-only contextual recall using required
projectandquery, with optionalagent_id,topic_path, grounding citations, and retrieval debug details; reports result state, warnings, source status, and lifecycle metadata.memory.write: Persists durable memory/checkpoints using required
projectName,fileName, andcontent, with optionaltopicPath; may trigger asynchronous fanout/indexing and returns acknowledgement, event ID, dedupe, and fanout status.Usage boundaries: Use
healthfor readiness,memory.searchfor reads, andmemory.writefor persistence; keep project identifiers aligned so retrieval remains coherent.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
ContextLattice
Stop replaying the brief
Models can reason. Harnesses can act. Neither reliably retains the mission when a chat, model, tool, account, or computer changes.
ContextLattice gives that work a durable, inspectable context layer. It reconstructs the active objective, selects the evidence that matters, carries it safely, and records what actually worked—without turning every prompt into a transcript dump or making cloud storage mandatory.
Capability | What changes |
Durable continuity | Reopen the objective, decisions, repository state, risks, proof, and next move as one bounded packet. |
Explainable retrieval | Rank evidence by impact per token and expose source coverage, omissions, opposition, degradation, and receipts. |
Portable context | Move signed, least-privilege continuation across agents and machines while keeping execution and transport caller-owned. |
Verified skill evolution | Discover skills without loading every file, evaluate repeated wins on holdouts, and require review before promotion. |
Privacy-bounded Aggregate Signal | Learn from explicitly opted-in, clipped statistics while raw memory remains local; production activation stays hard-blocked pending independent privacy and utility review. |
The CLI is the primary interface. The dashboard makes behavior and proof visible. HTTP and MCP are companion integration surfaces for applications and harnesses.
Related MCP server: copilot-memory-store
How it works
Stage | ContextLattice does |
01 · Reopen | Reconstructs the one active mission from durable checkpoints and current state. |
02 · Select | Retrieves high-signal evidence into a compact Context Pack with provenance. |
03 · Move | Carries signed, bounded context through Agent Packets, Passports, and encrypted continuation envelopes. |
04 · Earn | Records outcomes and promotes reusable behavior only after deterministic proof and human approval. |
05 · Compound | Improves future retrieval while preserving corrections, contradictions, freshness, and retirement semantics. |
ContextLattice does not replace your agent harness, choose goals from retrieved text, or execute imported context. Local tools remain execution surfaces; memory and remote content remain evidence.
Quickstart
Requirements: macOS, Linux, or Windows through WSL2; a Compose v2-compatible container runtime; and gmake, jq, rg, python3, and curl. The tested macOS baseline uses OrbStack through its explicit Docker context; see the container runtime decision.
1. Install
git clone https://github.com/sheawinkler/ContextLattice.git
cd ContextLattice
cp .env.example .env
gmake quickstartgmake quickstart is the prescribed technical install path; installers are bootstrap alternatives. The command prepares environment wiring, asks for a runtime profile, launches the selected local stack, and validates initial readiness.
2. Verify the runtime and retrieval path
curl -fsS http://127.0.0.1:8075/health | jq
contextlattice doctor --pretty
contextlattice state status --pretty
contextlattice context "verify this ContextLattice installation" \
--project contextlattice \
--prettyHealthy containers are only the first check. The state command verifies the canonical gateway-owned storage inventory; the final command exercises the actual context path and reports source coverage, degradation, evidence, and next actions. Existing installs can use the explicit, reversible procedure in gateway state migration.
For a fuller lifecycle proof from the repository:
scripts/agent/agent-runtime-proof-pack --pretty
scripts/agent/agent-adoption-proof-matrix \
--skip-provider-smoke \
--progress \
--prettyConnect your agents
Run integration from the repository that should use ContextLattice:
cd /path/to/your/project
contextlattice_adopt integrate \
--repo . \
--agents codex,claude-code,opencode,hermes-agent,hermes-ultra,omp,mercury-agent,pi,droid \
--pretty
contextlattice_adopt integrate \
--repo . \
--agents codex,claude-code,opencode,hermes-agent,hermes-ultra,omp,mercury-agent,pi,droid \
--check \
--prettyThe integration command writes bounded managed blocks while preserving existing instruction text. It does not install Codex, Claude Code, OpenCode, Hermes, OMP, Mercury, Pi, Droid, or another third-party agent harness.
External provider discovery is network-free. Provider execution remains explicit and caller-authorized; see the external-provider boundary.
If an agent is performing the installation, it should follow the quickstart directly, avoid cloning a second checkout when already inside one, report the exact failing command and path, and rerun the deterministic check after any repair.
The daily agent loop
# Confirm readiness when the environment is uncertain.
contextlattice doctor --pretty
# Retrieve scoped context before substantial work.
contextlattice context "debug the current release regression" \
--project contextlattice \
--pretty
# Save concise, durable progress.
contextlattice remember \
"Root cause verified; regression test added; focused checks pass." \
--project contextlattice \
--pretty
# Resume without replaying the transcript.
contextlattice resume --project contextlattice --pretty
# Repair stale or wrong recall without silently rewriting history.
contextlattice correct \
"The prior deployment record is stale." \
--category stale \
--project contextlattice \
--pretty
# Close the loop with the verified outcome.
contextlattice finish \
"Regression fixed and verified." \
--success \
--project contextlattice \
--pretty
# Project the next bounded move or bind a completed response to durable proof.
contextlattice_continuous_cognition status "prepare the next verified move" \
--project contextlattice --session-id <session-id> --agent-id codex_gpt5 \
--task-id <task-id> --objective-id <objective-id> --as-of <rfc3339> --pretty
contextlattice_continuous_cognition evaluate "verify the completed response" \
--project contextlattice --session-id <session-id> --agent-id codex_gpt5 \
--task-id <task-id> --task-identity-id <task-identity-id> --as-of <rfc3339> --pretty
# Prepare context for an external worker without exposing its one-shot claim.
contextlattice agent-fit context-prep-schedule --project contextlattice \
--session-id <session-id> --agent-id codex_gpt5 --payload-file prep-request.json --raw
contextlattice agent-fit context-prep-claim --project contextlattice \
--session-id <session-id> --agent-id codex_gpt5 --prep-id <prep-id> \
--worker-id <worker-id> --claim-token-file prep.claim --raw
contextlattice agent-fit context-prep-complete --project contextlattice \
--session-id <session-id> --agent-id codex_gpt5 --prep-id <prep-id> \
--claim-token-file prep.claim --payload-file prep-artifact.json --raw
contextlattice agent-fit context-prep-use --project contextlattice \
--session-id <session-id> --agent-id codex_gpt5 --prep-id <prep-id> \
--task-id <task-id> --effective-profile-digest <sha256-digest> \
--source-generation <generation> --rawContinuous Cognition is advisory-only: each invocation makes one bounded request, returns opaque evidence references, and never dispatches a runner or performs an external mutation. Context-preparation claims stay in an owner-only file and cross the completion/failure boundary only through the protected header; successful explicit use consumes the artifact once.
Find a capability without loading every skill body:
contextlattice_skills_index search "browser automation" --prettyThe active Skills Index scans configured Codex, Hermes, Hermes Ultra, and shared
agent roots read-only. It reports each harness and root inventory separately,
collapses byte-identical SKILL.md files by SHA-256 digest while retaining every
source path as provenance, and requires discriminating query-term coverage
instead of ranking generic words such as skill, index, or agent.
Quarantine discovery remains separate, read-only by default, and never
auto-promotes retrieved content.
Architecture
The default local control path is:
Agent or application
│
▼
ContextLattice CLI / HTTP / MCP
│
▼
Gateway :8075
├── durable write and outbox fanout
├── scoped retrieval and source receipts
├── session, objective, graph, and outcome state
└── dashboard-visible proof and operationsWrites are validated and durably persisted before fanout. Retrieval merges the available sources, ranks bounded evidence, and reports missing or degraded coverage instead of hiding it.
The active application path is Go and Rust. Python remains in build, development, migration, and audit tooling rather than the live request path. The exact runtime and toolset choices are recorded in the v4 runtime decision and container decision.
Public and paid boundaries
The public local lane is account-free and useful on its own. It includes the CLI-first memory lifecycle, Context Packs, sessions, graph and claim surfaces, Skills Index discovery, Agent Packets, public Passport and Mesh contracts, and local proof tooling.
Paid artifacts add governed collaboration, protected activation, workspace operations, advanced analytics, and hosted distribution. They do not turn local memory into a mandatory cloud dependency.
See plans and distribution boundaries for the current contract.
Install options
macOS technical preview: unsigned DMG bootstrap launcher; expect Gatekeeper warnings until Developer ID notarization is configured, and prefer the source/CLI path.
Path | Best for | Status |
Source + | Technical users and terminal-capable agents | Recommended |
| macOS convenience bootstrap | Available |
Guided macOS bootstrap | Unsigned technical preview; expect Gatekeeper warnings | |
Guided Windows bootstrap | Available | |
Guided Linux bootstrap | Available |
Resource profiles
Profile | CPU | RAM | Storage |
Hugging Face / Glama lite |
|
|
|
Local Lite core |
|
|
|
Local Lite advanced |
|
|
|
Local Full |
|
|
|
For heavier ingest, model storage, or the spike-lab adapters, read the installation and storage guidance before selecting a profile.
Security and privacy
Local-first and account-free in the public local lane.
API-key protection for operational routes.
Deterministic secret-like content filtering at write ingress: redact by default, block when configured, and allow only by explicit operator choice.
Provenance and trust isolation on retrieved memory.
Signed portable context and encrypted continuation envelopes.
Dry-run-first graph repair, source backfill, and quarantine workflows.
No automatic execution of retrieved instructions or imported continuation content.
Security reports follow SECURITY.md.
Documentation
Need | Start here |
Product overview | |
Installation | |
CLI and agent lifecycle | |
Harness and app integration | |
Architecture and scaling | |
Troubleshooting | |
Current behavior and release evidence | |
Roadmap | |
Agent hooks | |
Retrieval trust | |
Decision/session evidence | |
Skills and verified learning | |
Portable context | |
Local inference | |
Full repository-backed manual |
The current public release baseline is v5.1.2.
Commercial distribution follows its separately verified release; this public release does not authorize paid automation.
License
ContextLattice's public lane is licensed under the Apache License 2.0.
Available Tools
3 toolshealthARead-onlyIdempotentInspect
Run a non-destructive runtime health check before any memory tool call. Use this when a connection fails, startup seems incomplete, or you need readiness evidence before writes. Returns a JSON health envelope (for example: status/services/components/queue fields) as both text and structured JSON. If the orchestrator requires an API key and the bridge is not configured, this returns an auth failure instead of mutating state.
Inputs: no named parameters. Returns: Health payload from GET /health.
memory.searchARead-onlyIdempotentInspect
Read-only contextual retrieval for pre-inference recall. Required: project + query. Keep project aligned with prior memory.write calls so ranking and topic continuity remain coherent. Parameter interactions: topic_path narrows scope and usually reduces noise/latency; if scoped reads return empty/degraded, retry once without topic_path. include_grounding=true adds citation-safe grounding with strict numeric copy behavior (numbers must be consumed verbatim). include_retrieval_debug=true adds source policy/timing/failure detail for diagnosis and can increase payload size. agent_id should stay stable across sessions so retrieval profile defaults (mode/sources/escalation) remain deterministic. Lifecycle handling: result_state can be ready/pending/degraded/empty; when pending/degraded, use warnings/source status and continuation metadata to re-read after cache warm. Do not use this tool for writes or health checks: use memory.write for persistence and health for startup/readiness checks. On auth/upstream failures this returns isError=true with structured error payload.
Inputs: query (required), project (required), agent_id, topic_path, +2 more. Returns: Memory search payload from POST /memory/search.
memory.writeAInspect
State-changing durable memory write used for checkpoints, implementation decisions, and compact recall artifacts. Parameter interactions: projectName should match the project used by memory.search; fileName is the logical lineage key (stable fileName preserves continuity and dedupe behavior); topicPath controls retrieval partitioning and, if omitted, is derived from fileName. content should be concise and factual (avoid full transcripts; preserve numeric facts verbatim). Side effects: successful writes may trigger asynchronous fanout/indexing/rollup work. ok=true with event_id means the write was accepted, but per-target fanout can still be pending/retrying and is returned in fanout/warnings. Do not use this for retrieval or diagnostics: use memory.search for reads and health for readiness checks. On auth/upstream errors this returns isError=true with structured error payload.
Inputs: content (required), fileName (required), projectName (required), topicPath. Returns: Memory write acknowledgement payload from POST /memory/write.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have completely distinct purposes: health handles readiness checks, memory.search is read-only retrieval, and memory.write is state-changing persistence. Their descriptions explicitly cross-reference each other to prevent confusion.
memory.search and memory.write follow a consistent memory.<verb> pattern, but health is a standalone noun not following the same convention. Minor deviation, still readable.
Three tools is within the ideal 3-15 range and each tool serves a distinct, necessary purpose (health, retrieval, persistence). The scope is tightly focused with no redundancy.
Core read/write operations are covered along with a health check. Missing operations like delete or list all might be absent, but search and write cover the primary memory lifecycle without clear dead ends.
Maintenance
Related MCP Connectors
CellMath is a governed AI memory and knowledge-cell MCP server designed to stop context bloat, unverified memory drift, and agent hallucinations. Instead of dumping raw, noisy RAG chunks into every turn, CellMath organizes persistent agent knowledge into structured, isolated Knowledge Cells with causal graph edges and strict write-time governance—keeping the full 3-tool MCP schema ultra-compact (~1,200 tokens). Core 3-Tool Pipeline: • vault_access — Read-only lookup, cell hydration, and graph edge traversal with strict zero-match silence (never fabricates context when no verified cell exists). • verify_safety — Preflight security and policy gate that blocks destructive or unsafe operations before execution. • vault_commit — Governed state mutation (store, update, causal edges, session checkpoints, and 4-tier purge) enforcing source provenance. Built for Claude, Cursor, ChatGPT, Gemini, and autonomous agents over Streamable HTTP.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceElevate your LLM task management with Task Orchestrator, an MCP server that empowers you to define, organize, and track goals and tasks with hierarchical precision. Integrate intelligent task management into your workflow.57MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI tools like GitHub Copilot to manage and persist context using a local JSON-based memory store. Provides CLI, MCP server, and VS Code integration for storing, retrieving, and managing context entries.2-
- AlicenseNot gradedqualityDmaintenanceA persistent memory and context management system for AI CLI tools that utilizes a three-layer architecture and semantic search to prevent context loss between sessions. It provides time-aware orientation and smart memory routing to help AI agents maintain project knowledge and architectural decisions.1MIT
- AlicenseAqualityAmaintenanceLocal RAG system for Claude Code with hybrid search (semantic + BM25), cross-encoder reranking, markdown-aware chunking, and 12 MCP tools. Zero external servers, pure ONNX in-process.13528 PyPI306MIT