feat: add file tools (read/write/edit/list_dir) for agent memory writes

Enable the agent to persist memories by adding 4 SPIFFS file tools
(read_file, write_file, edit_file, list_dir) with path validation,
and update the system prompt with memory guidelines pointing to
/spiffs/memory/MEMORY.md and daily notes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
crispyberry
2026-02-07 17:54:52 +08:00
parent 0ed0febcd0
commit 31b15aa1f9
5 changed files with 351 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ idf_component_register(
"tools/tool_registry.c"
"tools/tool_web_search.c"
"tools/tool_get_time.c"
"tools/tool_files.c"
INCLUDE_DIRS
"."
REQUIRES