Install
openclaw skills install insight-engineLogs/metrics → Python statistics → LLM interpretation → Notion reports. Use when: generating daily/weekly/monthly operational insights from AI system logs, producing data-driven Notion reports from Langfuse traces and gateway logs, setting up a cron-based insight pipeline, building a citation-enforcing analyst that refuses to make claims without specific data. Pattern: collect raw data → compute stats in Python → feed structured packet to LLM → write to Notion.
openclaw skills install insight-engineLast used: 2026-03-24 Memory references: 18 Status: Active
Data-driven insights from operational logs: collect → stats → LLM interpretation → Notion.
collect (Python stats only)
├── Langfuse OTEL traces/scores/observations
├── OpenClaw/gateway logs
├── Git activity
└── Control plane scores
↓
build_*_data_packet() ← all stats computed in Python before LLM call
↓
call_claude(system_prompt, structured_json) ← LLM interprets, doesn't compute
↓
write_*_reflection() → Notion
See references/architecture.md for full design rationale.
# Install deps
pip install anthropic requests pyyaml
# Configure
cp scripts/config/analyst.yaml.example config/analyst.yaml
# Edit config/analyst.yaml — set langfuse URL, notion IDs, model choices
# Dry run (local Ollama, no Notion write)
python3 scripts/src/engine.py --mode daily --dry-run
# Print data packet + prompt to stdout (for agent consumption, no API calls)
python3 scripts/src/engine.py --mode daily --data-only
# Live run
python3 scripts/src/engine.py --mode daily
python3 scripts/src/engine.py --mode weekly
python3 scripts/src/engine.py --mode monthly
ANTHROPIC_API_KEY=sk-ant-... # Anthropic API key
NOTION_API_KEY=secret_... # Notion integration token
LANGFUSE_BASE_URL=http://localhost:3100 # Langfuse server URL
LANGFUSE_PUBLIC_KEY=pk-lf-... # Langfuse public key
LANGFUSE_SECRET_KEY=sk-lf-... # Langfuse secret key
NOTION_ROOT_PAGE_ID=<uuid> # Root Notion page for reports
NOTION_DAILY_DB_ID=<uuid> # Notion database for daily entries
Or configure in config/analyst.yaml.
< 7 data points → report "insufficient data (n=X)"<!-- ~/Library/LaunchAgents/com.yourname.insight-engine-daily.plist -->
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key><integer>23</integer>
<key>Minute</key><integer>0</integer>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python3</string>
<string>/path/to/insight-engine/scripts/src/engine.py</string>
<string>--mode</string><string>daily</string>
</array>
Add a collector in scripts/src/collectors/:
my_source.py with a fetch_*() function returning a plain dictbuild_daily_data_packet() in engine.pyprompts/daily_analyst.md under "Data sources"references/architecture.md — full design rationale and layer descriptionsscripts/prompts/daily_analyst.md — system prompt with citation rulesscripts/config/analyst.yaml.example — config template