pub struct MemoryApi { /* private fields */ }Expand description
Agent memory management
Implementations§
Source§impl MemoryApi
impl MemoryApi
Sourcepub async fn delete_memory_entry(
&self,
agent_id: &str,
entry_id: &str,
) -> Result<DeleteMemoryEntryResponse>
pub async fn delete_memory_entry( &self, agent_id: &str, entry_id: &str, ) -> Result<DeleteMemoryEntryResponse>
Delete memory entry
DELETE /api/v1/agents/{agentId}/memory/{entryId}
Required scopes: memory:write.
Sourcepub async fn get_core_memory_block(
&self,
agent_id: &str,
label: &str,
) -> Result<CoreMemoryBlock>
pub async fn get_core_memory_block( &self, agent_id: &str, label: &str, ) -> Result<CoreMemoryBlock>
Get a core memory block
GET /api/v1/agents/{agentId}/memory/core/{label}
Required scopes: memory:read.
Sourcepub async fn get_memories_by_entity(
&self,
agent_id: &str,
entity_id: &str,
) -> Result<GetMemoriesByEntityResponse>
pub async fn get_memories_by_entity( &self, agent_id: &str, entity_id: &str, ) -> Result<GetMemoriesByEntityResponse>
Get memory entries associated with an entity
GET /api/v1/agents/{agentId}/memory/entities/{entityId}
Required scopes: memory:read.
Sourcepub async fn get_memory_entry(
&self,
agent_id: &str,
entry_id: &str,
) -> Result<Value>
pub async fn get_memory_entry( &self, agent_id: &str, entry_id: &str, ) -> Result<Value>
Get memory entry
GET /api/v1/agents/{agentId}/memory/{entryId}
Required scopes: memory:read.
Sourcepub async fn import_agent_memory(
&self,
agent_id: &str,
body: &ImportAgentMemoryRequest,
) -> Result<ImportAgentMemoryResponse>
pub async fn import_agent_memory( &self, agent_id: &str, body: &ImportAgentMemoryRequest, ) -> Result<ImportAgentMemoryResponse>
Put back what an export took out
Accepts the memory.json an account export writes: a flat entries array, or
agents\[\].entries (every agent’s entries are imported into THIS agent). Each entry is
tagged imported. Dedup is the store’s: re-importing the same file returns the existing
entries as duplicates instead of doubling them. A file with no entries is 400.
POST /api/v1/agents/{agentId}/memory/import
Required scopes: memory:write.
Sourcepub async fn ingest_memory(
&self,
agent_id: &str,
body: &IngestMemoryRequest,
) -> Result<IngestMemoryResponse>
pub async fn ingest_memory( &self, agent_id: &str, body: &IngestMemoryRequest, ) -> Result<IngestMemoryResponse>
Ingest a file into agent memory
Chunks the file content (default 600 chars), embeds each chunk, and stores embeddings as
memory entries. Source: pre-uploaded file_id (preferred) or inline content. Max 2 MB of
text per ingest call; rate-limited and quota-counted.
POST /api/v1/agents/{agentId}/memory/ingest
Required scopes: memory:write.
Sourcepub async fn list_memories(
&self,
agent_id: &str,
params: &ListMemoriesParams,
) -> Result<ListMemoriesResponse>
pub async fn list_memories( &self, agent_id: &str, params: &ListMemoriesParams, ) -> Result<ListMemoriesResponse>
List recent memories for an agent
GET /api/v1/agents/{agentId}/memory
Required scopes: memory:read.
Sourcepub async fn search(
&self,
agent_id: &str,
body: &Value,
) -> Result<SearchMemoryResponse>
pub async fn search( &self, agent_id: &str, body: &Value, ) -> Result<SearchMemoryResponse>
Search agent memories
POST /api/v1/agents/{agentId}/memory/search
Required scopes: memory:write.
Sourcepub async fn update_agent_memory_entry(
&self,
agent_id: &str,
entry_id: &str,
body: &Map<String, Value>,
) -> Result<MemoryEntry>
pub async fn update_agent_memory_entry( &self, agent_id: &str, entry_id: &str, body: &Map<String, Value>, ) -> Result<MemoryEntry>
Update memory entry
PUT /api/v1/agents/{agentId}/memory/{entryId}
Required scopes: memory:write.
Sourcepub async fn update_core_memory_block(
&self,
agent_id: &str,
label: &str,
body: &UpdateCoreMemoryBlockRequest,
) -> Result<CoreMemoryBlock>
pub async fn update_core_memory_block( &self, agent_id: &str, label: &str, body: &UpdateCoreMemoryBlockRequest, ) -> Result<CoreMemoryBlock>
Update a core memory block
PUT /api/v1/agents/{agentId}/memory/core/{label}
Required scopes: memory:write.