ValorSystem Docs

03 · Two memories

Two memories, deliberately separate

Valor remembers in two places. An object store in Redis holds what the agent learns, ranked by importance and decaying over time. Plain Markdown files hold what humans write, versioned in git. The separation is deliberate.

fast · indexed · machine-curated durable · legible · human-curated The agent writes hooks · extraction passes · saves Object memory Popoto ORM · Redis importance · embeddings · decay Recall checked as the agent works Humans write notes · decisions · instructions Filesystem memory Markdown · git-versioned CLAUDE.md · docs · knowledge vault Read at session start · on demand

Two stores, two owners. The agent writes records to Redis; humans write files.

1 · The object store

Popoto: memory as records, not files

The agent's own memory lives in Redis as Memory records: one observation per record, with an embedding, an importance score, a category, and a project key. Persistence runs through Popoto, a Redis-backed ORM: model fields map to Redis hashes and indexes, so saving and querying look like ordinary Python attribute access, and the store stays fast enough to consult mid-task, thousands of times a day.

Memories arrive from four directions, each with its own default importance.

On receipt every human message, verbatim After the session corrections · decisions · surprises After the merge pull-request takeaways On purpose intentional saves, highest rank Memory records ranked by importance, per project

Source sets the default rank: a background pattern the agent noticed matters least, a human's own words matter more, and a lesson someone chose to save matters most.

2 · Recall

The bloom filter and the <thought> stub

Recall happens inside the PostToolUse hook while the agent works, on a sliding window across tool calls, affordable because most checks cost nothing:

Tool call every one Bloom filter might a memory exist? <thought> stub compact, ≥5× smaller Full memory pulled via MCP tools maybe on demand no match → nothing injected, zero tokens

When the filter says a relevant memory may exist, the hook injects a stub into the agent's context:

<thought id="…">[correction] Never approve a PR without tests</thought>

The stub is many times smaller than the full memory body, which the agent pulls on demand through the memory MCP tools when it needs the detail.

3 · The feedback loop

Memory that grades itself

Object memory closes its own feedback loop.

Outcome detection
When a recalled memory demonstrably helped, it is strengthened; when it misled, it is weakened.
Dismissal decay
Memories that keep surfacing and keep being ignored lose importance until they stop surfacing.
Consolidation
A nightly pass merges near-duplicates semantically, marking originals as superseded rather than deleting them, so the lineage survives.

Every memory operation fails silently: recall, save, and consolidation can all break without crashing the agent.

4 · The file store

Filesystem memory, the part humans own

The second store is ordinary files: the repository's CLAUDE.md operating instructions, a per-project MEMORY.md index with one Markdown file per durable fact, the docs/ tree, and a curated knowledge vault of business context and decisions. This is the memory humans write, and the memory humans can read, diff, and version. Every change has a git history; every fact has an author.

The two stores stay separate because they answer different questions on different clocks. Object memory answers "what have I learned that's relevant to this exact moment?", at tool-call granularity, thousands of times a day, ranked and decaying. Filesystem memory answers "how does this project work and what are the standing rules?", read once at session start, changed a few times a week, reviewed like code.

Merging them would break both: files are too slow and too flat to consult on every tool call, and a Redis store is illegible to the humans who need to audit what the system believes.

Previous← The SDLC Pipeline NextReflections →