Skip to content

Alchemyst-ai/openclaw-plugin

Repository files navigation

OpenClaw Alchemyst Integration

Perfect memory and context recall for OpenClaw agents.

Features

  • Auto-Recall: Automatically inject relevant context before AI turns
  • Auto-Capture: Store conversations automatically after AI responses
  • AI Tools: 5 tools for manual memory management
  • Slash Commands: /remember and /recall for users
  • CLI Commands: Search and manage memories from terminal

Installation

Step 1: Add your API keys

Add your keys to ~/.openclaw/.env (OpenClaw loads this file automatically):

nano ~/.openclaw/.env
# Required - Alchemyst AI API key
ALCHEMYST_API_KEY=your_alchemyst_api_key_here

# Add whichever model provider you use with OpenClaw
OPENAI_API_KEY=your_openai_api_key_here
# GOOGLE_GENERATIVE_AI_API_KEY=your_google_api_key_here
# ANTHROPIC_API_KEY=your_anthropic_api_key_here

Get your Alchemyst API key at app.alchemyst.ai → API Keys. Only ALCHEMYST_API_KEY is required by the plugin. Add whichever model provider key matches your OpenClaw setup.

Step 2: Install the plugin

Copy the plugin into OpenClaw's extensions folder:

cp -r /path/to/openclaw-alchemyst ~/.openclaw/extensions/alchemyst-memory

Replace /path/to/openclaw-alchemyst with where you downloaded the plugin. For example:

# Cloned to Desktop:
cp -r ~/Desktop/openclaw-alchemyst ~/.openclaw/extensions/alchemyst-memory

# Downloaded to Downloads:
cp -r ~/Downloads/openclaw-alchemyst ~/.openclaw/extensions/alchemyst-memory

The destination folder must be named alchemyst-memory for OpenClaw to detect it correctly.

Step 3: Enable the plugin in ~/.openclaw/openclaw.json

Add the following under the plugins section. Do not add a config block — OpenClaw's schema will reject it:

{
  "plugins": {
    "slots": {
      "memory": "alchemyst-memory"
    },
    "entries": {
      "alchemyst-memory": {
        "enabled": true
      }
    }
  }
}

Step 4: Verify

openclaw plugins list

You should see alchemyst-memory with status loaded and the following log output:

[Alchemyst] Client initialized
[Alchemyst] Registered 5 tools
[Alchemyst] Registered auto-recall hook (before_agent_start)
[Alchemyst] Registered auto-capture hook (agent_end)
[Alchemyst] Registered slash commands: /remember, /recall
[Alchemyst] Registered CLI commands: search, profile, wipe
[Alchemyst] Plugin registered successfully ✓

How It Works

  • Before each AI turn: The recall hook searches Alchemyst for relevant past context and prepends it to the prompt automatically.
  • After each AI turn: The capture hook stores the user and assistant messages in Alchemyst memory under the session openclaw-default.

Note: OpenClaw's agent_end event does not expose a session ID, so all captures are grouped under openclaw-default by default.

Configuration

All configuration is optional — the defaults work out of the box.

Option Type Default Description
ALCHEMYST_API_KEY env var required Your Alchemyst AI API key
Model provider key env var required API key for your chosen model provider (OpenAI, Gemini, Anthropic, etc.)
withMemory boolean true Enable automatic memory recall
similarityThreshold number 0.7 Threshold for context retrieval
minimumSimilarityThreshold number 0.5 Fallback similarity threshold
maxMemories number 10 Max memories injected per turn
contextType string conversation Type of context: resource, conversation, or instruction
scope string internal Scope of storage: internal or external
debug boolean false Enable debug logging

Commands

Command Description
/remember <text> Manually store something in memory
/recall <query> Search your stored memories
openclaw alchemyst-search <query> CLI memory search
openclaw alchemyst-profile View memory configuration
openclaw alchemyst-wipe Delete all stored memories

Troubleshooting

Plugin shows error status

  • Make sure ALCHEMYST_API_KEY is set in ~/.openclaw/.env
  • Run openclaw gateway stop && openclaw gateway start to reload

Invalid config error in openclaw.json

  • Remove any config block from the alchemyst-memory entry — OpenClaw does not allow additional properties in the plugin config schema

Capture skipping with "No sessionId"

  • This is handled automatically — conversations are captured under openclaw-default

License

MIT © 2025 Alchemyst AI

About

OpenClaw Plugin for Alchemyst AI.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors