Understand memory types, workflow, and key terms
What is Memory
Memory is a service that provides cross-session long-term memory for LLMs. It automatically extracts key information from conversations and persists it, then retrieves relevant memories via semantic search and injects them into context in subsequent conversations.
How it works
Memory provides open APIs that can integrate with any application, and supports multiple apps sharing the same memory.
Two memory types
| Type | Description | Example | Use case |
|---|---|---|---|
| Fragments | Key events and info auto-extracted from conversations | "User needs hydration reminder at 9 AM daily" | Dynamic event info |
| User profiles | Structured attributes extracted from custom templates | Age 28, engineer, loves football | Fixed user attributes |
Pro and Lite plan versions
Add and Search calls distinguish between Pro and Lite plan versions. The core difference is whether Rerank (result reranking) is enabled during retrieval:
| Plan Version | Rerank | Quality | Use case |
|---|---|---|---|
| Pro | Enabled | Higher, reranking model refines results | Accuracy-critical scenarios |
| Lite | Disabled | Standard, skips reranking | High-frequency, cost-sensitive scenarios |
- Add calls: plan version determined by the fragment rule's
plan_version. - Search calls: plan version controlled by the request parameter
plan_version, defaults to Pro.
Key terms
| Term | Description |
|---|---|
| Memory | A container for storing memories, shareable across apps |
| Fragment | Key event or info auto-extracted from conversations |
| User profile | Structured user attributes extracted from custom templates |
| Memory entity | Isolation dimension, typically user_id |
| Memory rule | Configuration defining how memories are extracted, stored, and retrieved |
| plan_version | Parameter controlling the plan version: Pro or Lite |
| Rerank | Reranks initial retrieval results to improve relevance |
| Similarity threshold | 0.0 |