Langfuse for Openclaw

A comprehensive skill for integrating Langfuse observability, prompt management, and evaluation into AI coding agent workflows.

south-american-cowboy
v0.1.2
Apr 6, 2026
1
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install langfuse

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install langfuse using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Langfuse?

Langfuse is an open-source LLM engineering platform designed to handle tracing, prompt management, and evaluation for complex AI applications. This skill enables Openclaw Skills users to seamlessly connect their codebases with Langfuse, whether using the cloud version or a self-hosted instance. It prioritizes SDK-based integrations for Python and JavaScript/TypeScript to ensure robust observability and high-performance data handling.

By leveraging this skill, developers can move beyond hardcoded prompts and opaque agent executions. It facilitates deep visibility into LLM calls, costs, and latencies, while providing a structured way to manage prompt versions and collect evaluation scores. Whether you are auditing existing traces or building a brand-new evaluation pipeline, this tool ensures your Openclaw Skills setup is production-ready and data-driven.

Langfuse Use Cases

  • Migrating hardcoded prompts into centralized Langfuse prompt management for better version control.
  • Implementing observability and tracing in AI agents to debug execution steps and monitor performance.
  • Collecting user feedback and automated evaluation scores to improve LLM output quality over time.
  • Querying traces, metrics, and sessions to build custom analytics dashboards or debugging tools.
  • Configuring self-hosted Langfuse environments with custom domains and private infrastructure.

How Langfuse Works

  1. Identification of the project environment, distinguishing between cloud-hosted and self-hosted Langfuse deployments.
  2. Configuration of authentication using public and secret keys alongside the appropriate base URL within the Openclaw Skills environment.
  3. Implementation of SDK-based instrumentation for Python or JS/TS to capture generations, spans, and traces.
  4. Centralization of prompts by replacing inline literals with dynamic fetch and render calls via the Langfuse API.
  5. Attachment of evaluation metrics and scores to specific observations or trace sessions for continuous improvement.

Langfuse Setup

To get started with this skill in your Openclaw Skills environment, configure the required environment variables:

export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."
export LANGFUSE_BASE_URL="https://cloud.langfuse.com" # Use your self-hosted URL if applicable

For Python projects, ensure you have the latest SDK installed:

pip install langfuse

For JS/TS projects:

npm install langfuse

Langfuse Data Schema & Taxonomy

The skill organizes LLM engineering data into a structured hierarchy to ensure clarity and searchability within Openclaw Skills.

Entity Description Key Attributes
Traces Top-level execution logs trace_id, user_id, session_id, tags
Observations Individual spans or generations name, model, latency, tokens, cost
Prompts Managed prompt templates name, version, content, config
Scores Evaluation and feedback data name, value, type, comment
Datasets Collections for repeatable testing name, description, items

Langfuse Advanced Features

  • Full support for self-hosted deployments with custom URL routing and platform compatibility checks.
  • High-performance asynchronous ingestion using the latest SDK namespaces such as api.observations and api.metrics.
  • OpenTelemetry-compatible instrumentation for standardized observability across different application stacks.
  • Dynamic prompt fetching with built-in caching, retries, and fallback mechanisms for high reliability in production.
  • Multi-level scoring capabilities, allowing granular feedback to be attached to traces, generations, or dataset runs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*