add surface.agent — async memory retrieval agent
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) <noreply@anthropic.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
4183b28b1d
commit
41a9a1d2da
1 changed files with 33 additions and 0 deletions
33
poc-memory/agents/surface.agent
Normal file
33
poc-memory/agents/surface.agent
Normal file
|
|
@ -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.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue