Source code, work history, and upcoming tasks — managed as one shared memory. No more cold boots, no more re-derivation.
Plug FocusMemory into qwen-code with a single manifest file. Eight MCP tools, an auto-recall HTTP hook, and Hard Gate search rules — all loaded automatically on startup. No fork, no patch.
Learn more →Grep finds the code. Vectors find the meaning. Neither remembers why it's still that way.
Every session re-discovers the same files, re-reasons about the same architecture, from scratch — round-trips accumulate, context gets re-injected, tokens burn.
What the code assumes about your database and what's actually running diverge — and nothing catches it until something breaks.
Why a column was added, why a threshold was chosen — buried in a chat log that's gone the moment the session ends.
Structural queries hit the graph index, semantic queries hit the vector index — one call, not five.
Real DB state is indexed alongside code, with drift detection surfaced automatically.
Every decision is stored as a linked node with supersedes/superseded_by relationships. Ask "why was this built this way?" — get back the full causal history: original rationale, every replacement with reasoning, and what's active now.
Each work session is not a blank slate. FocusMemory manages source code, work history, and upcoming tasks as a single shared memory — eliminating grep/glob, excessive re-derivation, and cold boot.
Function graph via tree-sitter AST + semantic search over code chunks. The agent recalls "who calls X" without re-reading the file tree.
Decisions, bug fixes, and session outcomes persist as causal chains. Next session starts where the last left off — not from zero.
Daily TODO files with progress tracking. The agent reads the plan, executes sequentially, and updates its own progress markers.
todoRunner.js (PM2-managed) schedules the daily backlog run at 06:00. It reads the most recent todos/{date}.md with pending items (the next day's work plan), spawns the agent with operational instructions, and triggers index refresh on completion.
A long agent run normally hits its context window and loses detail to a lossy auto-compact summary. With
focus-llama's
--fm-offload
engine, the oldest conversation is evicted to FocusMemory verbatim and pulled back on demand — lossless.
Once the engine's prompt passes a threshold (set under the client's compact point), the oldest middle messages are PUT to FocusMemory and removed from the prompt. System and the last user message are never evicted.
Evicted segments become virtual chunks (M+1…M+K). When the model emits <focus magic_chunks="N"> for one, the engine GETs its original text back and re-prefills it at the tail.
FocusMemory only stores and returns the text — no chunking, embedding, or search. Any store error fails open: the segment stays in the prompt, so a downed store degrades to a normal session, never to data loss.
A recall re-prefills one evicted chunk and is lossless; an auto-compact replaces the conversation with a lossy summary. The engine decides which messages leave and how to bring one back; FocusMemory is just the external memory behind it.
Plug FocusMemory into qwen-code with a single manifest file. Eight MCP tools, an auto-recall HTTP hook, and Hard Gate search rules — all loaded automatically on startup. No fork, no patch.
Removing the friction between what the model knows and what the agent can actually do.