Write, view, and search memories in 3 steps
Use the default memory to write, view, and search memories in 3 steps. To customize memory rules, see Create memory.
Call
On the Memory page, open the default memory's Memory details tab. Enter memory entity ID
In the console, switch to the Memory search tab. Enter entity ID
Prerequisites
DASHSCOPE_API_KEYconfigured. See Get API key- Workspace ID obtained. Replace
{workspaceId}in the request URLs below with this ID. The API key must belong to the same workspace - For Python SDK:
pip install agentscope-runtime, then set the service address:export MEMORY_SERVICE_ENDPOINT="https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory"
Step 1: Write memory
Call AddMemory to pass a conversation to the memory. The system auto-extracts factual memories.
Step 2: View memory
On the Memory page, open the default memory's Memory details tab. Enter memory entity ID user_001 and click View to see auto-extracted factual memories.
Or list memories via API:
Step 3: Search memory
In the console, switch to the Memory search tab. Enter entity ID user_001, type "What do I need to do?" in the input, and click Run.
Or search via API:
You've completed writing, viewing, and searching memories. Inject the results into your prompt for personalized responses.