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
In the Bailian console, 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
- First-time use requires activating Memory: open the Memory page in the Bailian console and click Activate Now
DASHSCOPE_API_KEYconfigured. See Get API key- For Python SDK:
pip install agentscope-runtime
Step 1: Write memory
Call AddMemory to pass a conversation to the memory. The system auto-extracts factual memories.
Step 2: View memory
In the Bailian console, 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.