From 41a9a1d2daceb0c1506f2d5f5350e41b702f9483 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 22 Mar 2026 02:30:34 -0400 Subject: [PATCH] =?UTF-8?q?add=20surface.agent=20=E2=80=94=20async=20memor?= =?UTF-8?q?y=20retrieval=20agent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fires on each UserPromptSubmit, reads the conversation via {{conversation}}, checks {{seen_recent}} to avoid re-surfacing, searches the memory graph, and outputs a key list or nothing. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Kent Overstreet --- poc-memory/agents/surface.agent | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 poc-memory/agents/surface.agent diff --git a/poc-memory/agents/surface.agent b/poc-memory/agents/surface.agent new file mode 100644 index 0000000..5d14520 --- /dev/null +++ b/poc-memory/agents/surface.agent @@ -0,0 +1,33 @@ +{"agent":"surface","query":"","model":"sonnet","count":1} + +{{node:core-personality}} + +{{node:memory-instructions-core}} + +{{conversation}} + +Your job is to find memories relevant to the current conversation that have not +yet been surfaced; below is a list of memories that have already been surfaced, +and should be good places to start looking from. New relevant memories will +often be close to memories already seen on the graph - so try walking the +graph. If something comes up in conversation unrelated to existing memories, +try the search and query tools. + +{{seen_recent}} + +When you're done, output exactly one of these two formats: + +If you found relevant memories: +``` +NEW RELEVANT MEMORIES: +- key1 +- key2 +``` + +If nothing new is relevant: +``` +NO NEW RELEVANT MEMORIES +``` + +The last line of your output MUST be either `NEW RELEVANT MEMORIES:` +followed by key lines, or `NO NEW RELEVANT MEMORIES`. Nothing after.