Skip to main content
Glama
index.html65.4 kB
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="Memory persistence for AI assistants with temporal decay"> <meta name="author" content="prefrontal-systems"> <link rel="canonical" href="https://cortexgraph.dev/features/auto-recall-conversation/"> <link rel="prev" href="../../future_roadmap/"> <link rel="next" href="../../LICENSE/"> <link rel="icon" href="../../assets/images/favicon.png"> <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.0"> <title>Auto-Recall - CortexGraph Documentation</title> <link rel="stylesheet" href="../../assets/stylesheets/main.618322db.min.css"> <link rel="stylesheet" href="../../assets/stylesheets/palette.ab4e12ef.min.css"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"> <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style> <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script> </head> <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#feature-auto-recall-related-memories-during-conversation" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="../.." title="CortexGraph Documentation" class="md-header__button md-logo" aria-label="CortexGraph Documentation" data-md-component="logo"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> CortexGraph Documentation </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Auto-Recall </span> </div> </div> </div> <form class="md-header__option" data-md-component="palette"> <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0"> <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1"> <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg> </label> <nav class="md-search__options" aria-label="Search"> <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg> </button> </nav> <div class="md-search__suggest" data-md-component="search-suggest"></div> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list" role="presentation"></ol> </div> </div> </div> </div> </div> <div class="md-header__source"> <a href="https://github.com/prefrontal-systems/cortexgraph" title="Go to repository" class="md-source" data-md-component="source"> <div class="md-source__icon md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </div> <div class="md-source__repository"> prefrontal-systems/cortexgraph </div> </a> </div> </nav> </header> <div class="md-container" data-md-component="container"> <nav class="md-tabs" aria-label="Tabs" data-md-component="tabs"> <div class="md-grid"> <ul class="md-tabs__list"> <li class="md-tabs__item"> <a href="../.." class="md-tabs__link"> Home </a> </li> <li class="md-tabs__item"> <a href="../../installation/" class="md-tabs__link"> Getting Started </a> </li> <li class="md-tabs__item"> <a href="../../architecture/" class="md-tabs__link"> Documentation </a> </li> <li class="md-tabs__item"> <a href="../../deployment/" class="md-tabs__link"> Deployment </a> </li> <li class="md-tabs__item"> <a href="../../CONTRIBUTING/" class="md-tabs__link"> Development </a> </li> <li class="md-tabs__item md-tabs__item--active"> <a href="./" class="md-tabs__link"> Features </a> </li> <li class="md-tabs__item"> <a href="../../LICENSE/" class="md-tabs__link"> About </a> </li> </ul> </div> </nav> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="../.." title="CortexGraph Documentation" class="md-nav__button md-logo" aria-label="CortexGraph Documentation" data-md-component="logo"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> </a> CortexGraph Documentation </label> <div class="md-nav__source"> <a href="https://github.com/prefrontal-systems/cortexgraph" title="Go to repository" class="md-source" data-md-component="source"> <div class="md-source__icon md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </div> <div class="md-source__repository"> prefrontal-systems/cortexgraph </div> </a> </div> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../.." class="md-nav__link"> <span class="md-ellipsis"> Home </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" > <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0"> <span class="md-ellipsis"> Getting Started </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_2"> <span class="md-nav__icon md-icon"></span> Getting Started </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../installation/" class="md-nav__link"> <span class="md-ellipsis"> Installation </span> </a> </li> <li class="md-nav__item"> <a href="../../quickstart/" class="md-nav__link"> <span class="md-ellipsis"> Quick Start </span> </a> </li> <li class="md-nav__item"> <a href="../../configuration/" class="md-nav__link"> <span class="md-ellipsis"> Configuration </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0"> <span class="md-ellipsis"> Documentation </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> Documentation </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../architecture/" class="md-nav__link"> <span class="md-ellipsis"> Architecture </span> </a> </li> <li class="md-nav__item"> <a href="../../api/" class="md-nav__link"> <span class="md-ellipsis"> API Reference </span> </a> </li> <li class="md-nav__item"> <a href="../../graph_features/" class="md-nav__link"> <span class="md-ellipsis"> Knowledge Graph </span> </a> </li> <li class="md-nav__item"> <a href="../../scoring_algorithm/" class="md-nav__link"> <span class="md-ellipsis"> Scoring Algorithm </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0"> <span class="md-ellipsis"> Deployment </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Deployment </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../deployment/" class="md-nav__link"> <span class="md-ellipsis"> Deployment Guide </span> </a> </li> <li class="md-nav__item"> <a href="../../security/" class="md-nav__link"> <span class="md-ellipsis"> Security </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0"> <span class="md-ellipsis"> Development </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Development </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../CONTRIBUTING/" class="md-nav__link"> <span class="md-ellipsis"> Contributing </span> </a> </li> <li class="md-nav__item"> <a href="../../ROADMAP/" class="md-nav__link"> <span class="md-ellipsis"> Roadmap </span> </a> </li> <li class="md-nav__item"> <a href="../../future_roadmap/" class="md-nav__link"> <span class="md-ellipsis"> Future Plans </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex=""> <span class="md-ellipsis"> Features </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="true"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Features </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> <span class="md-ellipsis"> Auto-Recall </span> <span class="md-nav__icon md-icon"></span> </label> <a href="./" class="md-nav__link md-nav__link--active"> <span class="md-ellipsis"> Auto-Recall </span> </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#problem-statement" class="md-nav__link"> <span class="md-ellipsis"> Problem Statement </span> </a> </li> <li class="md-nav__item"> <a href="#current-workarounds" class="md-nav__link"> <span class="md-ellipsis"> Current Workarounds </span> </a> </li> <li class="md-nav__item"> <a href="#proposed-solution" class="md-nav__link"> <span class="md-ellipsis"> Proposed Solution </span> </a> <nav class="md-nav" aria-label="Proposed Solution"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#auto-recall-pipeline" class="md-nav__link"> <span class="md-ellipsis"> Auto-Recall Pipeline </span> </a> </li> <li class="md-nav__item"> <a href="#key-components" class="md-nav__link"> <span class="md-ellipsis"> Key Components </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="#implementation-phases" class="md-nav__link"> <span class="md-ellipsis"> Implementation Phases </span> </a> <nav class="md-nav" aria-label="Implementation Phases"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#phase-1-silent-reinforcement-mvp" class="md-nav__link"> <span class="md-ellipsis"> Phase 1: Silent Reinforcement (MVP) </span> </a> </li> <li class="md-nav__item"> <a href="#phase-2-subtle-surfacing" class="md-nav__link"> <span class="md-ellipsis"> Phase 2: Subtle Surfacing </span> </a> </li> <li class="md-nav__item"> <a href="#phase-3-interactive-mode" class="md-nav__link"> <span class="md-ellipsis"> Phase 3: Interactive Mode </span> </a> </li> <li class="md-nav__item"> <a href="#phase-4-cross-domain-detection-maslow-effect" class="md-nav__link"> <span class="md-ellipsis"> Phase 4: Cross-Domain Detection (Maslow Effect) </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="#technical-architecture" class="md-nav__link"> <span class="md-ellipsis"> Technical Architecture </span> </a> <nav class="md-nav" aria-label="Technical Architecture"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#new-components" class="md-nav__link"> <span class="md-ellipsis"> New Components </span> </a> </li> <li class="md-nav__item"> <a href="#integration-points" class="md-nav__link"> <span class="md-ellipsis"> Integration Points </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="#success-metrics" class="md-nav__link"> <span class="md-ellipsis"> Success Metrics </span> </a> </li> <li class="md-nav__item"> <a href="#risks-mitigations" class="md-nav__link"> <span class="md-ellipsis"> Risks &amp; Mitigations </span> </a> </li> <li class="md-nav__item"> <a href="#dependencies" class="md-nav__link"> <span class="md-ellipsis"> Dependencies </span> </a> </li> <li class="md-nav__item"> <a href="#related-features" class="md-nav__link"> <span class="md-ellipsis"> Related Features </span> </a> </li> <li class="md-nav__item"> <a href="#references" class="md-nav__link"> <span class="md-ellipsis"> References </span> </a> </li> <li class="md-nav__item"> <a href="#questions-to-resolve" class="md-nav__link"> <span class="md-ellipsis"> Questions to Resolve </span> </a> </li> <li class="md-nav__item"> <a href="#next-steps" class="md-nav__link"> <span class="md-ellipsis"> Next Steps </span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0"> <span class="md-ellipsis"> About </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> About </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../LICENSE/" class="md-nav__link"> <span class="md-ellipsis"> License </span> </a> </li> <li class="md-nav__item"> <a href="../../CHANGELOG/" class="md-nav__link"> <span class="md-ellipsis"> Changelog </span> </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#problem-statement" class="md-nav__link"> <span class="md-ellipsis"> Problem Statement </span> </a> </li> <li class="md-nav__item"> <a href="#current-workarounds" class="md-nav__link"> <span class="md-ellipsis"> Current Workarounds </span> </a> </li> <li class="md-nav__item"> <a href="#proposed-solution" class="md-nav__link"> <span class="md-ellipsis"> Proposed Solution </span> </a> <nav class="md-nav" aria-label="Proposed Solution"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#auto-recall-pipeline" class="md-nav__link"> <span class="md-ellipsis"> Auto-Recall Pipeline </span> </a> </li> <li class="md-nav__item"> <a href="#key-components" class="md-nav__link"> <span class="md-ellipsis"> Key Components </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="#implementation-phases" class="md-nav__link"> <span class="md-ellipsis"> Implementation Phases </span> </a> <nav class="md-nav" aria-label="Implementation Phases"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#phase-1-silent-reinforcement-mvp" class="md-nav__link"> <span class="md-ellipsis"> Phase 1: Silent Reinforcement (MVP) </span> </a> </li> <li class="md-nav__item"> <a href="#phase-2-subtle-surfacing" class="md-nav__link"> <span class="md-ellipsis"> Phase 2: Subtle Surfacing </span> </a> </li> <li class="md-nav__item"> <a href="#phase-3-interactive-mode" class="md-nav__link"> <span class="md-ellipsis"> Phase 3: Interactive Mode </span> </a> </li> <li class="md-nav__item"> <a href="#phase-4-cross-domain-detection-maslow-effect" class="md-nav__link"> <span class="md-ellipsis"> Phase 4: Cross-Domain Detection (Maslow Effect) </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="#technical-architecture" class="md-nav__link"> <span class="md-ellipsis"> Technical Architecture </span> </a> <nav class="md-nav" aria-label="Technical Architecture"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#new-components" class="md-nav__link"> <span class="md-ellipsis"> New Components </span> </a> </li> <li class="md-nav__item"> <a href="#integration-points" class="md-nav__link"> <span class="md-ellipsis"> Integration Points </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="#success-metrics" class="md-nav__link"> <span class="md-ellipsis"> Success Metrics </span> </a> </li> <li class="md-nav__item"> <a href="#risks-mitigations" class="md-nav__link"> <span class="md-ellipsis"> Risks &amp; Mitigations </span> </a> </li> <li class="md-nav__item"> <a href="#dependencies" class="md-nav__link"> <span class="md-ellipsis"> Dependencies </span> </a> </li> <li class="md-nav__item"> <a href="#related-features" class="md-nav__link"> <span class="md-ellipsis"> Related Features </span> </a> </li> <li class="md-nav__item"> <a href="#references" class="md-nav__link"> <span class="md-ellipsis"> References </span> </a> </li> <li class="md-nav__item"> <a href="#questions-to-resolve" class="md-nav__link"> <span class="md-ellipsis"> Questions to Resolve </span> </a> </li> <li class="md-nav__item"> <a href="#next-steps" class="md-nav__link"> <span class="md-ellipsis"> Next Steps </span> </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <a href="https://github.com/prefrontal-systems/cortexgraph/edit/main/docs/features/auto-recall-conversation.md" title="Edit this page" class="md-content__button md-icon" rel="edit"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg> </a> <h1 id="feature-auto-recall-related-memories-during-conversation">Feature: Auto-Recall Related Memories During Conversation<a class="headerlink" href="#feature-auto-recall-related-memories-during-conversation" title="Permanent link">&para;</a></h1> <p><strong>Status</strong>: Backlog <strong>Priority</strong>: High <strong>Version Target</strong>: v0.7.0 (Natural Language Activation Phase 2) <strong>Created</strong>: 2025-11-14 <strong>Author</strong>: Identified during GC analysis session</p> <h2 id="problem-statement">Problem Statement<a class="headerlink" href="#problem-statement" title="Permanent link">&para;</a></h2> <p>Natural language activation (v0.6.0) currently only works for <strong>saving</strong> new memories conversationally. Important memories fade from disuse because the system doesn't automatically:</p> <ol> <li>Search for related memories when user discusses topics</li> <li>Surface relevant context during conversation</li> <li>Reinforce accessed memories naturally</li> </ol> <p><strong>Real-world impact</strong>: Research memories about STOPPER, publication strategy, e-FIT framework all decayed to near-GC threshold (score &lt; 0.05) despite containing valuable information, because they weren't being accessed through conversation.</p> <h2 id="current-workarounds">Current Workarounds<a class="headerlink" href="#current-workarounds" title="Permanent link">&para;</a></h2> <p>Users must manually: - Search for topics periodically (<code>search_memory(query="stopper")</code>) - Batch-reinforce by tags (<code>search → touch_memory</code> workflow) - Schedule "memory review" sessions</p> <p>This breaks the natural flow and defeats the purpose of conversational memory.</p> <h2 id="proposed-solution">Proposed Solution<a class="headerlink" href="#proposed-solution" title="Permanent link">&para;</a></h2> <h3 id="auto-recall-pipeline">Auto-Recall Pipeline<a class="headerlink" href="#auto-recall-pipeline" title="Permanent link">&para;</a></h3> <div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>User message received <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> ↓ <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>Analyze for topics/entities (background) <a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> ↓ <a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a>Search memory for related content <a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> ↓ <a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a>[If high relevance] Surface in context <a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> ↓ <a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a>Automatically reinforce via observe_memory_usage <a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> ↓ <a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a>Track cross-domain usage patterns </code></pre></div> <h3 id="key-components">Key Components<a class="headerlink" href="#key-components" title="Permanent link">&para;</a></h3> <p><strong>1. Message Analysis (Passive)</strong> - Extract topics, entities, concepts from user messages - Use existing <code>analyze_for_recall</code> as foundation - Lightweight - don't block conversation flow - Trigger on: questions, topic shifts, sustained discussion</p> <p><strong>2. Background Memory Search</strong> - Search short-term memory for related content - Use semantic similarity (embeddings) + keyword matching - Threshold: Only surface if relevance &gt; 0.7 - Limit: Top 3 memories max to avoid noise</p> <p><strong>3. Contextual Surfacing</strong> - <strong>Non-intrusive</strong>: Don't interrupt with "I remember..." - <strong>Options</strong>: - A) Silent reinforcement (just update scores, don't surface) - B) Subtle injection ("Based on your earlier note about...") - C) Available on request ("I found 3 related memories - would you like to see them?")</p> <p><strong>4. Automatic Reinforcement</strong> - Call <code>observe_memory_usage(memory_ids, context_tags)</code> automatically - Update last_used, use_count, review_priority - Detect cross-domain usage (Maslow effect) - Apply strength boosts when appropriate</p> <p><strong>5. User Controls</strong> <div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="c1"># Configuration options</span> <a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="n">AUTO_RECALL_ENABLED</span><span class="o">=</span><span class="n">true</span> <span class="c1"># Master switch</span> <a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="n">AUTO_RECALL_MODE</span><span class="o">=</span><span class="n">silent</span><span class="o">|</span><span class="n">subtle</span><span class="o">|</span><span class="n">interactive</span> <span class="c1"># How to surface</span> <a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="n">AUTO_RECALL_RELEVANCE_THRESHOLD</span><span class="o">=</span><span class="mf">0.7</span> <span class="c1"># Min similarity</span> <a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a><span class="n">AUTO_RECALL_MAX_RESULTS</span><span class="o">=</span><span class="mi">3</span> <span class="c1"># Limit per query</span> <a id="__codelineno-1-6" name="__codelineno-1-6" href="#__codelineno-1-6"></a><span class="n">AUTO_RECALL_MIN_INTERVAL</span><span class="o">=</span><span class="mi">300</span> <span class="c1"># Cooldown (5 min)</span> </code></pre></div></p> <h2 id="implementation-phases">Implementation Phases<a class="headerlink" href="#implementation-phases" title="Permanent link">&para;</a></h2> <h3 id="phase-1-silent-reinforcement-mvp">Phase 1: Silent Reinforcement (MVP)<a class="headerlink" href="#phase-1-silent-reinforcement-mvp" title="Permanent link">&para;</a></h3> <ul> <li>Detect topics in user messages</li> <li>Search for related memories (background)</li> <li>Automatically reinforce via <code>observe_memory_usage</code></li> <li>No surfacing - just prevent decay</li> <li><strong>Deliverable</strong>: Important memories stop fading from disuse</li> </ul> <h3 id="phase-2-subtle-surfacing">Phase 2: Subtle Surfacing<a class="headerlink" href="#phase-2-subtle-surfacing" title="Permanent link">&para;</a></h3> <ul> <li>Add "subtle" mode - inject context naturally</li> <li>Example: "Based on your earlier note about STOPPER timing windows..."</li> <li>LLM decides when/how to reference memories</li> <li><strong>Deliverable</strong>: Conversations feel more contextual</li> </ul> <h3 id="phase-3-interactive-mode">Phase 3: Interactive Mode<a class="headerlink" href="#phase-3-interactive-mode" title="Permanent link">&para;</a></h3> <ul> <li>Add user-controlled surfacing</li> <li>"I found 3 related memories about this topic - would you like to see them?"</li> <li>Allow inspection before surfacing</li> <li><strong>Deliverable</strong>: User control over memory injection</li> </ul> <h3 id="phase-4-cross-domain-detection-maslow-effect">Phase 4: Cross-Domain Detection (Maslow Effect)<a class="headerlink" href="#phase-4-cross-domain-detection-maslow-effect" title="Permanent link">&para;</a></h3> <ul> <li>Track when memories are accessed in different contexts</li> <li>Boost strength for cross-domain usage</li> <li>Build knowledge graph connections</li> <li><strong>Deliverable</strong>: Natural spaced repetition through conversation</li> </ul> <h2 id="technical-architecture">Technical Architecture<a class="headerlink" href="#technical-architecture" title="Permanent link">&para;</a></h2> <h3 id="new-components">New Components<a class="headerlink" href="#new-components" title="Permanent link">&para;</a></h3> <p><strong>1. ConversationAnalyzer</strong> <div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="k">class</span><span class="w"> </span><span class="nc">ConversationAnalyzer</span><span class="p">:</span> <a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Analyze messages for recall opportunities.&quot;&quot;&quot;</span> <a id="__codelineno-2-3" name="__codelineno-2-3" href="#__codelineno-2-3"></a> <a id="__codelineno-2-4" name="__codelineno-2-4" href="#__codelineno-2-4"></a> <span class="k">def</span><span class="w"> </span><span class="nf">extract_topics</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span> <a id="__codelineno-2-5" name="__codelineno-2-5" href="#__codelineno-2-5"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Extract topics/entities from message.&quot;&quot;&quot;</span> <a id="__codelineno-2-6" name="__codelineno-2-6" href="#__codelineno-2-6"></a> <a id="__codelineno-2-7" name="__codelineno-2-7" href="#__codelineno-2-7"></a> <span class="k">def</span><span class="w"> </span><span class="nf">should_trigger_recall</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">history</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span> <a id="__codelineno-2-8" name="__codelineno-2-8" href="#__codelineno-2-8"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Decide if this message warrants memory search.&quot;&quot;&quot;</span> <a id="__codelineno-2-9" name="__codelineno-2-9" href="#__codelineno-2-9"></a> <a id="__codelineno-2-10" name="__codelineno-2-10" href="#__codelineno-2-10"></a> <span class="k">def</span><span class="w"> </span><span class="nf">get_context_tags</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span> <a id="__codelineno-2-11" name="__codelineno-2-11" href="#__codelineno-2-11"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Extract tags representing current context.&quot;&quot;&quot;</span> </code></pre></div></p> <p><strong>2. AutoRecallEngine</strong> <div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="k">class</span><span class="w"> </span><span class="nc">AutoRecallEngine</span><span class="p">:</span> <a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Orchestrate automatic memory recall.&quot;&quot;&quot;</span> <a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a> <a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a> <span class="k">def</span><span class="w"> </span><span class="nf">process_message</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">RecallResult</span><span class="p">:</span> <a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Main entry point - analyze and recall.&quot;&quot;&quot;</span> <a id="__codelineno-3-6" name="__codelineno-3-6" href="#__codelineno-3-6"></a> <a id="__codelineno-3-7" name="__codelineno-3-7" href="#__codelineno-3-7"></a> <span class="k">def</span><span class="w"> </span><span class="nf">search_related</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">topics</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Memory</span><span class="p">]:</span> <a id="__codelineno-3-8" name="__codelineno-3-8" href="#__codelineno-3-8"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Search for related memories.&quot;&quot;&quot;</span> <a id="__codelineno-3-9" name="__codelineno-3-9" href="#__codelineno-3-9"></a> <a id="__codelineno-3-10" name="__codelineno-3-10" href="#__codelineno-3-10"></a> <span class="k">def</span><span class="w"> </span><span class="nf">reinforce_silently</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">memories</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="n">Memory</span><span class="p">],</span> <span class="n">context</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]):</span> <a id="__codelineno-3-11" name="__codelineno-3-11" href="#__codelineno-3-11"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Update scores without surfacing.&quot;&quot;&quot;</span> <a id="__codelineno-3-12" name="__codelineno-3-12" href="#__codelineno-3-12"></a> <a id="__codelineno-3-13" name="__codelineno-3-13" href="#__codelineno-3-13"></a> <span class="k">def</span><span class="w"> </span><span class="nf">should_surface</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">memories</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="n">Memory</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span> <a id="__codelineno-3-14" name="__codelineno-3-14" href="#__codelineno-3-14"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Decide if memories should be surfaced to user.&quot;&quot;&quot;</span> </code></pre></div></p> <p><strong>3. MCP Tool: configure_auto_recall</strong> <div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="nd">@mcp</span><span class="o">.</span><span class="n">tool</span><span class="p">()</span> <a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="k">def</span><span class="w"> </span><span class="nf">configure_auto_recall</span><span class="p">(</span> <a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a> <span class="n">enabled</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> <a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a> <span class="n">mode</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;silent&quot;</span><span class="p">,</span> <a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a> <span class="n">relevance_threshold</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.7</span><span class="p">,</span> <a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a> <span class="n">max_results</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span> <a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span><span class="p">:</span> <a id="__codelineno-4-8" name="__codelineno-4-8" href="#__codelineno-4-8"></a><span class="w"> </span><span class="sd">&quot;&quot;&quot;Configure auto-recall behavior.&quot;&quot;&quot;</span> </code></pre></div></p> <h3 id="integration-points">Integration Points<a class="headerlink" href="#integration-points" title="Permanent link">&para;</a></h3> <p><strong>Server-side integration</strong> (cortexgraph/server.py): <div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="c1"># Add middleware to process messages</span> <a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="k">async</span> <span class="k">def</span><span class="w"> </span><span class="nf">process_message_middleware</span><span class="p">(</span><span class="n">message</span><span class="p">:</span> <span class="nb">str</span><span class="p">):</span> <a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a> <span class="k">if</span> <span class="n">config</span><span class="o">.</span><span class="n">auto_recall_enabled</span><span class="p">:</span> <a id="__codelineno-5-4" name="__codelineno-5-4" href="#__codelineno-5-4"></a> <span class="n">recall_engine</span><span class="o">.</span><span class="n">process_message</span><span class="p">(</span><span class="n">message</span><span class="p">)</span> <a id="__codelineno-5-5" name="__codelineno-5-5" href="#__codelineno-5-5"></a> <span class="c1"># Continue normal flow</span> </code></pre></div></p> <p><strong>Tool response enhancement</strong>: <div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="c1"># Existing tools can check for related memories</span> <a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="k">def</span><span class="w"> </span><span class="nf">save_memory</span><span class="p">(</span><span class="o">...</span><span class="p">):</span> <a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a> <span class="c1"># ... normal save logic ...</span> <a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a> <a id="__codelineno-6-5" name="__codelineno-6-5" href="#__codelineno-6-5"></a> <span class="c1"># Check for related memories</span> <a id="__codelineno-6-6" name="__codelineno-6-6" href="#__codelineno-6-6"></a> <span class="k">if</span> <span class="n">config</span><span class="o">.</span><span class="n">auto_recall_mode</span> <span class="o">==</span> <span class="s2">&quot;subtle&quot;</span><span class="p">:</span> <a id="__codelineno-6-7" name="__codelineno-6-7" href="#__codelineno-6-7"></a> <span class="n">related</span> <span class="o">=</span> <span class="n">recall_engine</span><span class="o">.</span><span class="n">search_related</span><span class="p">(</span><span class="n">entities</span><span class="p">)</span> <a id="__codelineno-6-8" name="__codelineno-6-8" href="#__codelineno-6-8"></a> <span class="k">if</span> <span class="n">related</span><span class="p">:</span> <a id="__codelineno-6-9" name="__codelineno-6-9" href="#__codelineno-6-9"></a> <span class="k">return</span> <span class="p">{</span> <a id="__codelineno-6-10" name="__codelineno-6-10" href="#__codelineno-6-10"></a> <span class="o">**</span><span class="n">result</span><span class="p">,</span> <a id="__codelineno-6-11" name="__codelineno-6-11" href="#__codelineno-6-11"></a> <span class="s2">&quot;related_memories&quot;</span><span class="p">:</span> <span class="p">[</span><span class="n">m</span><span class="o">.</span><span class="n">id</span> <span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">related</span><span class="p">],</span> <a id="__codelineno-6-12" name="__codelineno-6-12" href="#__codelineno-6-12"></a> <span class="s2">&quot;hint&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;Found </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">related</span><span class="p">)</span><span class="si">}</span><span class="s2"> related memories&quot;</span> <a id="__codelineno-6-13" name="__codelineno-6-13" href="#__codelineno-6-13"></a> <span class="p">}</span> </code></pre></div></p> <h2 id="success-metrics">Success Metrics<a class="headerlink" href="#success-metrics" title="Permanent link">&para;</a></h2> <p><strong>Quantitative</strong>: - Reduction in GC candidates (fewer important memories decay) - Increase in memory reinforcement events - Cross-domain usage detection rate - Average score of research-tagged memories</p> <p><strong>Qualitative</strong>: - Conversations feel more contextual - Users report "it remembers what I told it" - Reduced need for manual memory review sessions - Natural spaced repetition working</p> <h2 id="risks-mitigations">Risks &amp; Mitigations<a class="headerlink" href="#risks-mitigations" title="Permanent link">&para;</a></h2> <table> <thead> <tr> <th>Risk</th> <th>Impact</th> <th>Mitigation</th> </tr> </thead> <tbody> <tr> <td>Over-surfacing (annoying)</td> <td>User disables feature</td> <td>Conservative thresholds, cooldown timers</td> </tr> <tr> <td>Performance hit</td> <td>Slow responses</td> <td>Background processing, async search</td> </tr> <tr> <td>Privacy concerns</td> <td>Unexpected memory surfacing</td> <td>User controls, clear settings</td> </tr> <tr> <td>False positives</td> <td>Irrelevant memories</td> <td>Tune relevance threshold, user feedback</td> </tr> <tr> <td>Token costs</td> <td>Expensive for LLM</td> <td>Silent mode first, batch processing</td> </tr> </tbody> </table> <h2 id="dependencies">Dependencies<a class="headerlink" href="#dependencies" title="Permanent link">&para;</a></h2> <ul> <li>✅ Existing: <code>analyze_for_recall</code> tool (v0.6.0)</li> <li>✅ Existing: <code>observe_memory_usage</code> tool (v0.5.1)</li> <li>✅ Existing: Embedding-based similarity search</li> <li>⏳ New: Conversation context tracking</li> <li>⏳ New: Auto-recall configuration system</li> <li>⏳ New: Background processing pipeline</li> </ul> <h2 id="related-features">Related Features<a class="headerlink" href="#related-features" title="Permanent link">&para;</a></h2> <ul> <li><strong>Natural Language Activation</strong> (v0.6.0) - Auto-save foundation</li> <li><strong>Spaced Repetition</strong> (v0.5.1) - Review priority system</li> <li><strong>Consolidation</strong> (v0.4.0) - Knowledge graph connections</li> <li><strong>Embeddings</strong> (optional) - Semantic similarity search</li> </ul> <h2 id="references">References<a class="headerlink" href="#references" title="Permanent link">&para;</a></h2> <ul> <li>Issue: #TBD</li> <li>Original discussion: GC analysis session 2025-11-14</li> <li>Related: Natural Language Activation design (docs/design/natural-activation.md)</li> <li>Research: Maslow effect, cross-domain reinforcement</li> </ul> <h2 id="questions-to-resolve">Questions to Resolve<a class="headerlink" href="#questions-to-resolve" title="Permanent link">&para;</a></h2> <ol> <li><strong>Surfacing strategy</strong>: Silent, subtle, or interactive by default?</li> <li><strong>Threshold tuning</strong>: What relevance score prevents over-surfacing?</li> <li><strong>Cooldown timing</strong>: How often can auto-recall trigger?</li> <li><strong>Context window</strong>: How many previous messages to analyze?</li> <li><strong>Performance</strong>: Background vs. synchronous processing?</li> </ol> <h2 id="next-steps">Next Steps<a class="headerlink" href="#next-steps" title="Permanent link">&para;</a></h2> <ol> <li>Create GitHub issue for tracking</li> <li>Prototype silent reinforcement (Phase 1 MVP)</li> <li>Test with real conversations to tune thresholds</li> <li>Gather user feedback on surfacing preferences</li> <li>Iterate based on usage patterns</li> </ol> <hr /> <p><strong>Status Updates</strong>: - 2025-11-14: Feature specified, added to backlog</p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> <div class="md-social"> <a href="https://github.com/prefrontal-systems/cortexgraph" target="_blank" rel="noopener" title="github.com" class="md-social__link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> <a href="https://github.com/prefrontal-systems/cortexgraph/discussions" target="_blank" rel="noopener" title="github.com" class="md-social__link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M384 144c0 97.2-86 176-192 176-26.7 0-52.1-5-75.2-14l-81.6 43.2c-9.3 4.9-20.7 3.2-28.2-4.2s-9.2-18.9-4.2-28.2l35.6-67.2C14.3 220.2 0 183.6 0 144 0 46.8 86-32 192-32s192 78.8 192 176m0 368c-94.1 0-172.4-62.1-188.8-144 120-1.5 224.3-86.9 235.8-202.7 83.3 19.2 145 88.3 145 170.7 0 39.6-14.3 76.2-38.4 105.6l35.6 67.2c4.9 9.3 3.2 20.7-4.2 28.2s-18.9 9.2-28.2 4.2L459.2 498c-23.1 9-48.5 14-75.2 14"/></svg> </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["navigation.instant", "navigation.tracking", "navigation.tabs", "navigation.sections", "navigation.expand", "navigation.top", "search.suggest", "search.highlight", "content.code.copy", "content.code.annotate", "content.action.edit"], "search": "../../assets/javascripts/workers/search.7a47a382.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../../assets/javascripts/bundle.e71a0d61.min.js"></script> </body> </html>

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prefrontalsys/mnemex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server