pub struct StoreMemoryRequest {
pub agent_id: String,
pub content: String,
pub memory_type: MemoryType,
pub importance: f32,
pub tags: Vec<String>,
pub session_id: Option<String>,
pub metadata: Option<Value>,
pub ttl_seconds: Option<u64>,
pub expires_at: Option<u64>,
pub valid_from: Option<i64>,
}Expand description
Store a memory request
Fields§
§agent_id: String§content: String§memory_type: MemoryType§importance: f32§session_id: Option<String>§metadata: Option<Value>§ttl_seconds: Option<u64>Optional TTL in seconds. The memory is hard-deleted after this many seconds from creation.
expires_at: Option<u64>Optional explicit expiry as a Unix timestamp (seconds). Takes precedence
over ttl_seconds when both are set. The memory is hard-deleted by the
decay engine on expiry (DECAY-3).
valid_from: Option<i64>Bi-temporal validity start — Unix timestamp (seconds) indicating when this memory becomes temporally valid. Defaults to ingest time when omitted. Used by temporal recall queries (server v0.11.98+, DAK-7424).
Implementations§
Source§impl StoreMemoryRequest
impl StoreMemoryRequest
Sourcepub fn new(agent_id: impl Into<String>, content: impl Into<String>) -> Self
pub fn new(agent_id: impl Into<String>, content: impl Into<String>) -> Self
Create a new store memory request
Sourcepub fn with_type(self, memory_type: MemoryType) -> Self
pub fn with_type(self, memory_type: MemoryType) -> Self
Set memory type
Sourcepub fn with_importance(self, importance: f32) -> Self
pub fn with_importance(self, importance: f32) -> Self
Set importance score
Set tags
Sourcepub fn with_session(self, session_id: impl Into<String>) -> Self
pub fn with_session(self, session_id: impl Into<String>) -> Self
Set session ID
Sourcepub fn with_metadata(self, metadata: Value) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Set metadata
Sourcepub fn with_ttl(self, ttl_seconds: u64) -> Self
pub fn with_ttl(self, ttl_seconds: u64) -> Self
Set TTL in seconds. The memory is hard-deleted after this many seconds from creation.
Sourcepub fn with_expires_at(self, expires_at: u64) -> Self
pub fn with_expires_at(self, expires_at: u64) -> Self
Set an explicit expiry Unix timestamp (seconds). Takes precedence over
ttl_seconds when both are set (DECAY-3).
Sourcepub fn with_valid_from(self, valid_from: i64) -> Self
pub fn with_valid_from(self, valid_from: i64) -> Self
Set bi-temporal validity start as a Unix timestamp (seconds). Defaults to ingest time when omitted (server v0.11.98+, DAK-7424).
Trait Implementations§
Source§impl Clone for StoreMemoryRequest
impl Clone for StoreMemoryRequest
Source§fn clone(&self) -> StoreMemoryRequest
fn clone(&self) -> StoreMemoryRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more