Skip to main content
tai42-monitoring-langfuse implements the monitoring backend contract against Langfuse. With it selected, tool runs and agent turns write traces to a Langfuse project, and the Studio reads them back through the same interface.

Install and select it

manifest.yml

Configure the project

Create a project in Langfuse Cloud or in a self-hosted instance and copy its key pair from the project settings.
Selecting monitoring_module without the three required keys raises at startup, naming all three. That is deliberate: a monitoring backend that silently drops traces is worse than a server that will not boot. To run without monitoring, omit monitoring_module entirely — the runtime falls back to a built-in no-op.

Share one project between deployments

LANGFUSE_TRACING_ENVIRONMENT both stamps writes and scopes reads, so several deployments can share a single Langfuse project by diverging on it — staging and production write into the same project and each reads only its own traces. Reading a trace by id is the one unscoped call, because trace ids are globally unique.

Self-hosted Langfuse

The tai-distribution repo ships a separate Compose stack under compose/langfuse/ that brings up Langfuse with its own Postgres, ClickHouse, Redis, and object store. It is a standalone stack: wire the runtime to it with the four variables above.
The package pins the Langfuse SDK to a narrow range because it reaches into SDK internals for the read paths. Upgrading Langfuse’s server is safe; changing the pinned SDK is not.

See also