pub struct RecallRequest {Show 19 fields
pub agent_id: String,
pub query: String,
pub top_k: usize,
pub memory_type: Option<MemoryType>,
pub min_importance: f32,
pub session_id: Option<String>,
pub tags: Vec<String>,
pub include_associated: bool,
pub associated_memories_cap: Option<u32>,
pub associated_memories_depth: Option<u8>,
pub associated_memories_min_weight: Option<f32>,
pub since: Option<String>,
pub until: Option<String>,
pub routing: Option<RoutingMode>,
pub rerank: Option<bool>,
pub fusion: Option<FusionStrategy>,
pub vector_weight: Option<f32>,
pub iterations: Option<u8>,
pub neighborhood: Option<bool>,
}Expand description
Recall memories request
Fields§
§agent_id: String§query: String§top_k: usize§memory_type: Option<MemoryType>§min_importance: f32§session_id: Option<String>§include_associated: boolCOG-2: traverse KG depth-1 from recalled memories and include associatively linked memories in the response (default: false)
associated_memories_cap: Option<u32>COG-2: max associated memories to return (default: 10, max: 10)
associated_memories_depth: Option<u8>KG-3: KG traversal depth 1–3 (default: 1); requires include_associated
associated_memories_min_weight: Option<f32>KG-3: minimum edge weight for KG traversal (default: 0.0)
since: Option<String>CE-7: only recall memories created at or after this ISO-8601 timestamp
until: Option<String>CE-7: only recall memories created at or before this ISO-8601 timestamp
routing: Option<RoutingMode>CE-10: retrieval routing mode. None uses the server default (auto).
rerank: Option<bool>CE-13: cross-encoder reranking. None uses server default (true for recall,
false for search). Set to Some(false) to disable on latency-sensitive paths.
fusion: Option<FusionStrategy>CE-14: fusion strategy when routing = Hybrid. None uses server default (Rrf).
vector_weight: Option<f32>CE-17: explicit vector/BM25 weight for Hybrid routing (0.0–1.0).
When set, overrides the adaptive heuristic from QueryClassifier.
Omit for adaptive defaults (recommended for most callers).
Only effective when routing = RoutingMode::Hybrid.
iterations: Option<u8>CE-23: pseudo-relevance feedback (PRF) passes for BM25 routing (1–3, default: 1).
Pass Some(2) or Some(3) for multi-hop or temporal queries where a second
BM25 pass over extracted entities improves recall.
Only effective when routing = RoutingMode::Bm25.
neighborhood: Option<bool>v0.11.0: fetch session-adjacent memories within ±5 min of each top result.
None uses server default (true). Set to Some(false) to disable for
latency-sensitive paths.
Implementations§
Source§impl RecallRequest
impl RecallRequest
Sourcepub fn new(agent_id: impl Into<String>, query: impl Into<String>) -> Self
pub fn new(agent_id: impl Into<String>, query: impl Into<String>) -> Self
Create a new recall request
Sourcepub fn with_top_k(self, top_k: usize) -> Self
pub fn with_top_k(self, top_k: usize) -> Self
Set number of results
Sourcepub fn with_type(self, memory_type: MemoryType) -> Self
pub fn with_type(self, memory_type: MemoryType) -> Self
Filter by memory type
Sourcepub fn with_min_importance(self, min: f32) -> Self
pub fn with_min_importance(self, min: f32) -> Self
Set minimum importance threshold
Sourcepub fn with_session(self, session_id: impl Into<String>) -> Self
pub fn with_session(self, session_id: impl Into<String>) -> Self
Filter by session
Filter by tags
Sourcepub fn with_associated(self) -> Self
pub fn with_associated(self) -> Self
COG-2: include KG depth-1 associated memories in the response
Sourcepub fn with_associated_cap(self, cap: u32) -> Self
pub fn with_associated_cap(self, cap: u32) -> Self
COG-2: set max associated memories cap (default: 10, max: 10)
Sourcepub fn with_since(self, since: impl Into<String>) -> Self
pub fn with_since(self, since: impl Into<String>) -> Self
CE-7: only recall memories created at or after this ISO-8601 timestamp
Sourcepub fn with_until(self, until: impl Into<String>) -> Self
pub fn with_until(self, until: impl Into<String>) -> Self
CE-7: only recall memories created at or before this ISO-8601 timestamp
Sourcepub fn with_routing(self, routing: RoutingMode) -> Self
pub fn with_routing(self, routing: RoutingMode) -> Self
CE-10: set retrieval routing mode
Sourcepub fn with_rerank(self, rerank: bool) -> Self
pub fn with_rerank(self, rerank: bool) -> Self
CE-13: enable or disable cross-encoder reranking (server default: true for recall)
Sourcepub fn with_associated_depth(self, depth: u8) -> Self
pub fn with_associated_depth(self, depth: u8) -> Self
KG-3: set KG traversal depth (1–3, default: 1); implies include_associated
Sourcepub fn with_associated_min_weight(self, weight: f32) -> Self
pub fn with_associated_min_weight(self, weight: f32) -> Self
KG-3: set minimum edge weight for KG traversal (default: 0.0)
Sourcepub fn with_fusion(self, fusion: FusionStrategy) -> Self
pub fn with_fusion(self, fusion: FusionStrategy) -> Self
CE-14: set fusion strategy for hybrid recall (server default: Rrf)
Sourcepub fn with_vector_weight(self, weight: f32) -> Self
pub fn with_vector_weight(self, weight: f32) -> Self
CE-17: set explicit vector/BM25 weight for Hybrid routing (0.0–1.0).
Overrides the adaptive heuristic from QueryClassifier.
Omit for adaptive defaults (recommended for most callers).
Sourcepub fn with_iterations(self, iterations: u8) -> Self
pub fn with_iterations(self, iterations: u8) -> Self
CE-23: set PRF iteration count for BM25 routing (1–3, default: 1).
Pass 2 or 3 for multi-hop or temporal queries where a second BM25
pass over extracted entities improves recall.
Only effective when routing = RoutingMode::Bm25.
Sourcepub fn with_neighborhood(self, neighborhood: bool) -> Self
pub fn with_neighborhood(self, neighborhood: bool) -> Self
v0.11.0: enable or disable session-adjacent neighborhood enrichment
(server default: true). Set to false for latency-sensitive paths.
Trait Implementations§
Source§impl Clone for RecallRequest
impl Clone for RecallRequest
Source§fn clone(&self) -> RecallRequest
fn clone(&self) -> RecallRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more