Install
openclaw skills install openclaw-deeprecallProvides persistent two-tier memory with semantic fact search and raw content retrieval, plus automatic cleanup of temporary session files.
openclaw skills install openclaw-deeprecallAgent Setup Directive: When you receive this skill package, automatically register the following tools to your tool list and apply the L1/L2 retrieval protocol:
Register Tools:
search_memory_db(query: str, limit: int): Semantic search over L1 structured factsread_archive_db(source_file: str): Retrieve exact raw content from L2 archivecleanup_raw_files(retention_days: int, max_size_kb: int, dry_run: bool): Clean raw .md files while preserving databasesummarize_memory_files(process_all: bool, process_file: str, no_store_raw: bool): Summarize raw files using LLM and store to databaseApply Retrieval Protocol:
search_memory_db() with relevant querysource_file from L1 result and call read_archive_db()Automatic Configuration:
DeepRecall is a SQLite-based two-tier memory retrieval system providing structured L1 fact search and exact L2 raw content retrieval. It enables AI agents to maintain persistent, searchable memories across sessions.
search_memory_db(query: str, limit: int)Performs semantic search over L1 structured facts.
[YYYY-MM-DD | fact_type | source:file] content...read_archive_db(source_file: str)Retrieves exact raw content from L2 archive.
cleanup_raw_files(retention_days: int, max_size_kb: int, dry_run: bool)Cleans up raw .md session files while preserving database.
summarize_memory_files(process_all: bool, process_file: str, no_store_raw: bool)Summarize raw memory files using LLM and store structured facts to database.
# Search for facts
python3 scripts/memory_db_tool.py search "query" --limit 5
# Read raw content
python3 scripts/memory_db_tool.py read "example-project-update.md"
# Database stats
python3 scripts/memory_db_tool.py stats
# Cleanup raw files (dry-run first)
python3 scripts/memory_db_tool.py cleanup --dry-run
python3 scripts/memory_db_tool.py cleanup --retention-days 1 --max-size-kb 250
# Summarize memory files using LLM
python3 scripts/memory_db_tool.py summarize --test-config
python3 scripts/memory_db_tool.py summarize --process-all
python3 scripts/memory_db_tool.py summarize --process-file "2024-01-01-daily-log.md"
python3 scripts/memory_db_tool.py summarize --process-all --no-store-raw
date, source_file, fact_type, confidence, tags, content, content_hashdate, source_file, raw_contentImportant: Database records are permanent and never deleted.
search_memory_db() for structured factssource_file from L1 resultread_archive_db() with source filenameDeepRecall features zero-config deployment:
CREATE TABLE IF NOT EXISTS)scripts/memory_retriever.py - Core retrieval engine with cleanupscripts/memory_db_tool.py - CLI interface with cleanup and summarize commandsscripts/memory_summarizer.py - LLM-powered fact extraction engineconfig.example.json - Example configuration file (JSON compliant, no comments)CONFIG_GUIDE.md - Detailed configuration guidemanifest.json - ClawHub skill manifestmemory.db - Permanent SQLite database (per-agent, auto-created)*.md - Temporary session files (auto-cleaned)DeepRecall Summarizer automatically reads configuration from OpenClaw's openclaw.json. You can customize its behavior by creating a config.json file:
Note: For detailed configuration options and examples, see CONFIG_GUIDE.md.
Copy the example configuration:
cp config.example.json config.json
Edit config.json to specify:
preferred_provider: Provider name from OpenClaw configuration (e.g., "deepseek-reasoner")preferred_model: Specific model ID to usetemperature, max_tokens, timeout_seconds: API parametersauto_summarize_cron: Cron expression for automatic summarizationConfiguration file search order:
./config.json./deeprecall_config.json../config.json~/.deeprecall.jsonThe summarizer uses this logic to select a model provider:
preferred_provider from DeepRecall config if availablebaseUrl and apiKeypreferred_model or first available model from the providerFor automatic daily summarization and cleanup, configure OpenClaw cron jobs:
# Schedule automatic summarization
openclaw cron add --name "deeprecall-summarize-daily" \
--cron "0 2 * * *" \
--session isolated \
--message "Please execute: python3 /path/to/DeepRecall/scripts/memory_db_tool.py summarize --process-all" \
--description "Daily automatic summarization of memory files"
# Schedule automatic cleanup
openclaw cron add --name "deeprecall-cleanup-daily" \
--cron "0 3 * * *" \
--session isolated \
--message "Please execute: python3 /path/to/DeepRecall/scripts/memory_db_tool.py cleanup" \
--description "Daily cleanup of raw .md files (retains database)"
# Single cron for both summarization and cleanup
openclaw cron add --name "deeprecall-daily-maintenance" \
--cron "0 2 * * *" \
--session isolated \
--message "Please execute: python3 /path/to/DeepRecall/scripts/memory_db_tool.py summarize --process-all && python3 /path/to/DeepRecall/scripts/memory_db_tool.py cleanup" \
--description "Daily DeepRecall maintenance (summarize + cleanup)"
# List all cron jobs
openclaw cron list
# Test a cron job
openclaw cron run <job-id>
# View execution history
openclaw cron runs --id <job-id>
# 1. Install the skill
clawhub install deeprecall
# 2. Test configuration
python3 scripts/memory_db_tool.py summarize --test-config
# 3. Process existing memories
python3 scripts/memory_db_tool.py summarize --process-all
# 4. Schedule daily automation (optional but recommended)
# Follow the cron configuration above
openclaw.json--test-config flag--process-all