seed-test-data

Seeds deterministic Langfuse test data into ClickHouse and Postgres for local development.

34.0k|3.7k|Updated May 18, 2023
One-click install
npx skills add https://github.com/langfuse/langfuse --skill seed-test-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: seed-test-data
Source: https://github.com/langfuse/langfuse/tree/main/.agents/skills/seed-test-data
Command: npx skills add https://github.com/langfuse/langfuse --skill seed-test-data

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually creating realistic Langfuse traces, sessions, and observations for local development and UI testing is slow and error-prone. This Skill provides one-shot, deterministic seeding of complex test data so developers can reproduce frontend rendering, performance, and layout scenarios without ad hoc scripts or raw database inserts.

Core Features & Use Cases

  • Scenario-based seeding: Generate complex observation trees, agent timelines, deep chains, long sessions, bulk traces, outlier traffic, and v4 events with a single CLI command.
  • Deterministic and verifiable: Same seed and flags produce the same IDs, with ClickHouse readback verification and a JSON summary including UI deep links.
  • Built-in diagnostics: A doctor command checks Postgres, migrations, ClickHouse, Redis, MinIO, and the web app, printing the exact fix command for every failure.
  • Use Case: A frontend engineer needs to stress-test the trace detail view's 10k observation cap. They run the trace-tree scenario with 12,000 observations and a stride flag, then open the printed deep link to verify the chronological tail behavior.

Quick Start

Ask the agent to seed a complex v4 trace tree with 5000 observations using the seed-test-data skill and open the printed UI link to verify it.

Frequently Asked Questions about seed-test-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I seed test data for local Langfuse development?

Run pnpm run seed with a scenario name such as trace-tree, agent-timeline, or long-session, plus flags controlling size and shape. The CLI handles env loading, writes to ClickHouse and Postgres, verifies the readback, and prints UI deep links.

How do I generate a large complex trace for Langfuse UI testing?

Use the trace-tree scenario with flags like --observations 5000 --depth 12 --breadth 500, adding --v4 to write events tables. For graph layout stress, use agent-graph or deep-chain scenarios instead.

What should I do when Langfuse seeding fails?

Run pnpm run seed -- doctor first. It prints PASS, WARN, or FAIL per dependency including Postgres, migrations, ClickHouse, Redis, MinIO, and the web app, with the exact fix command for every failure.

Is seeded Langfuse test data deterministic across runs?

Yes, the same seed and flags produce the same IDs, with timestamps anchored to the current UTC day. Re-running within a day overwrites in place; use --id-prefix to create independent copies.

Can I preview seed data without writing to the database?

Yes, add the --dry-run flag to any scenario to predict the output without writing. You can also run pnpm run seed -- list --json to see all scenarios and flags.