Map the AgentLoop Memory Store service to a local virtual file system. This lets an agent autonomously explore and manage memories using standard shell commands such as ls, cat, echo, and rm, enabling context retrieval through the Pull paradigm.
Prerequisites
An Alibaba Cloud account with the AgentLoop Memory Store service activated.
A workspace and a Memory Store created in the console.
An AccessKey ID and AccessKey Secret.
A Linux or macOS system.
Procedure
Step 1: Install the plugin
Method 1: Automated installation
Provide the contents of the INSTALL_PROMPT.md file to your agent, such as Cursor Agent or Claude Code. The agent will automatically perform the following tasks:
Install the underlying FUSE dependencies.
Download the Python package.
Configure environment variables.
Mount the file system in the background.
You can even watch the agent troubleshoot errors, check logs, and resolve dependencies until it successfully mounts the file system.
Method 2: Manual installation
If you prefer to install the plugin manually, follow these steps:
Step 1: Install FUSE dependencies
Linux (Ubuntu/Debian):
sudo apt-get install fuseLinux (CentOS/RHEL):
sudo yum install fusemacOS:
brew install macfuseOn macOS, you must allow the macFUSE kernel extension in System Settings > Privacy & Security.
Step 2: Install Python package
pip install agentloop-memory-fsStep 3: Configure environment variables
export ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secret
export CMS_ENDPOINT=cms.cn-hangzhou.aliyuncs.com
export CMS_WORKSPACE=your_workspace_name
export CMS_MEMORY_STORE=your_memory_store_nameStep 4: Mount the file system
# Create a mount point.
mkdir -p /tmp/agentloop_memory
# Start the file system. This command runs it as a background process.
agentloop-memory-fs /tmp/agentloop_memory &Step 2: Integrate with AI agent
System Prompt integration is key to implementing the Pull paradigm—enabling the agent to autonomously decide when to retrieve memories, rather than passively receiving them.
Configure System Prompt
Add the following instructions to your agent's System Prompt:
Agent | Configuration file location |
Qwen CLI |
|
Claude Code |
|
Cursor |
|
# Memory
You have persistent, cross-session memory, mounted at `/tmp/agentloop_memory/store/`.
- Search: `cat search/{query}.txt` — semantic search, where `query` is a natural language keyword.
- Write: `echo "内容" > _add.txt` — This operation is processed asynchronously.
- If you are unsure about a path, use `cat _help.txt`.Why is this enough? The agent already has shell command capabilities. You only need to tell the agent the memory's location and usage. It can then decide when and what to retrieve.
Example workflow
After configuration, the agent performs the following actions autonomously:
Identifies an information gap → The agent recognizes it needs to understand the user's background.
Proactively searches →
cat /tmp/agentloop_memory/store/search/user_tech_stack.txt.Retrieves results → FUSE returns the top-N most relevant memories.
Generates a response → The agent uses the retrieved memories to provide a precise response.
Persists new information →
echo "User decided to adopt a microservices architecture" > /tmp/agentloop_memory/store/_add.txt.
Step 3: Verify
# 1. Add a memory.
echo "我喜欢用 Vim 编辑器" > /tmp/agentloop_memory/store/_add.txt
# 2. Wait for asynchronous processing.
sleep 3
# 3. Search for the memory.
cat "/tmp/agentloop_memory/store/search/editor_preference.txt"Expected output:
[
{
"id": "019c269b-...",
"memory": "The user prefers using Vim editor.",
"score": 0.89
}
]Unmount file system
fusermount -u /tmp/agentloop_memory # Linux
umount /tmp/agentloop_memory # macOSCore operations
Intent | Shell command | API |
Browse directory structure |
| - |
View help |
| - |
Add memory |
|
|
Semantic search |
|
|
View specific memory |
|
|
Delete memory |
|
|
View all user memories |
|
|