Search through past OpenClaw session transcripts (JSONL files in ~/.openclaw/agents/*/sessions/).
# Search for conversations about a topic
python3 scripts/search_sessions.py "gclid pipeline error"
# List recent sessions
python3 scripts/search_sessions.py --list --days 3
# Search specific agent's history
python3 scripts/search_sessions.py "flight monitor" --agent main
# Wider time range
python3 scripts/search_sessions.py "quantum encryption" --days 30 --max-results 5
search_sessions.py with the user's query terms to find relevant sessionssessions_history tool with the sessionKey to pull full context from a matchsessions_history doesn't work (old/closed sessions), read the JSONL file directly with readmemory_search first — it indexes session transcripts toomemory_search for semantic matching, search_sessions.py for keyword/exact matching~/.openclaw/agents/{agent_id}/sessions/{session_uuid}.jsonl共 1 个版本