feat(memory): expose memory_search and memory_save as native tools (#940 Phase 3)#953
Merged
feat(memory): expose memory_search and memory_save as native tools (#940 Phase 3)#953
Conversation
Add MemoryToolExecutor in zeph-core with two tools: - memory_search: queries SemanticMemory recall, key facts, and session summaries; returns formatted results the model can act on - memory_save: persists content to long-term memory with 4096-char limit MemoryState.memory refactored to Option<Arc<SemanticMemory>> for shared access between agent loop and executor. Executor registered conditionally in runner, daemon, and acp — only when memory backend is configured. Closes #940 (Phase 3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MemoryToolExecutorinzeph-coreexposesmemory_searchandmemory_saveas nativeToolDefinitions the model can invoke explicitly via structured tool_use.memory_search: queries SemanticMemory recall, key facts, and session summaries; returns formatted multi-section output.memory_save: persists a content string to long-term memory with 4096-char validation.MemoryState.memoryrefactored fromOption<SemanticMemory>toOption<Arc<SemanticMemory>>for shared access between agent loop and executor.runner.rs,daemon.rs,acp.rs— only when a memory backend is configured.Test plan
cargo nextest run --workspace --lib --bins— 2878 tests passcargo clippy --workspace -- -D warnings— cleancargo +nightly fmt --check— cleanmemory_searchandmemory_saveappear in tool listCloses #940 (Phase 3)