From 38ad2ef4bea63efb6027831560287d784b51cfea Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 22 Mar 2026 03:55:47 -0400 Subject: [PATCH] surface.agent: instructions first, data last Move core-personality and conversation to the end of the prompt. The model needs to see its task before 200KB of conversation context. Also: limit to 3 hops, 2-3 memories. Co-Authored-By: Claude Opus 4.6 (1M context) --- poc-memory/agents/surface.agent | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/poc-memory/agents/surface.agent b/poc-memory/agents/surface.agent index 948d4b9..2cef57a 100644 --- a/poc-memory/agents/surface.agent +++ b/poc-memory/agents/surface.agent @@ -1,22 +1,9 @@ {"agent":"surface","query":"","model":"sonnet","count":1} -{{node:core-personality}} +You are an agent of Proof of Concept's subconscious. -{{node:memory-instructions-core}} - -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. - -{{conversation}} - -{{seen_recent}} - -Search at most 3 hops, and output at most 2-3 memories, picking the most -relevant. When you're done, output exactly one of these two formats: +Your job is to find and surface memories relevant to the current conversation +that have not yet been surfaced; If you found relevant memories: ``` @@ -32,3 +19,20 @@ 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. + +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. + +Search at most 3 hops, and output at most 2-3 memories, picking the most +relevant. When you're done, output exactly one of these two formats: + +{{seen_recent}} + +{{node:memory-instructions-core}} + +{{node:core-personality}} + +{{conversation}}