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

# Langfuse

> Set up the Langfuse resource in Python.

## Dependencies

No additional dependencies - uses `aiohttp` (included).

For credential setup, see the [Langfuse Setup](/home/setup/langfuse) guide.

## Configuration

```python theme={null}
import os
from mirage import Workspace, MountMode
from mirage.resource.langfuse import LangfuseConfig, LangfuseResource

config = LangfuseConfig(
    public_key=os.environ["LANGFUSE_PUBLIC_KEY"],
    secret_key=os.environ["LANGFUSE_SECRET_KEY"],
    host=os.environ.get("LANGFUSE_HOST", "https://cloud.langfuse.com"),
)
resource = LangfuseResource(config=config)
ws = Workspace({"/langfuse/": resource}, mode=MountMode.READ)
```

## Config Reference

| Field        | Required | Default                      | Description             |
| ------------ | -------- | ---------------------------- | ----------------------- |
| `public_key` | Yes      |                              | Langfuse public API key |
| `secret_key` | Yes      |                              | Langfuse secret API key |
| `host`       | No       | `https://cloud.langfuse.com` | Langfuse API host URL   |
