Give your OpenClaw agent persistent, cross-agent memory powered by Google's Vertex AI Memory Bank.
After setup, your agent will:
Before running the setup script, ensure:
gcloud auth application-default login)If the user doesn't have these, help them set up each one.
Run the setup script:
bash
bash scripts/setup.sh
This script will:
If the script doesn't work for your environment, follow these steps:
bash
# Set your project
gcloud config set project YOUR_PROJECT_ID
# Create a reasoning engine for Memory Bank
curl -X POST \
"https://REGION-aiplatform.googleapis.com/v1beta1/projects/YOUR_PROJECT_ID/locations/REGION/reasoningEngines" \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d '{"display_name": "openclaw-memory-bank"}'
Note the reasoning engine ID from the response.
bash
cd /path/to/openclaw-vertex-memorybank
npm install
npm run build
Add to your openclaw.json under plugins:
json
{
"plugins": {
"openclaw-vertex-memorybank": {
"enabled": true,
"path": "/path/to/openclaw-vertex-memorybank",
"config": {
"projectId": "YOUR_PROJECT_ID",
"location": "us-central1",
"reasoningEngineId": "YOUR_REASONING_ENGINE_ID"
}
}
}
}
bash
openclaw gateway restart
OptionDefaultDescriptionprojectIdrequiredGCP project ID or numberlocationrequiredGCP region (e.g. us-central1)reasoningEngineIdrequiredAgent Engine reasoning engine IDautoRecalltrueRetrieve memories before each turnautoCapturetrueStore memories after each turnautoSyncFilestrueSync workspace .md files to Memory BankautoSyncTopicstrueAuto-configure memory topics at startuptopK10Max memories to retrieve per queryperspective"third"Memory perspective (first or third person)backgroundGeneratetrueFire-and-forget memory generationttlSecondsnoneAuto-expire memories after N seconds
After installation, check the gateway log:
bash
tail -f ~/.openclaw/logs/gateway.log | grep memory
You should see:
[memory-vertex] synced N topics on startup[memory-vertex] recall: N memories on each turn[memory-vertex] capture fired (bg) after each turnThe plugin adds these commands:
memorybank-search <query> - Search your memoriesmemorybank-remember <fact> - Store a specific factmemorybank-forget <memory_id> - Delete a memorymemorybank-sync - Force sync workspace filesmemorybank-status - Check plugin statusmemorybank-list - List all stored memoriesgcloud auth application-default logintopK and maxDistance settings. Try memorybank-search to verify memories existtopK or set introspection: "off" to remove similarity scoresFull source code and documentation: https://github.com/Shubhamsaboo/openclaw-vertexai-memorybank