ContextLattice: a local context layer for agents
ContextLattice
A local memory and context layer: a session's goal, decisions and evidence are gathered into a compact packet an agent reopens
- 155 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- A container stack runs locally and changes the project's instruction files; a setup error gives the agent wrong context
- Memory commands write outcomes and corrections that later enter model requests
Install
- Works in
Manual install
gmake quickstartAfter cloning the repository and copying .env.example to .env; asks for a runtime profile.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- A container stack runs locally and changes the project's instruction files; a setup error gives the agent wrong context
- Memory commands write outcomes and corrections that later enter model requests
This is third-party code. Review the repository files before installing.
What it does
ContextLattice keeps a project's long-lived context so that a changed chat, model or computer does not zero out the work. The core reconstructs the active objective, selects the important evidence and assembles a compact Context Pack with provenance, then records what actually worked. The full transcript is not pasted into the request, and the cloud is not mandatory. The main interface is the command line: `contextlattice context` pulls context before work, `remember` saves outcomes, `resume` continues without a recap, `correct` fixes stale items without silently rewriting history and `finish` closes the loop with a result. A dashboard shows behaviour and proof, and HTTP and MCP serve as secondary surfaces for apps and agent harnesses. `contextlattice_adopt integrate` writes managed blocks into project instruction files for Codex, Claude Code, OpenCode, Hermes Agent and several other agents, preserving existing text. Skills are found through an index without loading every SKILL.md, and new skills are promoted only after repeated wins on a holdout and human review.
Who it is for. Developers who run long projects in Codex, Claude Code and other agents and lose the goal, decisions and verified facts when a session or model changes.
Good fit when
- You move from Codex to Claude Code and the agent must continue the task with the same plan and hazards
- A week later you need to recall why a decision was made and which checks backed it
- A memory record is stale and must be marked corrected without erasing history
- You want to track verified results and skills without loading every SKILL.md into context
Not a fit when
- You need a light note between sessions: a full stack of containers and multi-step checks is too heavy
- You have no suitable container runtime: it needs Compose v2 and several utilities
- You need cloud team collaboration: it exists only in paid artifacts
Example request
Reopen the project's previous objective, show the decisions and checks it relied on and continue from the next step.Limitations
Platforms: macOS, Linux and Windows through WSL2. It needs a container runtime with Compose v2 support and the utilities `gmake`, `jq`, `rg`, `python3` and `curl`. The tested macOS baseline uses OrbStack. Install is by cloning the repository and running `gmake quickstart`, which asks for a runtime profile and brings up a local stack, so read it beforehand.
The public part ships under Apache-2.0, and paid artifacts add collaboration, protected activation and hosted distribution. Aggregate Signal in production is blocked pending an independent privacy and utility review. The install does not install agents.
How to disable. Stop the stack with the Compose commands from the repository and remove the ContextLattice blocks from the project instruction files written by integrate. The gateway state folder can be erased by hand.
FAQ
How do I check that ContextLattice is installed?
Call `curl -fsS http://127.0.0.1:8075/health | jq`, then run `contextlattice doctor --pretty` and `contextlattice state status --pretty`. The final step exercises the context path: `contextlattice context "verify this ContextLattice installation" --project contextlattice --pretty`.
Does ContextLattice replace the agent?
No, the layer does not choose goals from retrieved text, does not execute imported context and does not replace the agent harness. Tools remain the execution surface, and memory and remote content count only as evidence.
What is a Context Pack?
A compact set of evidence for the current objective with source coverage, omissions and degradation. Evidence is ranked by impact per token, so a digest enters the request instead of the full transcript.
Does ContextLattice need a cloud service?
No, the local core runs on your machine in containers and needs no cloud. Paid artifacts add collaboration, protected activation, workspace operations and hosted distribution, but do not make local memory depend on the cloud.
Which agents can connect?
The `contextlattice_adopt integrate` command writes managed blocks into project instruction files for Codex, Claude Code, OpenCode, Hermes Agent, Hermes Ultra, OMP, Mercury Agent, Pi and Droid. It does not install the agents themselves.
Discussion
No questions or reviews yet.
Related
CLI toolsA local context layer for coding agents: it understands the task, routes and compresses context and tracks the cost
Context Infrastructure
context-infrastructure
A reference implementation of a context system for an agent: structure, data flows, a blueprint the author has used for a year. README in Chinese. For study
A local context store for coding agents that captures project knowledge and reuses it across Codex, Claude Code and OpenCode
Shared memory for coding agents: messages in SQLite, old context compacted into a summary tree and MCP tools to search it.
A plugin marketplace for agents: reflexion, code and PR review, git, TDD, DDD, specs and subagent-driven development
A local MCP server with five verbs that keeps project decisions across sessions: store, retrieve, supersede and audit diffs.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| ContextLattice: a local context layer for agents (this card) | no | 155 | ||
| agentmemory | yes | not required | 30,314 | simple agent memory without a Context Pack or signed handoff |
| Context Engineering Kit | no | 1,821 | a set of context techniques without a separate local stack |
README in short
The README presents ContextLattice as a local layer that gives agents continuity, explainable retrieval, portable context and verified learning. It continues with a five-stage workflow, a quickstart, agent connection, the daily command loop, the skills index, the license and paid artifacts.