Memory Store overview
AgentLoop Memory Store (MemoryStore) stores facts, preferences, and business context that AI agents can reuse across sessions. You can write conversations through the API, or continuously obtain inputs from agent traces or a Dataset. Memory Store extracts long-term memories based on strategies, and the application retrieves relevant information when it handles a new question. For example, a user first tells a lifestyle assistant, "I like light, mildly spicy dishes," and later says, "I am cutting down on sugar recently." Memory Store can keep maintaining these preferences. Before the application recommends a dinner, it retrieves the relevant memories of the user and provides the results to the agent together with the current question.
What problems Memory Store solves
|
Scenario |
Memories that can be stored |
How they are used |
|
Personal assistant |
Interests, habits, communication style, and long-term preferences |
Retrieve relevant context after a new session starts to reduce repeated questions |
|
Customer service |
Product usage background, service requests, and communication preferences that users provide |
Supplement user context for the current issue |
|
Enterprise business assistant |
Status and relationships of customers, projects, or business objects |
Update existing information based on later interactions for reference in the next task |
|
Historical data utilization |
Reusable facts in collected traces and curated datasets |
Filter inputs and extract memories continuously without calling the write API for each record |
Memories accumulate as business interactions continue. During retrieval, relevant information is selected based on the business scope, such as the user, application, or agent. For events that must be traceable, you can store them in append mode. For preferences and business status that change over time, you can maintain them in merge update mode.
Key concepts
|
Concept |
Description |
|
Memory Store |
A resource that is created and managed in an agent space. It contains a data source, an extraction strategy, a storage strategy, and long-term memories. |
|
Data source |
The input source for memory extraction, including manual write, agent traces, and Dataset. |
|
Long-term memory |
Content that is extracted from inputs or written directly for later retrieval, such as "The user prefers light food." |
|
Extraction strategy |
Determines which facts to focus on, how to categorize them, and which content to exclude. |
|
Storage strategy |
Determines whether to append new memories, or to add, update, merge, or delete memories based on existing ones. |
|
Business scope (scope) |
Associates memories by using the user ID, agent ID, app ID, and run ID. During retrieval, all the specified conditions jointly limit the scope. |
|
Strategy version |
A version record that is generated when strategy configurations such as extraction and storage are saved. It is used to trace configuration changes. |
|
Recall |
Retrieves relevant memories based on the current question and business scope, and returns them to the application. |
Select a data source
|
Data source |
Applicable scenario |
What to prepare |
|
Manual write |
The application can actively submit messages after a conversation ends. |
The write API, a Memory Store API key, and stable business user identifiers |
|
Agent trace |
Agent runtime data is already ingested into AgentLoop, and you want to reuse the assembled traces. |
Agent traces in the current agent space, and filter conditions such as the service name and agent name |
|
Dataset |
Business information has been organized into structured inputs through data processing. |
A dataset in the same agent space that meets the field requirements of |
Select one data source for a Memory Store when you create it. The data source type cannot be changed after the Memory Store is created. For a Memory Store that uses a Dataset source, the bound dataset cannot be replaced either. To use a different source, create a new Memory Store.
From input to application use
-
Receive inputs: The application submits conversations, or Memory Store obtains records from the configured traces or Dataset.
-
Extract facts: The information to keep is extracted based on fact extraction, consumer user profile, enterprise digital twin, or a custom instruction.
-
Maintain long-term memories: The results are stored based on the event append or merge update strategy, and information such as revisions, sources, and strategies is retained.
-
Retrieve relevant memories: The application or the console retrieves memories by using the current question and the business scope.
-
Assemble the agent context: The application provides useful memories to the agent together with the current question and recent conversations.
-
Inspect and adjust: Check the results by using sample preview, memory editing, audit details, and statistics, and then adjust the strategies.
After inputs are received, extraction and writes to long-term memory are processed asynchronously. The application must separately confirm that the inputs are received, that the long-term memories are retrievable, and that the returned content is added to the agent request. Sample preview is used to check the effect of strategies and does not write formal memories.
Console features
|
Entry |
What you can do |
|
Create Memory Store |
Configure a new Memory Store in the order of "Data source → Filter / Schema → Strategy → Preview and confirm" |
|
Overview |
View the basic information, data source, consumption progress, and latest error. Pause or resume consumption for trace or Dataset sources. |
|
Long-term Memory Retrieval |
Retrieve memories by question and business scope, view memory content, revisions, and sources, and edit or delete memories |
|
Strategy |
Configure extraction and storage rules, scopes, and audit options, run sample previews, and view the strategy version history |
|
Write Events |
View input events for a Memory Store that has write event logs |
|
Audit Details |
View events related to extraction, storage, and recall, and trace what a recall returned |
|
Statistics |
View metrics such as the recall count, non-empty recall rate, latency, extraction funnel, and zero-result queries |
|
API Key and Integration |
Create access credentials, and obtain HTTP API and Python SDK integration examples for the current region |
Usage considerations
-
Keep identifiers consistent: Use the same business identifiers for writes and retrieval. If you add multiple ID conditions, memories must meet all of these conditions. For cross-session queries, do not mistakenly use a run ID that belongs to only one run.
-
Choose how facts are kept: Event append is suitable for keeping the history of a process, and merge update is suitable for maintaining information that changes. Before you modify a strategy, use representative samples to check the extraction results and the actions to be performed.
-
Protect manual revisions: After you enable manual edit protection, automatic extraction keeps the original content when it encounters manually revised content, and records the change as pending review.
-
Evaluate the actual effect: Retrieval scores, the non-empty recall rate, and the number of returned results reflect retrieval behavior. The application must also determine whether the returned information is useful and whether the agent uses it correctly.
Get started
For first-time integration, read Use a memory store. To adjust the extraction scope, storage method, or retention period, see Configure memory extraction and storage strategies. To trace results and troubleshoot issues, see View memory audits and statistics.