Skip to content

feat(memory): expose memory_search and memory_save as native tools (#940 Phase 3)#953

Merged
bug-ops merged 6 commits intomainfrom
feat/memory-tools-940
Feb 26, 2026
Merged

feat(memory): expose memory_search and memory_save as native tools (#940 Phase 3)#953
bug-ops merged 6 commits intomainfrom
feat/memory-tools-940

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 26, 2026

Summary

  • New MemoryToolExecutor in zeph-core exposes memory_search and memory_save as native ToolDefinitions 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.memory refactored from Option<SemanticMemory> to Option<Arc<SemanticMemory>> for shared access between agent loop and executor.
  • Executor registered conditionally in runner.rs, daemon.rs, acp.rs — only when a memory backend is configured.

Test plan

  • cargo nextest run --workspace --lib --bins — 2878 tests pass
  • cargo clippy --workspace -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • Manual: run with memory configured, verify memory_search and memory_save appear in tool list
  • Manual: run without memory, verify tools do not appear

Closes #940 (Phase 3)

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)
@github-actions github-actions bot added documentation Improvements or additions to documentation rust core dependencies enhancement New feature or request size/XL labels Feb 26, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 26, 2026 03:28
@github-actions github-actions bot added the tests label Feb 26, 2026
@bug-ops bug-ops merged commit 1e1bee0 into main Feb 26, 2026
28 checks passed
@bug-ops bug-ops deleted the feat/memory-tools-940 branch February 26, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core dependencies documentation Improvements or additions to documentation enhancement New feature or request rust size/XL tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic: [NativeTool] Improve native model tool_use integration

1 participant