Manage memories
We have decided to sunset Engram. Existing projects will continue to work until December 31, 2026. It is no longer possible to create new Engram projects.
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"])
import os
from engram import AsyncEngramClient
client = AsyncEngramClient(api_key=os.environ["ENGRAM_API_KEY"])
export ENGRAM_API_KEY="eng_..."
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)
memory = await client.memories.get(
memory_id,
user_id=test_user_id,
group="default",
)
print(memory.content)
print(memory.topic)
curl "https://api.engram.weaviate.io/v1/memories/{memory-id}?user_id=user-uuid&group=default" \
-H "Authorization: Bearer $ENGRAM_API_KEY"
Query parameters
| Parameter | Type | Description |
|---|---|---|
user_id | string | User scope (required if the topic is user-scoped) |
group | string | The 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",
)
await client.memories.delete(
memory_id,
user_id=test_user_id,
group="default",
)
curl -X DELETE "https://api.engram.weaviate.io/v1/memories/{memory-id}?user_id=user-uuid&group=default" \
-H "Authorization: Bearer $ENGRAM_API_KEY"
The query parameters are the same as for the get request. You must provide the correct scoping parameters to identify the memory.
Deleting a memory is permanent and cannot be undone.
Questions and feedback
Have a question or feedback? Here's how to reach us.
