← 返回
未分类 Key 中文

SQL Dreamer

Feeds OpenClaw dreamer with high-importance memories from SQL, archives dream outputs back to SQL, and prunes old dream files automatically.
从SQL把高重要性记忆喂给OpenClaw dreamer,梦境输出归档回SQL,并自动清理旧梦境文件。
oblio-falootin oblio-falootin 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 299
下载
💾 0
安装
1
版本
#latest

概述

openclaw-sql-dreamer — SKILL.md

> OpenClaw skill: SQL-backed memory corpus feeder and dream output archiver.

What This Skill Does

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:

  1. Pre-dream feed — queries SQL for high-importance memories, writes a clean daily file
  2. Post-dream archiver — stores dream outputs (light/REM/deep) to SQL tables durably
  3. File cleanup — prunes dream output files older than N days

The OpenClaw dreamer runs unchanged. This skill wraps around it.

Installation

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

Configuration Reference

All settings live in config/config.yml (never committed — see .gitignore).

FieldTypeDefaultDescription
------------
sql.serverstringSQL Server hostname
sql.databasestringDatabase name
sql.usernamestringSQL username
sql.passwordstringVia env SQL_PASSWORD
corpus.importance_thresholdint7Min importance (1-10) for dream corpus
corpus.lookback_daysint2Days back to pull memories
dreaming.workspace_dirstringOpenClaw workspace root
dreaming.archive_after_daysint7Days before dream files are pruned
confluence.enabledboolfalseEnable Confluence publishing

Scripts

ScriptWhenWhat
---------
scripts/pre_dream_sql_feed.py3:00 AM (before dream)Queries SQL, writes clean memory file
scripts/post_dream_archiver.py4:00 AM (after dream)Archives dream outputs to SQL, prunes old files
scripts/confluence_dream_publisher.py4:30 AM (optional)Pushes wiki syntheses to Confluence

SQL Tables Created

Run python sql/migrate.py to create:

  • dreams.DreamCorpus — memories queued for each cycle
  • dreams.DreamLight — light sleep candidates
  • dreams.DreamREM — REM themes and reflections
  • dreams.DreamDeep — deep sleep promotions

Crontab Example

# 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

Security

This is a public repo. Never commit:

  • .env files
  • config/config.yml
  • Passwords, tokens, API keys

Use environment variables for all secrets:

export SQL_PASSWORD="..."
export CONFLUENCE_API_TOKEN="..."

Updated Crontab (after HFTC-28)

# 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

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-08 02:26 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

SQL Connector

oblio-falootin
OpenClaw代理的通用SQL Server连接能力。适用场景:(1)针对SQL Server执行参数化查询;(2)构建仓储层等。
★ 0 📥 995
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 875 📥 351,474
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,176 📥 947,161