Native OpenClaw plugin for forensic raw session retrieval from OpenClaw transcripts.
Version: 1.0.0
This plugin registers a native OpenClaw tool named session_retrieval.
Supported actions:
routesearchlist-sessionsmedia
The plugin wrapper (index.js) handles:
- tool registration
- selective
before_prompt_buildretrieval guidance for recall-sensitive turns - parameter validation
- path resolution
- agent resolution
- Python subprocess execution
- structured result shaping
The Python scripts in scripts/ handle the forensic backend work.
session-retrieval/
├── index.js
├── install.sh
├── openclaw.plugin.json
├── package.json
├── SKILL.md
├── LICENSE
├── README.md
└── scripts/
├── _session_utils.py
├── media_scan.py
├── route.py
└── session_search.py
- OpenClaw with plugin support
- Python 3 available as
python3, or configure another binary in plugin config
Set the AGENT_USER to your agent username on the system
AGENT_USER=openclaw
curl -fsSL https://raw.githubusercontent.com/catx0rr/session-retrieval/main/install.sh | bashThis downloads the repo, places it at:
/home/${AGENT_USER}/.openclaw/extensions/session-retrieval
Then runs the plugin installer automatically.
You can inspect it afterward with:
openclaw plugins inspect session-retrievalAGENT_USER=openclaw
git clone https://github.com/catx0rr/session-retrieval.git /home/${AGENT_USER}/.openclaw/extensions/session-retrieval
cd /home/${AGENT_USER}/.openclaw/extensions/session-retrieval
openclaw plugins install .Copy the folder into the OpenClaw extensions directory, then reload or restart the gateway.
Example target:
~/.openclaw/extensions/session-retrieval
After that, reload the gateway and inspect the plugin:
openclaw plugins inspect session-retrievalsession_retrieval(action="search", keyword="reflex-guard")
session_retrieval(action="route", context="group", groupId="1203...@g.us")
session_retrieval(action="list-sessions", channel="whatsapp", dateFrom="2026-04-01")
session_retrieval(action="media", keyword="agentchronicles", fileType="pdf")
Compared with a skill-only workflow, a native plugin is better for execution because:
- the runtime can call the tool directly
- parameters are schema-validated
- execution is deterministic
- path handling is portable
- results come back in a structured shape
- the model does not need to reconstruct script usage from memory
SKILL.mdmay still be useful as documentation or retrieval doctrine, but it is not required for the plugin to load or register the tool.- The plugin also ships a selective
before_prompt_buildhook that nudges the model toward lighter retrieval first, and toward forensic/session retrieval only when exact evidence is needed. - That guidance is plugin-configurable via
enablePromptGuidance: true|falseand defaults totrue. - If a deployment wants the tool without prompt injection, OpenClaw can disable plugin prompt mutation with
plugins.entries.<id>.hooks.allowPromptInjection: false. openclaw.plugin.jsonandpackage.jsonare the files that make this a native OpenClaw plugin.