[{"data":1,"prerenderedAt":619},["ShallowReactive",2],{"docs-page-en-\u002Fopenclaw\u002Fexamples\u002Frecall_filter":3,"surround-en-\u002Fopenclaw\u002Fexamples\u002Frecall_filter":604},{"id":4,"title":5,"avatar":6,"banner":6,"body":7,"category":6,"desc":6,"description":59,"extension":598,"links":6,"meta":599,"navigation":6,"path":600,"seo":601,"stem":602,"__hash__":603},"docs\u002Fen\u002Fopenclaw\u002Fexamples\u002Frecall_filter.md","Secondary Filtering for Memory Recall",null,{"type":8,"value":9,"toc":586},"minimark",[10,15,19,22,27,30,32,37,45,53,255,258,317,319,323,326,386,388,392,422,424,428,451,454,456,460,466,468,472,475,515,518,548,551,553,557,565,567,571,582],[11,12,14],"h2",{"id":13},"cloud-plugin","Cloud Plugin",[16,17,18],"p",{},"The MemOS Openclaw cloud plugin supports secondary filtering of recalled memories with a specified large language model. After filtering, only memories that are highly relevant to the current task are injected into context, which reduces irrelevant noise and saves tokens.",[20,21],"br",{},[23,24,26],"h3",{"id":25},"how-to-use","How to Use",[16,28,29],{},"Just configure an OpenAI-compatible model endpoint (such as local Ollama or a third-party LLM API) and enable the filter switch to turn on secondary memory filtering.",[20,31],{},[33,34,36],"h4",{"id":35},"_1-enable-memory-filtering","1. Enable Memory Filtering",[16,38,39,40,44],{},"When configuring an LLM for memory filtering, you ",[41,42,43],"strong",{},"must"," configure the API Key and Base URL.",[16,46,47,48,52],{},"Add the following in your ",[49,50,51],"code",{},"openclaw.json"," config:",[54,55,60],"pre",{"className":56,"code":57,"language":58,"meta":59,"style":59},"language-json shiki shiki-themes material-theme-lighter github-light-high-contrast github-dark-default","{\n  \"plugins\": {\n    \"entries\": {\n      \"memos-cloud-openclaw-plugin\": {\n        \"config\": {\n          \"recallFilterEnabled\": true,\n          \"recallFilterBaseUrl\": \"http:\u002F\u002F127.0.0.1:11434\u002Fv1\",\n          \"recallFilterApiKey\": \"sk-...\",\n          \"recallFilterModel\": \"qwen2.5_7b\"\n        }\n      }\n    }\n  }\n}\n","json","",[49,61,62,71,91,107,123,139,160,184,205,225,231,237,243,249],{"__ignoreMap":59},[63,64,67],"span",{"class":65,"line":66},"line",1,[63,68,70],{"class":69},"suWxN","{\n",[63,72,74,78,82,85,88],{"class":65,"line":73},2,[63,75,77],{"class":76},"sfJrv","  \"",[63,79,81],{"class":80},"skH7o","plugins",[63,83,84],{"class":76},"\"",[63,86,87],{"class":69},":",[63,89,90],{"class":69}," {\n",[63,92,94,97,101,103,105],{"class":65,"line":93},3,[63,95,96],{"class":76},"    \"",[63,98,100],{"class":99},"smon8","entries",[63,102,84],{"class":76},[63,104,87],{"class":69},[63,106,90],{"class":69},[63,108,110,113,117,119,121],{"class":65,"line":109},4,[63,111,112],{"class":76},"      \"",[63,114,116],{"class":115},"s_fzf","memos-cloud-openclaw-plugin",[63,118,84],{"class":76},[63,120,87],{"class":69},[63,122,90],{"class":69},[63,124,126,129,133,135,137],{"class":65,"line":125},5,[63,127,128],{"class":76},"        \"",[63,130,132],{"class":131},"sw4Oa","config",[63,134,84],{"class":76},[63,136,87],{"class":69},[63,138,90],{"class":69},[63,140,142,145,149,151,153,157],{"class":65,"line":141},6,[63,143,144],{"class":76},"          \"",[63,146,148],{"class":147},"sleiK","recallFilterEnabled",[63,150,84],{"class":76},[63,152,87],{"class":69},[63,154,156],{"class":155},"smHB8"," true",[63,158,159],{"class":69},",\n",[63,161,163,165,168,170,172,176,180,182],{"class":65,"line":162},7,[63,164,144],{"class":76},[63,166,167],{"class":147},"recallFilterBaseUrl",[63,169,84],{"class":76},[63,171,87],{"class":69},[63,173,175],{"class":174},"sjUum"," \"",[63,177,179],{"class":178},"sp1uZ","http:\u002F\u002F127.0.0.1:11434\u002Fv1",[63,181,84],{"class":174},[63,183,159],{"class":69},[63,185,187,189,192,194,196,198,201,203],{"class":65,"line":186},8,[63,188,144],{"class":76},[63,190,191],{"class":147},"recallFilterApiKey",[63,193,84],{"class":76},[63,195,87],{"class":69},[63,197,175],{"class":174},[63,199,200],{"class":178},"sk-...",[63,202,84],{"class":174},[63,204,159],{"class":69},[63,206,208,210,213,215,217,219,222],{"class":65,"line":207},9,[63,209,144],{"class":76},[63,211,212],{"class":147},"recallFilterModel",[63,214,84],{"class":76},[63,216,87],{"class":69},[63,218,175],{"class":174},[63,220,221],{"class":178},"qwen2.5_7b",[63,223,224],{"class":174},"\"\n",[63,226,228],{"class":65,"line":227},10,[63,229,230],{"class":69},"        }\n",[63,232,234],{"class":65,"line":233},11,[63,235,236],{"class":69},"      }\n",[63,238,240],{"class":65,"line":239},12,[63,241,242],{"class":69},"    }\n",[63,244,246],{"class":65,"line":245},13,[63,247,248],{"class":69},"  }\n",[63,250,252],{"class":65,"line":251},14,[63,253,254],{"class":69},"}\n",[16,256,257],{},"Or set environment variables:",[54,259,263],{"className":260,"code":261,"language":262,"meta":59,"style":59},"language-bash shiki shiki-themes material-theme-lighter github-light-high-contrast github-dark-default","MEMOS_RECALL_FILTER_ENABLED=true\nMEMOS_RECALL_FILTER_BASE_URL=\"http:\u002F\u002F127.0.0.1:11434\u002Fv1\"\nMEMOS_RECALL_FILTER_API_KEY=\"sk-...\"\nMEMOS_RECALL_FILTER_MODEL=\"qwen2.5_7b\"\n","bash",[49,264,265,278,291,304],{"__ignoreMap":59},[63,266,267,271,275],{"class":65,"line":66},[63,268,270],{"class":269},"s5ojA","MEMOS_RECALL_FILTER_ENABLED",[63,272,274],{"class":273},"saN0X","=",[63,276,277],{"class":178},"true\n",[63,279,280,283,285,287,289],{"class":65,"line":73},[63,281,282],{"class":269},"MEMOS_RECALL_FILTER_BASE_URL",[63,284,274],{"class":273},[63,286,84],{"class":174},[63,288,179],{"class":178},[63,290,224],{"class":174},[63,292,293,296,298,300,302],{"class":65,"line":93},[63,294,295],{"class":269},"MEMOS_RECALL_FILTER_API_KEY",[63,297,274],{"class":273},[63,299,84],{"class":174},[63,301,200],{"class":178},[63,303,224],{"class":174},[63,305,306,309,311,313,315],{"class":65,"line":109},[63,307,308],{"class":269},"MEMOS_RECALL_FILTER_MODEL",[63,310,274],{"class":273},[63,312,84],{"class":174},[63,314,221],{"class":178},[63,316,224],{"class":174},[20,318],{},[33,320,322],{"id":321},"_2-configure-authentication-and-advanced-parameters-optional","2. Configure Authentication and Advanced Parameters (Optional)",[16,324,325],{},"If you need to adjust timeout and failure strategy, you can specify them in the config:",[54,327,329],{"className":56,"code":328,"language":58,"meta":59,"style":59},"{\n  \"config\": {\n    \"recallFilterTimeoutMs\": 6000,\n    \"recallFilterFailOpen\": true\n  }\n}\n",[49,330,331,335,347,364,378,382],{"__ignoreMap":59},[63,332,333],{"class":65,"line":66},[63,334,70],{"class":69},[63,336,337,339,341,343,345],{"class":65,"line":73},[63,338,77],{"class":76},[63,340,132],{"class":80},[63,342,84],{"class":76},[63,344,87],{"class":69},[63,346,90],{"class":69},[63,348,349,351,354,356,358,362],{"class":65,"line":93},[63,350,96],{"class":76},[63,352,353],{"class":99},"recallFilterTimeoutMs",[63,355,84],{"class":76},[63,357,87],{"class":69},[63,359,361],{"class":360},"sJNII"," 6000",[63,363,159],{"class":69},[63,365,366,368,371,373,375],{"class":65,"line":109},[63,367,96],{"class":76},[63,369,370],{"class":99},"recallFilterFailOpen",[63,372,84],{"class":76},[63,374,87],{"class":69},[63,376,377],{"class":155}," true\n",[63,379,380],{"class":65,"line":125},[63,381,248],{"class":69},[63,383,384],{"class":65,"line":141},[63,385,254],{"class":69},[20,387],{},[23,389,391],{"id":390},"how-it-works","How It Works",[393,394,395,402,412],"ul",{},[396,397,398,401],"li",{},[41,399,400],{},"Post-recall interception",": Before each conversation round, after memories are recalled from the cloud, the plugin sends candidate memory entries to your configured filtering model for secondary screening.",[396,403,404,407,408,411],{},[41,405,406],{},"Precise retention",": After model judgment, only entries marked as ",[49,409,410],{},"keep"," are retained and injected into the agent context.",[396,413,414,417,418,421],{},[41,415,416],{},"High-availability fallback",": Fail-open (",[49,419,420],{},"recallFilterFailOpen: true",") is enabled by default. If the filtering model times out or fails, it automatically falls back to full injection without filtering, so the current conversation is not interrupted.",[20,423],{},[23,425,427],{"id":426},"typical-use-cases","Typical Use Cases",[393,429,430,436,442],{},[396,431,432,435],{},[41,433,434],{},"Pruning long-term memory",": In long-running conversations with many accumulated memories, remove content unrelated to the current prompt to significantly reduce main-model context token usage.",[396,437,438,441],{},[41,439,440],{},"Improving reasoning accuracy",": For agents handling complex tasks, filter out early irrelevant memories to improve reasoning quality on the core task.",[396,443,444,447,448,450],{},[41,445,446],{},"Working with local models",": Use a locally running small model (such as ",[49,449,221],{}," via Ollama) as a low-cost pre-filter to improve memory injection quality without increasing main-model API costs.",[452,453],"hr",{},[20,455],{},[11,457,459],{"id":458},"local-plugin","Local Plugin",[16,461,462,465],{},[49,463,464],{},"@memtensor\u002Fmemos-local-plugin"," includes multi-stage local retrieval filtering. It first recalls candidates from Skill, Trace\u002FEpisode, and World Model tiers, then applies RRF + MMR for fusion and deduplication. If an LLM is configured, it can also run a final relevance check before injection to drop items that only share surface keywords with the current task.",[20,467],{},[23,469,471],{"id":470},"how-to-configure","How to Configure",[16,473,474],{},"Configure this directly in the Memory Viewer for the target agent:",[476,477,478,491],"table",{},[479,480,481],"thead",{},[482,483,484,488],"tr",{},[485,486,487],"th",{},"Agent",[485,489,490],{},"Memory Viewer",[492,493,494,505],"tbody",{},[482,495,496,500],{},[497,498,499],"td",{},"OpenClaw",[497,501,502],{},[49,503,504],{},"http:\u002F\u002F127.0.0.1:18799",[482,506,507,510],{},[497,508,509],{},"Hermes",[497,511,512],{},[49,513,514],{},"http:\u002F\u002F127.0.0.1:18800",[16,516,517],{},"Steps:",[519,520,521,524,531,538,545],"ol",{},[396,522,523],{},"Open the Memory Viewer.",[396,525,526,527,530],{},"Go to ",[41,528,529],{},"Settings → AI Models",".",[396,532,533,534,537],{},"In the ",[41,535,536],{},"LLM"," section, choose a provider and fill in endpoint, API Key, model, and related fields.",[396,539,540,541,544],{},"Click ",[41,542,543],{},"Test"," to confirm the model works.",[396,546,547],{},"Save the settings. The Viewer restarts the plugin and loads the new config.",[16,549,550],{},"After saving, local retrieval can use that LLM for a relevance check after recall and RRF\u002FMMR ranking. If no LLM is configured, the plugin still uses built-in multi-channel recall and mechanical threshold filtering.",[20,552],{},[23,554,556],{"id":555},"local-retrieval-flow","Local Retrieval Flow",[54,558,563],{"className":559,"code":561,"language":562,"meta":59},[560],"language-text","User request\n→ Build retrieval query and tags\n→ Tier 1: Skill candidates\n→ Tier 2: Trace \u002F Episode candidates\n→ Tier 3: World Model candidates\n→ Multi-channel recall: vector \u002F FTS5 \u002F pattern \u002F error signatures\n→ RRF fusion + MMR diversity control\n→ Optional LLM relevance check\n→ Inject into the agent\n","text",[49,564,561],{"__ignoreMap":59},[20,566],{},[23,568,570],{"id":569},"expected-results","Expected Results",[393,572,573,576,579],{},[396,574,575],{},"Injected memory context is more focused and less noisy",[396,577,578],{},"Skill, Trace\u002FEpisode, and World Model hits are not selected by vector similarity alone",[396,580,581],{},"If the LLM is unavailable, retrieval falls back to stricter mechanical thresholds without breaking basic recall",[583,584,585],"style",{},"html pre.shiki code .suWxN, html code.shiki .suWxN{--shiki-light:#39ADB5;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}html pre.shiki code .sfJrv, html code.shiki .sfJrv{--shiki-light:#39ADB5;--shiki-default:#024C1A;--shiki-dark:#7EE787}html pre.shiki code .skH7o, html code.shiki .skH7o{--shiki-light:#9C3EDA;--shiki-default:#024C1A;--shiki-dark:#7EE787}html pre.shiki code .smon8, html code.shiki .smon8{--shiki-light:#E2931D;--shiki-default:#024C1A;--shiki-dark:#7EE787}html pre.shiki code .s_fzf, html code.shiki .s_fzf{--shiki-light:#F76D47;--shiki-default:#024C1A;--shiki-dark:#7EE787}html pre.shiki code .sw4Oa, html code.shiki .sw4Oa{--shiki-light:#E53935;--shiki-default:#024C1A;--shiki-dark:#7EE787}html pre.shiki code .sleiK, html code.shiki .sleiK{--shiki-light:#916B53;--shiki-default:#024C1A;--shiki-dark:#7EE787}html pre.shiki code .smHB8, html code.shiki .smHB8{--shiki-light:#39ADB5;--shiki-default:#023B95;--shiki-dark:#79C0FF}html pre.shiki code .sjUum, html code.shiki .sjUum{--shiki-light:#39ADB5;--shiki-default:#032563;--shiki-dark:#A5D6FF}html pre.shiki code .sp1uZ, html code.shiki .sp1uZ{--shiki-light:#91B859;--shiki-default:#032563;--shiki-dark:#A5D6FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s5ojA, html code.shiki .s5ojA{--shiki-light:#90A4AE;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}html pre.shiki code .saN0X, html code.shiki .saN0X{--shiki-light:#39ADB5;--shiki-default:#A0111F;--shiki-dark:#FF7B72}html pre.shiki code .sJNII, html code.shiki .sJNII{--shiki-light:#F76D47;--shiki-default:#023B95;--shiki-dark:#79C0FF}",{"title":59,"searchDepth":73,"depth":73,"links":587},[588,593],{"id":13,"depth":73,"text":14,"children":589},[590,591,592],{"id":25,"depth":93,"text":26},{"id":390,"depth":93,"text":391},{"id":426,"depth":93,"text":427},{"id":458,"depth":73,"text":459,"children":594},[595,596,597],{"id":470,"depth":93,"text":471},{"id":555,"depth":93,"text":556},{"id":569,"depth":93,"text":570},"md",{},"\u002Fen\u002Fopenclaw\u002Fexamples\u002Frecall_filter",{"title":5,"description":59},"en\u002Fopenclaw\u002Fexamples\u002Frecall_filter","y7A-Ydu4AJFzlRLVKO7_GR4BJ0-D4VPB3hM7MD_Q_HE",[605,612],{"title":606,"path":607,"stem":608,"icon":609,"framework":6,"module":6,"class":610,"target":-1,"active":611,"defaultOpen":611,"children":-1,"description":-1},"Multi-Agent Memory Isolation","\u002Fopenclaw\u002Fexamples\u002Fmulti_agent","openclaw\u002Fexamples\u002Fmulti_agent","i-ri-team-line",[],false,{"title":613,"path":614,"stem":615,"icon":616,"framework":6,"module":6,"class":617,"target":-1,"active":611,"defaultOpen":611,"children":-1,"description":618},"Local Plugin Usage","\u002Fopenclaw\u002Fexamples\u002Fhermes_usage","openclaw\u002Fexamples\u002Fhermes_usage","i-ri-terminal-box-line",[],"Basic usage, memory tools, team sharing, and multi-agent examples for the MemOS local plugin in OpenClaw and Hermes.",1781252528210]