---
schema_version: "1"
id: b090968bfacfa7436c8bdae0c186677e270c391a8e4f88f5e66d8c09b8763aaa
title: Memory Extraction
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/agentic-memory-context/guides/agentic-memory/agentic-memory-summary-generation.md
canonical_url: https://developer.salesforce.com/docs/data/agentic-memory-context/guide/agentic-memory-summary-generation.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 07fc9ae95422866a6908208a7ba48b159c40b516ac0b3afc61769ef3ab371bf1
products:
  - Agentic Memory & Context
  - Data 360 Developer Documentation
---
# Memory Extraction

Data 360 extracts session summaries from your agent conversations through a real-time memory extraction pipeline. Memory extraction processes conversations at regular intervals, capturing structured knowledge that persists across sessions and becomes immediately available for context retrieval in future conversations.

> **Note:** Memory extraction consumes Flex Credits for LLM processing. Each extraction cycle processes the accumulated messages since the last cycle and produces one or more memory entries.

## How Memory Extraction Works

Data 360 extracts memories from conversation data periodically during the session. Extraction runs at intervals determined by message volume and elapsed time, balancing freshness with efficiency.

```
PAST(memories) + PAST_OVERLAP(messages) + PAST_SUMMARY(conversations) + NEW(messages) + NEW(traces) = NEW(memories)
```

Each extraction cycle considers both new messages and previously extracted memories. This enables the pipeline to:

- Consolidate overlapping information across cycles.
- Remove duplicate memories.
- Resolve conflicts when newer information contradicts older information (recency wins).
- Build progressively richer and more accurate memories over time.

## Extraction Triggers

| Trigger       | Description                                                                                                                                                 |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Size-based    | Triggered when accumulated unprocessed messages reach approximately 50% of the LLM context window. This is the primary trigger during active conversations. |
| Time-based    | Triggered after a configurable duration since the last extraction. Ensures memories are generated from low-volume conversations.                            |
| Session close | A final extraction cycle runs when a session is closed, processing any remaining unprocessed messages.                                                      |

## What Gets Extracted

Each extraction cycle can produce these memory types.

| Memory Type                     | Scope        | What It Captures                                                                        |
| ------------------------------- | ------------ | --------------------------------------------------------------------------------------- |
| Conversation Summary (Episodic) | Conversation | Topics discussed, decisions made, actions taken, outcomes reached, key turning points.  |
| Profile Fact (Semantic)         | Individual   | Name, role, company, relationships, key dates, technical environment, business context. |
| Profile Preference (Semantic)   | Individual   | Communication style, product choices, scheduling habits, tool preferences.              |

Profile facts persist indefinitely. Each preference includes a confidence score (0.0–1.0) and decays over time unless reinforced, with explicitly stated preferences receiving higher confidence than inferred ones.

## Considerations

- **LLM processing:** Memory extraction involves calling an LLM with the extraction prompt that generates structured output containing summaries. This consumes LLM usage credits.
- **Memory storage:** Data 360 stores all extracted memories as conversation memories.
- **Language support:** Memory extraction is language-agnostic. The LLM processes messages in whatever language the conversation uses and produces memories in that same language. You don't need a separate translation step.
