> ## 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

> Mount Langfuse traces and observations as a Mirage filesystem.

`LangfuseResource` exposes Langfuse projects and traces as a read-only tree.

Setup steps for the public/secret keys live at [Langfuse Credentials](/home/setup/langfuse).

## Node

```bash theme={null}
pnpm add @struktoai/mirage-node
```

```ts theme={null}
import { LangfuseResource, MountMode, Workspace } from '@struktoai/mirage-node'

const lf = new LangfuseResource({
  publicKey: process.env.LANGFUSE_PUBLIC_KEY!,
  secretKey: process.env.LANGFUSE_SECRET_KEY!,
  host: process.env.LANGFUSE_HOST,
})

const ws = new Workspace({ '/lf': lf }, { mode: MountMode.READ })
await ws.execute('ls /lf/traces/')
```

## Browser

```bash theme={null}
pnpm add @struktoai/mirage-browser
```

```ts theme={null}
import { LangfuseResource, MountMode, Workspace } from '@struktoai/mirage-browser'

const lf = new LangfuseResource({
  publicKey: LANGFUSE_PUBLIC_KEY,
  secretKey: LANGFUSE_SECRET_KEY,
})
```

## Config

| Field                | Default                      | Notes                                       |
| -------------------- | ---------------------------- | ------------------------------------------- |
| `publicKey`          | required                     | Langfuse public key.                        |
| `secretKey`          | required                     | Langfuse secret key. Redacted in snapshots. |
| `host`               | `https://cloud.langfuse.com` | Override for self-hosted Langfuse.          |
| `defaultTraceLimit`  | `100`                        | Default page size for trace listings.       |
| `defaultSearchLimit` | `100`                        | Default page size for search.               |

## Mount mode

`read`.

For the layout and search behavior see the [Python Langfuse docs](/python/resource/langfuse).
