Repository navigation
feat(openclaw): register as OpenClaw's native memory provider - #5535
Merged
Merged
Conversation
When Hindsight held the memory slot, OpenClaw's own memory surfaces (memory.status, Memory page, gateway memory.search / memory.get) reported "memory plugin unavailable" because the plugin never registered a memory capability. Register OpenClaw 2026.10's provider-neutral providerRuntime: health, search and get backed by Hindsight recall. Read-only and narrow on purpose: no Active Memory candidates (they would duplicate autoRecall) and no pre-compaction flush (every turn is retained). Search answers operators and the agent owner's private session only, and only when the bank depends on the agent alone; banks keyed by user or channel refuse search instead of guessing. Older hosts ignore the registration. Closes #4916
…provider types private - health() fetch now times out after 5s so a hung API reads as unavailable - MemoryReference / MemorySearchHit / MemoryProviderHandle are no longer exported
This was referenced Oct 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4916.
Problem: with Hindsight holding OpenClaw's memory slot, OpenClaw's own memory surfaces (
memory.status, the Memory page, gatewaymemory.search/memory.get) reported "memory plugin unavailable". The plugin never registered a memory capability.Change: register OpenClaw 2026.10's provider-neutral
providerRuntime(src/memory-provider.ts), withhealth,searchandgetbacked by Hindsight recall andGET /memories/{id}.Narrow on purpose:
autoRecall. No pre-compaction flush: every turn is already retained.search/getanswer only an operator or the agent owner's private session (owner-privateaudience). A group conversation, a session without an audience, or host authority is refused with an error, never an empty result.agentBankMap, static bank,dynamicBankGranularity: ["agent"]). With user or channel banking (the default), search is refused rather than guessing a user's bank.health()answers everyone and reveals no content.registerMemoryCapability({ providerRuntime }).This replaces #4917's approach, which faked OpenClaw's file-shaped legacy runtime (+752 lines). 2026.10 added an interface for record-based providers like ours.
Tests:
memory-provider.test.tscovers access rules, minScore/maxResults, foreign references, health for non-readers, andagentOnlyBankIdfor every granularity.Verified on real OpenClaw 2026.10.2 (local Hindsight API, agent-only banking):
memory.status(agentId main):{"providerId":"hindsight-openclaw","status":"ready"}. Before this change it was "memory plugin unavailable".memory.searchv2 "favourite fruit" returns the fact just retained from a web-chat turn ("User's favorite fruit is persimmon…", score 1.1).memory.getreturns that memory's text; an unknown id returnsnot_found.dynamicBankGranularity: ["agent","user"], status is stillreadyand search fails with "Hindsight banks here are keyed by user or channel…".doctor.memory.statusthrough a rawgateway callreports "requires authenticated operator authority". That message comes from OpenClaw's doctor, which needs an operator session; the CLI token connection doesn't have one.