Openclaw Langfuse banner
MCKRUZ MCKRUZ

Openclaw Langfuse

AI community

Description

OpenClaw plugin for Langfuse LLM observability — traces every agent turn with sessions, token usage, latency, and cost tracking. Zero dependencies, drop-in install.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

openclaw-langfuse

An [OpenClaw](https://github.com/openclaw/openclaw) plugin that sends agent traces to [Langfuse](https://langfuse.com) for LLM observability — works with both self-hosted and Langfuse Cloud.

**No npm packages required** — uses the Langfuse REST API directly via Node.js native `fetch`. **No image rebuild required** — drop the plugin into your workspace volume and restart.


What it gives you

For every agent turn, the plugin records a **trace** + **generation** in Langfuse:

Field Value
Trace name openclaw-turn
Session ID OpenClaw session key (e.g. agent:main:discord:dm:123456)
User ID Agent ID (e.g. main, jarvis)
Tags ["openclaw", ""] — filter Sage vs Jarvis traces
Input The user's message
Output The agent's response
Token usage Input + output tokens
Duration Turn duration in ms
Level DEFAULT on success, ERROR on failure

In the Langfuse UI this means:

  • Traces — every conversation turn as a timeline with input/output
  • Sessions — all turns from a single conversation grouped together so you can follow the full thread
  • Generations — the LLM call nested inside each trace (model, token counts, latency)
  • Analytics — token usage over time, cost estimates, latency histograms, error rates by agent

Installation

1. Create the extensions directory on your NAS

ssh user@your-nas 'mkdir -p /volume1/docker/openclaw/workspace/.openclaw/extensions'

2. Copy the plugin

**Option A — tar pipe (recommended for Synology, avoids SCP subsystem errors):**

tar -czf - langfuse-tracer/ | ssh user@your-nas \
  'cd /volume1/docker/openclaw/workspace/.openclaw/extensions && tar -xzf -'

**Option B — SCP (works on standard Linux hosts):**

scp -r langfuse-tracer/ user@your-host:/path/to/openclaw/workspace/.openclaw/extensions/

The plugin auto-discovers at startup fr