@biginformatics/openclaw-wagl
v0.1.4
Published
wagl memory backend for OpenClaw agents. Takes the OpenClaw memory slot and auto-injects wagl recall into every session start, captures memories at session end, and exposes recall/store/search as native agent tools — no manual memory management required.
Readme
@biginformatics/openclaw-wagl
OpenClaw plugin that brings wagl DB-first memory to any agent.
- Auto-recall — injects relevant memories before each agent turn (
before_agent_starthook) - Auto-capture — saves the last assistant response after each turn (
agent_endhook) - Tools —
wagl_recallandwagl_storeavailable to the agent at runtime - Memory slot — registers as
memory-wagl, taking the OpenClaw memory slot
Install
openclaw plugins install @biginformatics/openclaw-waglThen add to openclaw.json:
{
"plugins": {
"slots": { "memory": "memory-wagl" },
"entries": {
"memory-wagl": {
"package": "@biginformatics/openclaw-wagl"
}
}
}
}Requirements
1. wagl binary
Install wagl on the agent's host and ensure it is on PATH:
# Download the latest release binary for your platform
# https://github.com/BigInformatics/wagl/releases
cp wagl /usr/local/bin/wagl
chmod +x /usr/local/bin/wagl
wagl init # creates ~/.wagl/memory.dbSet WAGL_DB to a stable path (recommended):
export WAGL_DB="$HOME/.wagl/memory.db"Without WAGL_DB, wagl defaults to a path relative to $PWD which will vary.
2. Semantic recall (optional but recommended)
Semantic search requires:
- An OpenAI-compatible embeddings endpoint (e.g. Ollama on armada)
- The sqlite-vec extension (
vec0.so)
# Point to your embeddings server
export WAGL_EMBEDDINGS_BASE_URL="http://your-ollama-host:11434"
export WAGL_EMBEDDINGS_MODEL="qwen3-embedding:0.6b"
# sqlite-vec: place vec0.so at a stable path and set SQLITE_VEC_PATH
# Download a pre-built vec0.so from the wagl releases page, or build from source:
# cd wagl-cli && git submodule update --init && ./scripts/build-sqlite-vec-linux-x86_64.sh
# cp third_party/sqlite-vec/linux-x86_64/vec0.so /usr/local/lib/
export SQLITE_VEC_PATH="/usr/local/lib/vec0.so"Without semantic recall, the plugin still works —
wagl_storepersists memories andwagl_recallruns text-only matching (lower precision). The plugin degrades gracefully; it will not crash ifSQLITE_VEC_PATHor embeddings are missing.
3. Systemd service (recommended for production)
If OpenClaw runs as a systemd user service, add a drop-in to persist env vars:
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
cat > ~/.config/systemd/user/openclaw-gateway.service.d/wagl.conf << 'UNIT'
[Service]
Environment=WAGL_DB=/home/YOUR_USER/.wagl/memory.db
Environment=SQLITE_VEC_PATH=/usr/local/lib/vec0.so
Environment=WAGL_EMBEDDINGS_BASE_URL=http://your-ollama-host:11434
Environment=WAGL_EMBEDDINGS_MODEL=qwen3-embedding:0.6b
UNIT
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.serviceConfiguration
All config is optional — defaults work for a basic setup.
{
"plugins": {
"entries": {
"memory-wagl": {
"package": "@biginformatics/openclaw-wagl",
"config": {
"dbPath": "/home/user/.wagl/memory.db",
"autoRecall": true,
"autoCapture": true,
"recallQuery": "who am I, current focus, working rules"
}
}
}
}
}| Key | Default | Description |
|---|---|---|
| dbPath | $WAGL_DB → $WAGL_DB_PATH → ~/.wagl/memory.db | Path to wagl DB |
| autoRecall | true | Inject recall context before each agent turn |
| autoCapture | true | Save last assistant message after each turn |
| recallQuery | "who am I, current focus, working rules" | Query used for auto-recall |
Known limitations
vec0.sois not yet bundled with the wagl binary — see wagl#17 for the tracking issue- Without semantic embeddings, recall uses text-only matching which has lower precision
License
Apache 2.0 — Copyright 2026 Informatics FYI, Inc.
