chore: reinforce memory recall prompts
This commit is contained in:
@@ -183,6 +183,14 @@ export function buildAgentSystemPrompt(params: {
|
||||
"",
|
||||
]
|
||||
: [];
|
||||
const memorySection =
|
||||
availableTools.has("memory_search") || availableTools.has("memory_get")
|
||||
? [
|
||||
"## Memory Recall",
|
||||
"Before answering anything about prior work, decisions, dates, people, preferences, or todos: run memory_search on MEMORY.md + memory/*.md; then use memory_get to pull only the needed lines. If low confidence after search, say you checked.",
|
||||
"",
|
||||
]
|
||||
: [];
|
||||
|
||||
const lines = [
|
||||
"You are a personal assistant running inside Clawdbot.",
|
||||
@@ -212,6 +220,7 @@ export function buildAgentSystemPrompt(params: {
|
||||
"If a task is more complex or takes longer, spawn a sub-agent. It will do the work for you and ping you when it's done. You can always check up on it.",
|
||||
"",
|
||||
...skillsSection,
|
||||
...memorySection,
|
||||
hasGateway ? "## Clawdbot Self-Update" : "",
|
||||
hasGateway
|
||||
? [
|
||||
|
||||
@@ -34,7 +34,7 @@ export function createMemorySearchTool(options: {
|
||||
label: "Memory Search",
|
||||
name: "memory_search",
|
||||
description:
|
||||
"Search agent memory files (MEMORY.md + memory/*.md) using semantic vectors.",
|
||||
"Mandatory recall step: semantically search MEMORY.md + memory/*.md before answering questions about prior work, decisions, dates, people, preferences, or todos; returns top snippets with path + lines.",
|
||||
parameters: MemorySearchSchema,
|
||||
execute: async (_toolCallId, params) => {
|
||||
const query = readStringParam(params, "query", { required: true });
|
||||
@@ -77,7 +77,8 @@ export function createMemoryGetTool(options: {
|
||||
return {
|
||||
label: "Memory Get",
|
||||
name: "memory_get",
|
||||
description: "Read a memory file by path (workspace-relative).",
|
||||
description:
|
||||
"Safe snippet read from MEMORY.md or memory/*.md with optional from/lines; use after memory_search to pull only the needed lines and keep context small.",
|
||||
parameters: MemoryGetSchema,
|
||||
execute: async (_toolCallId, params) => {
|
||||
const relPath = readStringParam(params, "path", { required: true });
|
||||
|
||||
Reference in New Issue
Block a user