Skip to main content
This example shows how the Launchpad integrates with Langfuse to trace every workflow step and every LLM call. It ships as LangfuseTracingWorkflow in app/launchpad/workflows/examples/langfuse_tracing/ and is registered as WorkflowRegistry.LANGFUSE_TRACING.
For how tracing is wired into the core Workflow class, see Langfuse Integration.

What the workflow does

A simple moderation pipeline for user comments:
  1. ViolationDetectionNode — an AgentNode that classifies whether a comment violates policy.
  2. ContextSummaryResult — an AgentNode that summarizes the comment for the audit log.
  3. RemoveCommentNode — a plain Node that deletes the comment when the previous step flagged it.
Each node runs inside its own Langfuse span when enable_tracing=True, so you can see timings, inputs, outputs, and LLM calls for the whole run in the Langfuse dashboard.

Schema

Workflow definition

Violation detection node

The other two nodes are thin — ContextSummaryResult follows the same pattern with a summarization prompt, and RemoveCommentNode reads ViolationDetectionNode.OutputType via get_output() and logs the deletion.

Running the example

1

Set Langfuse credentials

Add to .env (or your shell environment):
2

Run the playground script

The script loads app/launchpad/workflows/examples/langfuse_tracing/request_examples/violation.json, instantiates the workflow via WorkflowRegistry.LANGFUSE_TRACING.value(), and runs it.
3

Inspect the trace

Open the Langfuse dashboard. You should see a trace named LangfuseTracingWorkflow with child spans for each node (ViolationDetectionNode, ContextSummaryResult, RemoveCommentNode) and the underlying LLM generations.
The playground instantiates the workflow without arguments, which defaults to enable_tracing=False. To capture traces, update the script to WorkflowRegistry.LANGFUSE_TRACING.value(enable_tracing=True), or instantiate LangfuseTracingWorkflow(enable_tracing=True) directly.

Example event

app/launchpad/workflows/examples/langfuse_tracing/request_examples/violation.json: