> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmuster.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Langfuse

> Automatic monitoring of agents already traced to Langfuse.

## How it works

If your team is already using Langfuse for LLM tracing, the muster Langfuse connector gives you immediate coverage with zero additional code.

The connector:

* **Discovers** agent names from existing Langfuse traces
* **Streams** completed traces and maps them to muster quality signals
* **Extracts** token usage from Langfuse generation observations automatically

Elitery deploys and manages the connector. Your developers do nothing.

***

## What Elitery needs from you

```
LANGFUSE_HOST=https://cloud.langfuse.com   # or your self-hosted URL
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_PROJECT_ID=<optional, defaults to all projects>
```

***

## What your developers do

Nothing — if you're already tracing to Langfuse, you're done.

If you're not yet using Langfuse but want to add tracing (which also feeds muster), add the Langfuse SDK to your agents:

```python theme={null}
from langfuse.decorators import observe, langfuse_context

@observe()
def run_agent(input: str) -> str:
    # Your agent logic here
    result = llm.invoke(input)
    return result
```

This gives Langfuse — and therefore muster — full execution visibility including prompts, completions, and token usage.
