Agentic Memory Extension for Claude Code, Claude Cowork, Cursor, Codex & QoderWork
Add persistent memory to your AI workflows. Store, retrieve, and manage memories across sessions using the Agentic Memory Platform. Works with Claude Code (CLI), Claude Cowork (desktop app), Cursor, QoderWork, and Codex.
Step 1: Set your API key
You must complete this step before installing the plugin.
-
Sign up at https://opensearch.console.aliyun.com/cn-shanghai/rag/server-market if you haven't already
-
Go to api-keys
-
Click Create API Key, copy the key (starts with OS-) and baseurl (http://xxx.platform-cn-shanghai.opensearch.aliyuncs.com)
-
Add it to your shell profile:
# For zsh (default on macOS)
echo 'export AGENTIC_MEMORY_API_KEY="OS-your-api-key"' >> ~/.zshrc
echo 'export AGENTIC_MEMORY_BASE_URL="http://xxx.platform-cn-shanghai.opensearch.aliyuncs.com"' >> ~/.zshrc
source ~/.zshrc
# For bash
echo 'export AGENTIC_MEMORY_API_KEY="OS-your-api-key"' >> ~/.bashrc
echo 'export AGENTIC_MEMORY_BASE_URL="http://xxx.platform-cn-shanghai.opensearch.aliyuncs.com"' >> ~/.bashrc
source ~/.bashrc
-
Confirm it's set:
echo $AGENTIC_MEMORY_API_KEY
echo $AGENTIC_MEMORY_BASE_URL
Step 2: Install the plugin
Choose one of the options below. All require AGENTIC_MEMORY_API_KEY to be set first (see above).
Claude Code (CLI) / Claude Cowork (Desktop)
Claude Code and Claude Cowork share the same plugin system.
CLI:
claude plugin marketplace add aliyun/alibabacloud-opensearch-memory
claude plugin install agentic-memory@agentic-memory-plugins
Cowork desktop app: Open the Cowork tab, click Customize in the sidebar, click Browse plugins, and install Agentic Memory.
This installs the full plugin including the MCP server, lifecycle hooks (automatic memory capture).
QoderWork
- Git clone this repo and zip the directory:
git clone https://github.com/aliyun/alibabacloud-opensearch-memory.git && zip -r alibabacloud-opensearch-memory.zip alibabacloud-opensearch-memory
- Then, in QoderWork, import
alibabacloud-opensearch-memory.zip via Expert Kits -> Install Kit in the top-right corner
- Since QoderWork doesn't support env vars in
url, you should manually replace ${AGENTIC_MEMORY_BASE_URL} and ${AGENTIC_MEMORY_API_KEY} in ~/.qoderwork/plugins-custom/agentic-memory/.mcp.json with real values.
- Since QoderWork doesn't support hooks subdirs, you should manually add settings from
~/.qoderwork/plugins-custom/agentic-memory/hooks/hooks.json to ~/.qoderwork/settings.json. Remember to replace ${CLAUDE_PLUGIN_ROOT} with real prefix ~/.qoderwork/plugins-custom/agentic-memory.
- Add execute permissions to all scripts:
chmod +x ~/.qoderwork/plugins-custom/agentic-memory/scripts/*
- Finally, restart QoderWork.
Codex
Option A — Direct MCP (fastest, MCP only):
Codex reads MCP servers from ~/.codex/config.toml as TOML. Add:
[mcp_servers.agentic-memory]
url = "${AGENTIC_MEMORY_BASE_URL}/v1/agentic-memory/mcp"
bearer_token_env_var = "AGENTIC_MEMORY_API_KEY"
Export AGENTIC_MEMORY_API_KEY and AGENTIC_MEMORY_BASE_URL in your shell and restart Codex. If your Codex version doesn't interpolate env vars inside url, replace ${AGENTIC_MEMORY_BASE_URL} with the literal base URL from Step 1. codex mcp add only supports stdio servers, so HTTP servers like Agentic Memory's must be added via config.toml directly (or via the Plugins → Connect to a custom MCP → Streamable HTTP UI in the Codex app).
Option B — Sideload the plugin (full experience: MCP + skills + opt-in hooks):
Clone the repo and register the bundled marketplace with one CLI call:
codex plugin marketplace add https://github.com/aliyun/alibabacloud-opensearch-memory.git
Restart Codex, run /plugins, and install Agentic Memory from the Agentic Memory Plugins marketplace.
Don't combine with Option A. The plugin manifest auto-registers agentic-memory as an MCP server via agentic-memory-plugin/.codex-mcp.json — adding a manual [mcp_servers.agentic-memory] block would duplicate the registration.
Optional — enable lifecycle hooks. Codex doesn't auto-wire hooks from plugin manifests; it only reads ~/.codex/hooks.json (or <repo>/.codex/hooks.json) (docs). Run the bundled installer once to merge Agentic Memory's entries:
python3 ~/codex-plugins/agentic-memory-source/agentic-memory-plugin/scripts/install_codex_hooks.py
This merges three entries into ~/.codex/hooks.json with absolute paths pointing into your clone:
| Event | What it does |
|---|
SessionStart | Loads prior memories as bootstrap context |
UserPromptSubmit | Injects relevant memories into the prompt |
Stop | Reminds the agent to persist learnings at turn end |