pub async fn add(
memory: Option<&Arc<MemoryService>>,
content: impl Into<String>,
scope: MemoryScope,
memory_type: MemoryType,
user_ctx: &UserContext,
agent_id: Option<&str>,
session_id: Option<&str>,
) -> Result<Memory>Expand description
Add a memory.
Goes through the service rather than the store because the service owns EMBEDDING: a row written without its vector is invisible to every later semantic search, which presents as data loss rather than a missing index.