Skip to main content
Getting Started

Core Concepts

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

TypeDescriptionExampleUse case
FragmentsKey events and info auto-extracted from conversations"User needs hydration reminder at 9 AM daily"Dynamic event info
User profilesStructured attributes extracted from custom templatesAge 28, engineer, loves footballFixed user attributes
Both can be used together: fragments for dynamic events, profiles for fixed 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 VersionRerankQualityUse case
ProEnabledHigher, reranking model refines resultsAccuracy-critical scenarios
LiteDisabledStandard, skips rerankingHigh-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.
See Billing for details.

Key terms

TermDescription
MemoryA container for storing memories, shareable across apps
FragmentKey event or info auto-extracted from conversations
User profileStructured user attributes extracted from custom templates
Memory entityIsolation dimension, typically user_id
Memory ruleConfiguration defining how memories are extracted, stored, and retrieved
plan_versionParameter controlling the plan version: Pro or Lite
RerankReranks initial retrieval results to improve relevance
Similarity threshold0.01.0, filters low-relevance results, recommended 0.50.7
Now try the Quickstart.