/install langfuse-continuous-optimizer
Langfuse Continuous Optimizer
Overview
Run an automated observe -> evaluate -> adapt loop backed by LangFuse data.
This skill is independent and self-contained: it includes both policy builder and continuous optimizer scripts.
Quick Start
# Single optimization cycle (LangFuse API -> staged policy -> promoted live policy if gate passes)
python scripts/langfuse_openclaw_optimizer.py run-once \
--langfuse-host https://us.cloud.langfuse.com \
--window-hours 24 \
--out-dir ~/.openclaw/optimizer \
--live-policy-path ~/.openclaw/llm_routing_policy.json \
--promote-live-policy \
--write-memory \
--save-config
# Continuous daemon
python scripts/langfuse_openclaw_optimizer.py daemon \
--interval-min 30 \
--save-config
# Toggle settings later (persisted)
python scripts/langfuse_openclaw_optimizer.py configure --disable-promote-live-policy --show
python scripts/langfuse_openclaw_optimizer.py configure --promote-live-policy --write-memory --show
Credentials:
LANGFUSE_PUBLIC_KEYLANGFUSE_SECRET_KEY
Workflow
- Pull LangFuse observations and scores from the configured time window.
- Normalize telemetry and build staged routing policy artifacts.
- Compare staged policy against current live policy with switch guardrails.
- Promote only when gain and quality constraints are met and promotion is explicitly enabled.
- Persist cycle memory to reduce policy churn and enable rollback reasoning.
Safety
- Network egress: calls LangFuse Public API.
- Local writes: writes raw snapshots, staged artifacts, and optional memory state under
--out-dir. - Live policy overwrite is opt-in via
--promote-live-policy. - Without
--promote-live-policy, cycles are non-destructive (stage/evaluate only). - Save persisted defaults with
--save-config; edit/toggle withconfigure.
Runtime Integration
Use the generated live policy in OpenClaw/LLM runtime via:
--llm-routing-policy-file ~/.openclaw/llm_routing_policy.json
--llm-policy-reload-sec 300
Tag requests with stable task keys (planning, tool-selection, retrieval, summarization, generation, etc.) so per-task routing converges quickly.
Resources (optional)
scripts/
scripts/langfuse_openclaw_optimizer.py: API pull + cycle orchestration + promotion gating + persistent memory.scripts/closed_loop_prompt_ops.py: normalization and policy generation engine used by the optimizer.
references/
references/data-contracts.md: input/output schemas and artifacts.references/closed-loop-playbook.md: guardrails, mutation policy, memory strategy, runtime integration notes.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install langfuse-continuous-optimizer - 安装完成后,直接呼叫该 Skill 的名称或使用
/langfuse-continuous-optimizer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Clawfuse 是什么?
Continuous LangFuse-driven optimization loop for OpenClaw/OpenRouter model routing and prompt usage controls with persistent local memory. Use when Codex nee... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 316 次。
如何安装 Clawfuse?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install langfuse-continuous-optimizer」即可一键安装,无需额外配置。
Clawfuse 是免费的吗?
是的,Clawfuse 完全免费(开源免费),可自由下载、安装和使用。
Clawfuse 支持哪些平台?
Clawfuse 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Clawfuse?
由 Frederick(@ekalb81)开发并维护,当前版本 v0.0.2。