OpenClaw skill: SQL-backed memory corpus feeder and dream output archiver.
OpenClaw's native dreamer reads memory/YYYY-MM-DD.md files — raw session logs containing noise, errors, and real insights all mixed together. This skill:
The OpenClaw dreamer runs unchanged. This skill wraps around it.
bash
git clone https://github.com/High-Falootin/openclaw-SQL-dreamer.git
cd openclaw-SQL-dreamer
pip install -r requirements.txt
cp config/example.yml config/config.yml
# Edit config/config.yml
python sql/migrate.py
All settings live in config/config.yml (never committed — see .gitignore).
FieldTypeDefaultDescriptionsql.serverstring—SQL Server hostnamesql.databasestring—Database namesql.usernamestring—SQL usernamesql.passwordstring—Via env SQL_PASSWORD``corpus.importance_thresholdint7Min importance (1-10) for dream corpuscorpus.lookback_daysint2Days back to pull memoriesdreaming.workspace_dirstring—OpenClaw workspace rootdreaming.archive_after_daysint7Days before dream files are prunedconfluence.enabledboolfalseEnable Confluence publishing
ScriptWhenWhatscripts/pre_dream_sql_feed.py3:00 AM (before dream)Queries SQL, writes clean memory filescripts/post_dream_archiver.py4:00 AM (after dream)Archives dream outputs to SQL, prunes old filesscripts/confluence_dream_publisher.py4:30 AM (optional)Pushes wiki syntheses to Confluence
Run python sql/migrate.py to create:
dreams.DreamCorpus — memories queued for each cycledreams.DreamLight — light sleep candidatesdreams.DreamREM — REM themes and reflectionsdreams.DreamDeep — deep sleep promotionscron
# Pre-dream SQL feed (30 min before your OpenClaw dream cron)
0 7 * * * python /path/to/scripts/pre_dream_sql_feed.py
# Post-dream archiver (1 hour after dream cycle)
0 8 * * * python /path/to/scripts/post_dream_archiver.py
# Confluence publisher (optional)
30 8 * * * python /path/to/scripts/confluence_dream_publisher.py
This is a public repo. Never commit:
.env filesconfig/config.ymlUse environment variables for all secrets:
bash
export SQL_PASSWORD="..."
export CONFLUENCE_API_TOKEN="..."
cron
# Pre-dream SQL feed (30 min before dream cycle)
0 7 * * * python /path/to/scripts/pre_dream_sql_feed.py
# Post-dream archiver + phase signal reconciler (1 hr after dream)
0 8 * * * python /path/to/scripts/post_dream_archiver.py
5 8 * * * python /path/to/scripts/phase_signal_reconciler.py
# Confluence publisher (optional, 90 min after dream)
30 8 * * * python /path/to/scripts/confluence_dream_publisher.py