> ## Documentation Index
> Fetch the complete documentation index at: https://docs.remem.online/llms.txt
> Use this file to discover all available pages before exploring further.

# Remem Memory Types: Episodic, Semantic, and Summary

> Remem organises memories into three types — episodic, semantic, and summary. Choose the right type to control what gets retrieved and when.

Remem organises everything your agent stores into one of three memory types: **episodic**, **semantic**, or **summary**. Choosing the right type isn't just good housekeeping — it directly affects what gets retrieved at query time. Episodic memories decay with time (by design), semantic facts stay relevant for much longer, and summaries are automatically generated to compress history without losing meaning.

## Overview

| Type       | Best for                 | Example                                             | When to use                                                                 |
| ---------- | ------------------------ | --------------------------------------------------- | --------------------------------------------------------------------------- |
| `episodic` | Events and conversations | `"User complained about slow delivery on June 3rd"` | Anything time-stamped — interactions, actions, support events               |
| `semantic` | Facts about the user     | `"User is based in Lagos, Nigeria"`                 | Stable profile info, preferences, and knowledge that doesn't expire quickly |
| `summary`  | Compressed history       | Auto-generated compressed memory                    | Created automatically by Remem when your episodic count grows large         |

***

## Episodic

Episodic memories capture **things that happened** — events, conversations, user actions, and support interactions. Because recency is weighted in Remem's hybrid scoring formula, episodic memories naturally fade as time passes, which is exactly what you want: a complaint from three weeks ago matters less than one from today.

```python theme={null}
import remem

client = remem.Client(api_key="YOUR_API_KEY")

client.remember(
    "User complained about slow delivery on June 3rd",
    user_id="user_123",
    agent_id="support_bot",
    memory_type="episodic",
)
```

<Info>
  Use `episodic` for conversation events, support tickets, user actions, or anything else that is meaningful *because* of when it happened.
</Info>

***

## Semantic

Semantic memories store **facts about the user** — their location, plan type, preferences, job role, or any other stable attribute. Unlike episodic memories, these facts don't lose value with age. Setting a high `importance` score ensures they get surfaced even when a query only loosely matches.

```python theme={null}
client.remember(
    "User is based in Lagos, Nigeria",
    user_id="user_123",
    agent_id="support_bot",
    memory_type="semantic",
    importance=0.9,  # stable fact — always surface this
)
```

```python theme={null}
client.remember(
    "User prefers responses in bullet points",
    user_id="user_123",
    agent_id="support_bot",
    memory_type="semantic",
    importance=0.8,
)
```

<Info>
  Set `importance=0.9` or higher for facts you always want retrieved — name, location, plan type, communication preferences. See [Hybrid Scoring](/concept/hybrid-scoring) for how importance affects ranking.
</Info>

***

## Summary

Summary memories are **compressed snapshots of older episodic history**. Remem generates them automatically in the background when your episodic count for a given user grows large. You never create them manually — they are a managed optimisation that keeps retrieval fast and token costs low.

<Note>
  You do not create summary memories yourself. Remem generates them automatically as your episodic history grows. You can read and filter them like any other memory type, but you should not store to `memory_type="summary"` directly.
</Note>

***

## Choosing the Right Type

<AccordionGroup>
  <Accordion title="Something the user said or did">
    Use **episodic**. These are time-stamped events — complaints, purchases, questions asked, features used. Their recency is part of their value.

    ```python theme={null}
    client.remember(
        "User placed order #4521 for 3 items",
        user_id="user_123",
        agent_id="store_bot",
        memory_type="episodic",
    )
    ```
  </Accordion>

  <Accordion title="A stable fact about the user">
    Use **semantic**. Profile details, preferences, and background knowledge stay useful regardless of when they were stored.

    ```python theme={null}
    client.remember(
        "User is a backend developer working in Python",
        user_id="user_123",
        agent_id="assistant_bot",
        memory_type="semantic",
        importance=0.85,
    )
    ```
  </Accordion>

  <Accordion title="A user preference">
    Use **semantic**. Preferences are facts, not events. They inform every future interaction and should be treated as stable profile data.

    ```python theme={null}
    client.remember(
        "User wants concise replies — no filler phrases",
        user_id="user_123",
        agent_id="assistant_bot",
        memory_type="semantic",
        importance=0.8,
    )
    ```
  </Accordion>

  <Accordion title="Compressed old context (automated)">
    Use nothing — Remem handles this automatically as **summary** memories. You will see them when listing or recalling memories, but you don't need to write them.
  </Accordion>
</AccordionGroup>

***

## Filtering by Type

You can scope both `recall()` and `list()` to a specific memory type to avoid noise from unrelated memory categories.

### Filtering search results

```python theme={null}
# Only retrieve semantic memories (stable facts)
memories = client.recall(
    "user preferences",
    user_id="user_123",
    agent_id="support_bot",
    memory_type="semantic",
)

for m in memories:
    print(m.memory)
```

### Filtering a full memory list

```python theme={null}
# List only episodic memories for a user
memories = client.list(
    user_id="user_123",
    agent_id="support_bot",
    memory_type="episodic",
)

for m in memories:
    print(f"[{m.memory_type}] {m.memory}")
```

<Tip>
  When building a user profile panel or a "what do you know about me?" feature, filter to `memory_type="semantic"` to return clean, fact-based memories without event noise from episodic history.
</Tip>
