Skip to main content
Go to documentation:
⌘U
Weaviate Database

Develop AI applications using Weaviate's APIs and tools

Deploy

Deploy, configure, and maintain Weaviate Database

Query Agent

Run agentic search over your Weaviate Cloud collections

Weaviate Cloud

Manage and scale Weaviate in the cloud

Engram

Persistent memory for LLM agents and applications

Additional resources

Integrations
Contributor guide
Events & Workshops
Weaviate Academy

Need help?

Weaviate LogoAsk AI Assistant⌘K
Community Forum

Manage memories

You can retrieve and delete individual memories using their ID.

All examples below use a connected client

See Connect to Engram for how to instantiate one.

import os
from engram import EngramClient

client = EngramClient(api_key=os.environ["ENGRAM_API_KEY"])

Get a memory

Retrieve a single memory by its ID.

memory = client.memories.get(
memory_id,
user_id=test_user_id,
group="default",
)

print(memory.content)
print(memory.topic)

Query parameters

ParameterTypeDescription
user_idstringUser scope (required if the topic is user-scoped)
groupstringThe memory group name (defaults to default)

Response

{
"id": "memory-uuid",
"project_id": "project-uuid",
"user_id": "user-uuid",
"content": "The user prefers dark mode.",
"topic": "UserKnowledge",
"group": "default",
"properties": { "conversation_id": "abc-123" },
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}

Delete a memory

Remove a memory permanently by its ID.

client.memories.delete(
memory_id,
user_id=test_user_id,
group="default",
)

The query parameters are the same as for the get request. You must provide the correct scoping parameters to identify the memory.

warning

Deleting a memory is permanent and cannot be undone.

Questions and feedback

If you have any questions or feedback, let us know in the user forum.