Memoosea dual-path memory system for proactive agents

Source on GitHub

Automatic memory

Memory that waits to be asked is memory that never gets written. On hosts with hooks, Memoose runs itself, and every automatic part is a convenience over the tools rather than a replacement for one.

WhenWhat happensCost
You submit a promptIf the agent has declared its position in a procedure, the transitions from there are injected; then memory is searched locally and a short hint is injected if something matches~ms, no model
A session startsStanding rules, preferences and recent lessons are put in front of the agent~ms, no model
A turn ends, or before compactionA background job on a small model stores what was learned, writing through the CLISmall model, off your critical path
A session starts, at most once a dayThe upkeep pass (memoose maintain) is offered when the store has work waiting~ms, no model

Hints before each prompt

An agent only recalls when it thinks to, and it usually does not think to. So the UserPromptSubmit hook reads each incoming prompt, searches the local index, and when something genuinely matches it hands the agent a hint before the agent starts thinking: what memory already holds, and the recall query that would fetch the rest.

The hint is cheap by design: BM25 over the local index, a relevance floor (MEMOOSE_HINT_MIN_SCORE, default 0.5), a hard cap on how much it injects (MEMOOSE_HINT_COUNT, default 4), and silence when nothing matches. No model, a few milliseconds, so it can run on every prompt without anyone noticing. The agent keeps full control over whether to follow the hint.

Before that lexical hint, the hook asks a different question: not what the user said, but where the agent is. When the agent has declared its position on an open session (memoose session turn <id> --at "run the test suite"), that step’s outgoing transitions are injected two hops out, grouped as Next and Then, each with its condition, advice and pitfall and how past sessions that took it ended. Outgoing only: what precedes the step is what the agent has already done. This follows Procedural Graphs (Lu et al., 2026), whose ablation showed the local subgraph beating the whole graph and whole-graph injection lowering task success, so the block is small. Memory never guesses the position: with no declared position there is no guidance, because a wrong steer is worse than silence.

Standing context at session start

The SessionStart hook loads what should hold for the whole session before you type anything: the rules, goals and preferences stored as session context sections, plus recent lessons. It is the same material session_start returns, delivered without anyone calling it.

Background capture

The Stop and PreCompact hooks run capture asynchronously: a turn that taught something durable gets extracted and stored by a small model, so what the turn established is not lost to compaction. Two guards keep it cheap. It runs after your turn, never during it, and it skips turns shorter than MEMOOSE_CAPTURE_MIN_CHARS (default 400) rather than spending anything on small talk.

The hooks Memoose registers

HookScriptMode
UserPromptSubmitharness/hooks/recommend.pyBlocking, 10 s timeout
SessionStartharness/hooks/session_start.pyBlocking, 10 s timeout
Stopharness/hooks/capture.pyAsync
PreCompactharness/hooks/capture.pyAsync

They are wired through the plugin manifest, so on a host that runs plugin hooks they are active as soon as the plugin is installed, which today means Claude Code. Memoose never writes hooks into your global configuration on its own.

On a host that does not run them

You lose the automation and keep every capability. The skills route the same work to the memory-keeper subagent, which needs no hooks: it runs on a small model, holds only the Memoose tools, and reports back in one line. Explicit tool calls keep working everywhere; they are just no longer the only path.

Onboarding: what is actually live here

Memoose cannot see how your machine is configured, so the memoose-onboard skill walks it with you instead of assuming. Ask the agent to onboard Memoose, or say that automatic memory is not working, and it will check each capability against this host:

CapabilityHow it is checkedIf missing
Memory toolslist_datasets returnsThe MCP server is not connected. Re-run install and restart the host
Hints on each promptYou see a “Memoose already holds memory…” line before answersHooks are not running on this host
Standing context at session startThe agent has your rules and preferences without askingHooks are not running on this host
Background captureNew facts appear without anyone calling rememberHooks are not running, or capture is switched off

When hooks are not firing, the likely causes in order are: the host does not run plugin hooks (fall back to memory-keeper), the host was not restarted after installing, or the switches were turned off.

Automatic capture writes facts nobody explicitly asked for. The onboarding skill is required to be plain about that: where the SQLite file is, that recall shows what is remembered and history shows who stored it and when, and that forget removes an entity, a fact, or a whole dataset. It asks before enabling capture on a project that contains anything sensitive. The switches are on the Configuration page.