AssetManager.UniApp/plugins/memory-lancedb-pro/examples/new-session-distill
2026-03-12 10:06:57 +00:00
..
hook/enqueue-lesson-extract feat: 完成 P1 任务 - 今日盈亏、风险平价补全、Mock 数据 PreviousClose 2026-03-12 10:06:57 +00:00
worker feat: 完成 P1 任务 - 今日盈亏、风险平价补全、Mock 数据 PreviousClose 2026-03-12 10:06:57 +00:00
README.md feat: 完成 P1 任务 - 今日盈亏、风险平价补全、Mock 数据 PreviousClose 2026-03-12 10:06:57 +00:00

New Session Distillation (Recommended)

This example shows a non-blocking /new distillation pipeline:

  • Trigger: command:new (when you type /new)
  • Hook: enqueue a small JSON task file (fast, no LLM calls)
  • Worker: a user-level systemd service watches the inbox and runs Gemini Map-Reduce over the session JSONL transcript
  • Storage: write high-signal, atomic lessons into LanceDB Pro via openclaw memory-pro import
  • Notify: send a notification message (optional)

Files included:

  • hook/enqueue-lesson-extract/ — OpenClaw workspace hook
  • worker/lesson-extract-worker.mjs — Map-Reduce extractor + importer + notifier
  • worker/systemd/lesson-extract-worker.service — user systemd unit

You must provide:

  • GEMINI_API_KEY in an env file loaded by systemd

Install steps are documented in the main repo README.