Skip to main content

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.

LangfuseResource exposes Langfuse projects and traces as a read-only tree. Setup steps for the public/secret keys live at Langfuse Credentials.

Node

pnpm add @struktoai/mirage-node
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

pnpm add @struktoai/mirage-browser
import { LangfuseResource, MountMode, Workspace } from '@struktoai/mirage-browser'

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

Config

FieldDefaultNotes
publicKeyrequiredLangfuse public key.
secretKeyrequiredLangfuse secret key. Redacted in snapshots.
hosthttps://cloud.langfuse.comOverride for self-hosted Langfuse.
defaultTraceLimit100Default page size for trace listings.
defaultSearchLimit100Default page size for search.

Mount mode

read. For the layout and search behavior see the Python Langfuse docs.