Evaluation harness for testing OpenClaw agent skills via Langfuse datasets.
src/eval_harness.py— Runs batch evaluations: sends dataset item prompts to an OpenClaw agent, records traces and scores in Langfusesrc/eval_report.py— Aggregates and reports on experiment scores, with per-item breakdowns and comparison supportsrc/dataset_sync.py— Syncs an eval.yaml file to a Langfuse dataset (upsert by id, archive removed items, optionally writes a per-item manifest with timestamps)
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtLANGFUSE_PUBLIC_KEY— Langfuse API public keyLANGFUSE_SECRET_KEY— Langfuse API secret key
python src/eval_harness.py \
--dataset linear-skill-evaluation \
--run-name linear-improved \
--prompt-prefix $'/skill linear-improved-main-a1b2c3d-e4f5\nRead the SKILL.md for this skill with the `read` tool — never exec/shell. Do not spawn subagents or yield — complete all work inline in this single response, unless the skill defines a mandatory stop point (such as a confirmation gate).\n\n' \
--expected-skill-name linear-improved-main-a1b2c3d-e4f5 \
--repeat 10 \
--timeout 180 \
--experiment-concurrency 5 \
--item-concurrency 3See src/schema.py for the authoritative schema definition (Pydantic v2 models with field descriptions and validation rules).
# Sync items from an eval.yaml file to a Langfuse dataset
python src/dataset_sync.py --file skills/linear-create/eval.yaml
# Dry run (parse and show sync plan without write calls)
python src/dataset_sync.py --file skills/linear-create/eval.yaml --dry-runThe script can optionally write a JSON manifest file with per-item timestamps (from Langfuse server responses). Pass this to the eval harness to pin experiment runs to the exact dataset state.
# Sync and write a manifest file
python src/dataset_sync.py --file skills/linear-create/eval.yaml --output-manifest manifest.json# All experiments for a dataset
python src/eval_report.py --dataset linear-skill-evaluation
# Filter by time range
python src/eval_report.py --dataset linear-skill-evaluation \
--since 2026-07-22T15:10:00Z \
--until 2026-07-22T16:00:00Z
# Per-item breakdown
python src/eval_report.py --dataset linear-skill-evaluation --per-item| Flag | Description |
|---|---|
--dataset |
Langfuse dataset name |
--run-name |
Experiment run name prefix |
--prompt-prefix |
Text prepended to each dataset item prompt |
--model |
Model override (e.g. anthropic/claude-opus-4-8) |
--repeat |
Number of experiment runs (default: 1) |
--timeout |
Per-item timeout in seconds (default: 120) |
--experiment-concurrency |
Parallel experiments (default: 3) |
--item-concurrency |
Parallel items within an experiment (default: 2) |
--langfuse-host |
Langfuse host URL (default: http://localhost:3000) |
--agent |
OpenClaw agent ID (default: main) |
--item-id |
Run only a specific dataset item by ID (partial match) |
| Flag | Description |
|---|---|
--dataset |
Langfuse dataset name |
--prefix |
Filter experiments by name prefix |
--since |
Only scores after this ISO timestamp |
--until |
Only scores before this ISO timestamp |
--per-item |
Show per-item aggregation |
--compare |
Compare two batches by prefix (2 args) |
--langfuse-host |
Langfuse host URL |
| Flag | Description |
|---|---|
--file |
Path to the eval.yaml file to sync (required) |
--langfuse-host |
Langfuse host URL (default: http://localhost:3000) |
--dry-run |
Parse and show sync plan without write calls (read-only GET for archive preview if credentials available) |
--output-manifest |
Write a JSON manifest file (per-item timestamps) at the given path after sync |