---
title: "Manage memories"
description: "How to get and delete individual memories in Engram by ID."
url: https://docs.weaviate.io/engram/guides/manage-memories
---

# Manage memories

> [!WARNING]
>
> **Engram is being sunset**
>
> 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](https://docs.weaviate.io/engram/concepts/memories) using their ID.

**All examples below use a connected `client`**

See [Connect to Engram](https://docs.weaviate.io/engram/quickstart#step-3-connect-to-engram) for how to instantiate one.

**Python**

```py
import os
from engram import EngramClient

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

**Python (Async)**

```py
import os
from engram import AsyncEngramClient

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

**Curl**

```bash
export ENGRAM_API_KEY="eng_..."
```

## Get a memory

Retrieve a single memory by its ID.

**Python**

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

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

**Python (Async)**

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

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

**Curl**

```bash
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](https://docs.weaviate.io/engram/concepts/scopes) (required if the topic is user-scoped) |
| `group` | string | The memory [group](https://docs.weaviate.io/engram/concepts/groups) name (defaults to `default`) |

### Response

```json
{
  "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.

**Python**

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

**Python (Async)**

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

**Curl**

```bash
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.

> [!WARNING]
>
> Deleting a memory is permanent and cannot be undone.
