1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Memory tools for ADK agents.
//!
//! This module provides tools that enable agents to autonomously search their
//! own long-term memory during reasoning:
//!
//! - [`LoadMemoryTool`] — an agent-callable tool for on-demand memory search
//! - [`PreloadMemoryTool`] — automatically loads relevant memories at turn start
//! - [`MemoryToolConfig`] — shared configuration for both tools
//!
//! # Feature Gate
//!
//! This module is only available when the `memory-tools` feature is enabled:
//!
//! ```toml
//! [dependencies]
//! adk-tool = { version = "0.8", features = ["memory-tools"] }
//! ```
//!
//! # Example
//!
//! ```rust,ignore
//! use adk_tool::memory::{LoadMemoryTool, PreloadMemoryTool};
//! use adk_memory::InMemoryMemoryService;
//! use std::sync::Arc;
//!
//! let memory_service = Arc::new(InMemoryMemoryService::new());
//!
//! // LoadMemoryTool — agent calls during reasoning
//! let load_tool = LoadMemoryTool::builder()
//! .memory_service(memory_service.clone())
//! .max_results(5)
//! .min_relevance_score(0.3)
//! .build()?;
//!
//! // PreloadMemoryTool — auto-injects at turn start
//! let preload_tool = PreloadMemoryTool::builder()
//! .memory_service(memory_service.clone())
//! .max_results(3)
//! .build()?;
//!
//! // Convert to a before-model callback for automatic injection
//! let callback = preload_tool.into_before_model_callback();
//! ```
pub use ;
pub use ;
pub use ;