Context
During Hermes adapter E2E testing on PR #315, we confirmed that the Hermes adapter tools are registering and core DKG tool flows are working, including status, context graph list/create, assertion create/write/query/promote, SWM query, sub-graph create/list, and memory_search.
One follow-up gap remains around passive memory behavior: Hermes currently does not fully mirror the latest OpenClaw DKG memory recall architecture.
Current Behavior
OpenClaw passive recall now fans out across six DKG memory layers:
agent-context / working-memory
agent-context / shared-working-memory
agent-context / verified-memory
- selected project/context graph /
working-memory
- selected project/context graph /
shared-working-memory
- selected project/context graph /
verified-memory
Chat turns are no longer the only passive recall source. Chat turns are included because they land in agent-context working memory, but OpenClaw no longer pins recall to only the chat-turns assertion.
Hermes currently has split behavior:
memory_search already performs the expected six-layer fan-out.
- Passive Hermes memory
prefetch() still reads only the configured provider memory assertion, currently defaulting to agent-context / memory.
- Passive injected memory context is not labeled with enough provenance for the agent to reliably know which context graph and memory layer each recalled item came from.
dkg_memory writes to the configured provider memory assertion only. It does not currently accept an optional context_graph_id for project-scoped memory writes.
Desired Behavior
Hermes passive memory recall should mirror OpenClaw and the SKILL.md contract:
- Passive recall should always query
agent-context across WM/SWM/VM.
- If a project/context graph is selected or otherwise supplied by the calling surface, passive recall should also query that graph across WM/SWM/VM.
- Passive recall should inject recalled snippets with explicit provenance so the agent can distinguish:
- context graph id
- memory layer/view
- score/source where available
- The injected context should remain safe for chat persistence, i.e. avoid recalled-memory boomerang into saved chat turns.
- Consider extending
dkg_memory with optional context_graph_id, defaulting to agent-context, so agents can store simple memory notes in a specific project/context graph when the user asks for that explicitly.
Suggested Implementation Notes
- Reuse or share the same fan-out logic already used by Hermes
memory_search rather than creating a second query planner.
- Match OpenClaw layer labels where possible:
agent-context-wm
agent-context-swm
agent-context-vm
project-wm
project-swm
project-vm
- Include the exact
context_graph_id in Hermes injected passive context, even where OpenClaw currently only implies it through project-* labels.
- Keep the provider default simple:
agent-context / memory remains the default write target for dkg_memory unless a specific context graph is supplied.
- Preserve existing assertion tools as the precise interface for explicit WM/SWM workflows.
Acceptance Criteria
- Hermes passive memory
prefetch() queries all three memory layers for agent-context.
- Hermes passive memory
prefetch() queries all three memory layers for the selected project/context graph when available.
- Passive injected memory entries include enough provenance for the agent to know the context graph and memory layer.
memory_search and passive recall behavior are aligned and covered by tests.
- If
dkg_memory gains optional context_graph_id, the schema, handler, docs, and tests are updated.
- Regression tests cover:
- agent-context WM/SWM/VM passive recall
- selected project WM/SWM/VM passive recall
- no selected project fallback to agent-context only
- provenance labels in injected context
- no recalled-context boomerang into persisted chat turns, if applicable
Related Work
Context
During Hermes adapter E2E testing on PR #315, we confirmed that the Hermes adapter tools are registering and core DKG tool flows are working, including status, context graph list/create, assertion create/write/query/promote, SWM query, sub-graph create/list, and
memory_search.One follow-up gap remains around passive memory behavior: Hermes currently does not fully mirror the latest OpenClaw DKG memory recall architecture.
Current Behavior
OpenClaw passive recall now fans out across six DKG memory layers:
agent-context/working-memoryagent-context/shared-working-memoryagent-context/verified-memoryworking-memoryshared-working-memoryverified-memoryChat turns are no longer the only passive recall source. Chat turns are included because they land in
agent-contextworking memory, but OpenClaw no longer pins recall to only thechat-turnsassertion.Hermes currently has split behavior:
memory_searchalready performs the expected six-layer fan-out.prefetch()still reads only the configured provider memory assertion, currently defaulting toagent-context/memory.dkg_memorywrites to the configured provider memory assertion only. It does not currently accept an optionalcontext_graph_idfor project-scoped memory writes.Desired Behavior
Hermes passive memory recall should mirror OpenClaw and the
SKILL.mdcontract:agent-contextacross WM/SWM/VM.dkg_memorywith optionalcontext_graph_id, defaulting toagent-context, so agents can store simple memory notes in a specific project/context graph when the user asks for that explicitly.Suggested Implementation Notes
memory_searchrather than creating a second query planner.agent-context-wmagent-context-swmagent-context-vmproject-wmproject-swmproject-vmcontext_graph_idin Hermes injected passive context, even where OpenClaw currently only implies it throughproject-*labels.agent-context/memoryremains the default write target fordkg_memoryunless a specific context graph is supplied.Acceptance Criteria
prefetch()queries all three memory layers foragent-context.prefetch()queries all three memory layers for the selected project/context graph when available.memory_searchand passive recall behavior are aligned and covered by tests.dkg_memorygains optionalcontext_graph_id, the schema, handler, docs, and tests are updated.Related Work
packages/cli/skills/dkg-node/SKILL.mdmemory recall /memory_searchbehavior.