@anvia/langfuse 1.0.0-rc.1 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # @anvia/langfuse
2
2
 
3
- Langfuse tracing adapter for Anvia.
4
-
5
- Use this package to attach Langfuse tracing to Anvia agents and to publish evaluation scores from Anvia eval reporters.
3
+ Langfuse tracing, evaluation reporting, scoring, prompt, and dataset integration for Anvia.
6
4
 
7
5
  ## Installation
8
6
 
@@ -10,508 +8,180 @@ Use this package to attach Langfuse tracing to Anvia agents and to publish evalu
10
8
  pnpm add @anvia/langfuse @anvia/core
11
9
  ```
12
10
 
13
- In this monorepo, the package is available through the workspace:
11
+ ## Client lifecycle and Agent tracing
14
12
 
15
- ```sh
16
- pnpm --filter @anvia/langfuse build
17
- ```
18
-
19
- ## Usage
13
+ `LangfuseClient` owns its OpenTelemetry SDK, exporter, and optional score queue. Construction and
14
+ accessor calls do not perform I/O; resources are initialized lazily on first use.
20
15
 
21
16
  ```ts
22
- import { Agent } from "@anvia/core";
23
- import { OpenAIClient } from "@anvia/openai";
24
- import { langfuse } from "@anvia/langfuse";
25
-
26
- const tracing = langfuse.create({
27
- publicKey,
28
- secretKey,
29
- baseUrl,
30
- environment,
31
- release,
32
- });
33
-
34
- const client = new OpenAIClient({
35
- apiKey,
17
+ import { Agent, type CompletionModel } from "@anvia/core";
18
+ import { LangfuseClient } from "@anvia/langfuse";
19
+
20
+ declare const model: CompletionModel;
21
+
22
+ await using langfuse = new LangfuseClient({
23
+ publicKey: process.env.LANGFUSE_PUBLIC_KEY,
24
+ secretKey: process.env.LANGFUSE_SECRET_KEY,
25
+ baseUrl: process.env.LANGFUSE_BASE_URL,
26
+ serviceName: "support-service",
27
+ environment: "production",
28
+ release: "2026.08.1",
36
29
  });
37
30
 
38
31
  const agent = new Agent({
39
32
  id: "support",
40
- model: client.completionModel(),
41
- instructions: "Answer support questions clearly.",
42
- observers: [tracing],
33
+ model,
34
+ observability: {
35
+ observers: {
36
+ langfuse: langfuse.observer(),
37
+ },
38
+ primaryTrace: "langfuse",
39
+ errorPolicy: "ignore",
40
+ },
43
41
  });
44
42
 
45
- const response = await agent.prompt("How do I reset my password?").send();
46
-
47
- console.log(response.output);
48
-
49
- await tracing.flush();
50
- ```
51
-
52
- Use `flush()` after short-lived jobs. Use `shutdown()` when the process is exiting.
53
-
54
- ## Configuration
55
-
56
- `langfuse.create()` accepts the following options. Any option that is
57
- left undefined falls back to the matching environment variable, and
58
- explicit options always win.
59
-
60
- | Option | Environment variable | Notes |
61
- | ------------- | ----------------------------- | ---------------------------------------------------------- |
62
- | `publicKey` | `LANGFUSE_PUBLIC_KEY` | Required for score publishing. |
63
- | `secretKey` | `LANGFUSE_SECRET_KEY` | Required for score publishing. |
64
- | `baseUrl` | `LANGFUSE_BASE_URL` | Defaults to `https://cloud.langfuse.com`. |
65
- | `environment` | `LANGFUSE_TRACING_ENVIRONMENT`| Tag attached to every trace. |
66
- | `release` | `LANGFUSE_RELEASE` | Tag attached to every trace. |
67
- | `serviceName` | `LANGFUSE_SERVICE_NAME` | Recorded on the root observation and as the OTel `service.name` resource attribute. |
68
- | `captureMode` | — | `"safe"` (default) records instructions/messages plus request summaries; `"full"` includes documents, tool definitions, schemas, and additional parameters. |
69
- | `captureMaxBytes` | — | Maximum encoded size per captured value; defaults to 262,144 bytes and must be at least 96. |
70
-
71
- ```ts
72
- const tracing = langfuse.create({
73
- // All fields are optional and fall back to env vars.
74
- serviceName: "support-agent",
43
+ const result = await agent.generate({
44
+ prompt: "Summarize this support request.",
45
+ trace: {
46
+ name: "support-summary",
47
+ userId: "user_123",
48
+ sessionId: "session_456",
49
+ metadata: { tenantId: "acme" },
50
+ tags: ["support"],
51
+ },
75
52
  });
76
- ```
77
-
78
- ## Observation metadata
79
-
80
- The adapter records structured model and runtime data while keeping
81
- the default capture surface bounded:
82
-
83
- - **Generation observations** carry system instructions, model messages,
84
- the resolved model, and `modelInfo`. Full capture also includes the
85
- sanitized `providerRequest`.
86
- `completionStartTime` and `firstDeltaMs` provide native time-to-first-token data.
87
- - **Usage details** use mutually exclusive `input`, `output`, cache, and
88
- reasoning buckets so Langfuse can infer cost without double counting.
89
- - **Generation observations** receive a `generation.update({ output: { delta } })`
90
- call for every streaming delta (`text_delta`, `reasoning_delta`,
91
- `tool_call`), so the Langfuse UI reflects partial output as the
92
- model produces it.
93
- - **Tool observations** carry arguments on start and structured results on
94
- end. Definitions and tool metadata are included when `captureMode: "full"`.
95
- - **Root run observation** carries `serviceName` and the configured
96
- `metadata` from `AgentRunStartArgs`.
97
-
98
- Binary and base64 bodies are replaced with omission markers. Oversized
99
- values are replaced with deterministic bounded previews.
100
53
 
101
- ## Eval Scores
102
-
103
- ```ts
104
- import { createLangfuseEvalReporter } from "@anvia/langfuse";
105
-
106
- const reporter = createLangfuseEvalReporter(tracing);
54
+ if (result.status === "completed") {
55
+ console.log(result.output);
56
+ console.log(result.trace); // { observer: "langfuse", traceId, observationId }
57
+ }
107
58
  ```
108
59
 
109
- The reporter reads trace information from eval output when available, then publishes metric scores to Langfuse.
60
+ `await using` calls `langfuse[Symbol.asyncDispose]()` at scope exit. Disposal drains queued scores,
61
+ flushes pending traces, and shuts down owned resources. Use `flush()` only when a long-running
62
+ process needs an explicit mid-lifecycle delivery checkpoint. `close()` is idempotent and terminal.
63
+ Each client owns an isolated, unregistered tracer provider, so multiple Langfuse clients and an
64
+ application-wide OpenTelemetry provider can coexist without replacing one another.
110
65
 
111
- ### Eval reporter options
66
+ Observer capture policy is registration-specific:
112
67
 
113
68
  ```ts
114
- const reporter = createLangfuseEvalReporter(tracing, {
115
- publishInvalid: false, // publish invalid outcomes as zero scores
116
- onMissingTrace: "ignore", // "ignore" | "warn" | "throw"
117
- truncateInputAt: 2048, // max bytes for case input/expected summaries
118
- includeMessages: true, // include output.messages in score metadata
119
- includeContext: false, // opt in to context/retrievalContext score metadata
69
+ const observer = langfuse.observer({
70
+ captureMode: "safe",
71
+ captureMaxBytes: 64_000,
72
+ redactInputs: true,
73
+ redactOutputs: "deep",
74
+ redaction: { replacement: "[REDACTED]" },
120
75
  });
121
76
  ```
122
77
 
123
- - `onMissingTrace` decides what happens when no trace can be
124
- resolved for a case. `"ignore"` (default, also when `strict` is
125
- not set) drops the score silently. `"warn"` logs a
126
- `console.warn`. `"throw"` rejects with an error. The legacy
127
- `strict: true` option continues to work as an alias for
128
- `"throw"`.
129
-
130
- - `truncateInputAt` caps the byte size of `caseInputSummary` and
131
- `caseExpectedSummary` metadata keys. Truncation appends
132
- `<truncated>` to the cut value.
133
-
134
- - `includeMessages` controls whether `output.messages` (if present)
135
- is included in score metadata.
78
+ An observer does not own resources and has no `flush()` or `close()` method. A client can create
79
+ multiple observers with different capture policies.
136
80
 
137
- - `includeContext` controls whether case `context` and
138
- `retrievalContext` are included in score metadata. It defaults to
139
- `false` because retrieved documents may contain sensitive data.
140
-
141
- ### Trace resolution
142
-
143
- The reporter resolves a trace ID for each case in three tiers:
144
-
145
- 1. `output.trace` (most direct, set by an agent run).
146
- 2. `case.input.trace` (useful when the case input bundles trace
147
- info).
148
- 3. `case.metadata.traceId` (and optional `observationId`).
149
-
150
- ### Metric annotations
151
-
152
- `EvalMetric` (in `@anvia/core`) accepts optional `dataType`,
153
- `configId` / `scoreConfigId`, and `metadata` fields. The reporter
154
- forwards them to Langfuse, so categorical or boolean metrics are
155
- sent with the right shape:
81
+ ## Evaluation reporting
156
82
 
157
83
  ```ts
158
- import { defineMetric, EvalOutcome } from "@anvia/core";
159
-
160
- const judge = defineMetric({
161
- name: "quality",
162
- dataType: "CATEGORICAL",
163
- configId: "quality-config",
164
- metadata: { source: "judge-llm" },
165
- evaluate: () => EvalOutcome.pass("good"),
84
+ import { agentEvalTarget, contains, runEvalSuite } from "@anvia/core/evals";
85
+
86
+ const suite = await runEvalSuite({
87
+ name: "support-regression",
88
+ cases: [{ id: "refund", input: "What is the refund window?", expected: "30 days" }],
89
+ target: agentEvalTarget<string>({
90
+ agent,
91
+ request: ({ input }) => ({ prompt: input }),
92
+ }),
93
+ metrics: [contains()],
94
+ reporters: [
95
+ langfuse.evalReporter({
96
+ onMissingTrace: "warn",
97
+ includeMessages: false,
98
+ }),
99
+ ],
100
+ reporterErrorPolicy: "collect",
166
101
  });
167
102
  ```
168
103
 
169
- `defineMetric` is a small identity helper that signals intent and
170
- preserves type inference; plain object literals continue to work.
104
+ Reporter failures are collected by default. Use `reporterErrorPolicy: "throw"` when reporter
105
+ delivery is operationally required; every reporter is still attempted before the aggregate error
106
+ is thrown. The reporter accepts traces produced by the `"langfuse"` observer by default. When that
107
+ observer has a different Agent registration name, set `traceObserver` to the same name. This
108
+ prevents a score from being posted against another backend's primary trace.
171
109
 
172
- ### Typed scores and overrides
173
-
174
- `tracing.score()` accepts a `dataType` (`"NUMERIC" | "CATEGORICAL" | "BOOLEAN"`), a `configId` (or its `scoreConfigId` alias), a per-score `environment` override, and a `timestamp` (Date or ISO 8601 string). The adapter validates `value` against the dataType at the boundary.
110
+ Run an eval suite and publish its cases as one Langfuse dataset experiment:
175
111
 
176
112
  ```ts
177
- await tracing.score({
178
- traceId: trace.traceId,
179
- name: "verdict",
180
- value: "pass", // string for CATEGORICAL
181
- dataType: "CATEGORICAL",
182
- configId: "cfg-1",
183
- environment: "staging",
184
- timestamp: new Date(),
113
+ const result = await langfuse.runEvalExperiment({
114
+ suite: {
115
+ name: "support-regression",
116
+ cases,
117
+ target,
118
+ metrics,
119
+ },
120
+ experiment: {
121
+ datasetName: "support-cases",
122
+ runName: "rc2",
123
+ publishScores: true,
124
+ },
185
125
  });
186
126
  ```
187
127
 
188
- The score fetch has a default timeout of 30 s, overrideable via
189
- `langfuse.create({ timeoutMs: ... })`.
190
-
191
- ### Batching and retry (high-volume evals)
128
+ ## Scores
192
129
 
193
- Enable the in-memory score queue by setting `scoreBatchSize` on
194
- `langfuse.create()`. When enabled, `tracing.score()` enqueues the
195
- score and returns immediately. The queue flushes when it reaches
196
- `scoreBatchSize`, on a debounce timer (`scoreFlushIntervalMs`,
197
- default 250 ms), and on `flushScores()`, `flush()`, or `shutdown()`.
130
+ Scores are sent directly unless batching is configured:
198
131
 
199
132
  ```ts
200
- const tracing = langfuse.create({
133
+ await using langfuse = new LangfuseClient({
201
134
  publicKey,
202
135
  secretKey,
203
- scoreBatchSize: 20, // enable queue; flushes at 20 items
204
- scoreFlushIntervalMs: 500, // or after 500ms
205
- scoreMaxRetries: 3, // retry 429 / 5xx with backoff
136
+ scores: {
137
+ batchSize: 20,
138
+ flushIntervalMs: 250,
139
+ retries: { maxAttempts: 3 },
140
+ },
206
141
  });
207
142
 
208
- await tracing.score({ traceId, name: "quality", value: 1 });
209
- await tracing.score({ traceId, name: "latency", value: 0.4 });
210
- await tracing.flushScores(); // drain the queue
211
- console.log(tracing.scoreQueueDepth()); // 0
212
- ```
213
-
214
- `flush()` and `shutdown()` also drain the score queue. After all
215
- retries are exhausted, the queue throws a `LangfuseScoreError` whose
216
- `scores` property contains the failed payloads so you can inspect
217
- what was lost.
218
-
219
- ## Event observations & trace handle
220
-
221
- After a run starts, you can record ad-hoc checkpoints and attach
222
- extra attributes to the active trace without threading the run
223
- observer through every function call. The tracing instance exposes
224
- the most recent trace through `getCurrentTrace()`:
225
-
226
- ```ts
227
- import { langfuse } from "@anvia/langfuse";
228
-
229
- const tracing = langfuse.create({ publicKey: "pk", secretKey: "sk" });
230
-
231
- await tracing.startRun({
232
- agentName: "support",
233
- prompt: { role: "user", content: [{ type: "text", text: "hi" }] },
234
- history: [],
235
- maxTurns: 3,
143
+ await langfuse.score({
144
+ traceId,
145
+ observationId,
146
+ name: "quality",
147
+ value: 0.95,
148
+ dataType: "NUMERIC",
236
149
  });
237
-
238
- const trace = tracing.getCurrentTrace();
239
-
240
- trace?.addEvent("retrieval.done", { docCount: 4 });
241
- trace?.addEvent("validation.passed");
242
- trace?.addAttributes({ quality: "high" });
243
150
  ```
244
151
 
245
- `addEvent` creates an instantaneous Langfuse `event` observation under the active
246
- root. `addAttributes` updates the root
247
- observation's metadata. Both calls bubble up to Langfuse via the
248
- existing OpenTelemetry span processor.
152
+ `maxAttempts` includes the initial attempt. Client disposal drains the queue; callers do not need
153
+ to flush it manually.
249
154
 
250
- If you have the run observer returned by `startRun`, you can also
251
- use its `event?(...)` hook (added in `@anvia/core`) to record
252
- checkpoints:
155
+ ## Datasets
253
156
 
254
157
  ```ts
255
- const run = await tracing.startRun({
256
- agentName: "support",
257
- prompt: { role: "user", content: [{ type: "text", text: "hi" }] },
258
- history: [],
259
- maxTurns: 3,
260
- });
158
+ const datasets = langfuse.datasetClient({ pageSize: 50 });
261
159
 
262
- await run.event?.({
263
- name: "retrieval.done",
264
- attributes: { docCount: 4 },
160
+ await datasets.createDataset({ name: "support-cases" });
161
+ await datasets.upsertItems({
162
+ name: "support-cases",
163
+ items: [{ id: "refund", input: "Refund window?", expected: "30 days" }],
265
164
  });
266
- ```
267
-
268
- The trace handle is cleared when the run `end`s or `error`s. If you
269
- call `addEvent` or `addAttributes` after that, the underlying
270
- Langfuse SDK will reject the call because the root observation is
271
- no longer accepting children. We let the error propagate so it is
272
- visible.
273
-
274
- `getCurrentTrace()` is per-tracing-instance and last-write-wins:
275
- when multiple runs start on the same instance, the handle always
276
- points at the most recent run. For true concurrency, manage your
277
- own context (e.g. capture the run observer or build your own
278
- mapping keyed on user/session).
279
165
 
280
- ## Datasets & Experiment runs
281
-
282
- Bridge `@anvia/core/evals` to Langfuse's dataset / experiment-run
283
- workflow. The dataset client surfaces the four endpoints you need
284
- to create a dataset, fetch its items, upsert items, and post a
285
- batched dataset-run-items payload.
286
-
287
- ```ts
288
- import {
289
- createLangfuseDatasetClient,
290
- runEvalAsExperiment,
291
- langfuse,
292
- } from "@anvia/langfuse";
293
-
294
- const tracing = langfuse.create({ publicKey: "pk", secretKey: "sk" });
295
- const client = createLangfuseDatasetClient(tracing);
296
-
297
- await client.createDataset({ name: "support-smoke" });
298
- await client.upsertItems("support-smoke", [
299
- { id: "c-1", input: { q: "hi" }, expected: "hello" },
300
- { id: "c-2", input: { q: "bye" } },
301
- ]);
302
-
303
- const dataset = await client.getDataset("support-smoke");
304
- console.log(dataset.items);
305
-
306
- await client.runExperiment({
307
- datasetName: "support-smoke",
308
- runName: "smoke-2026-06",
309
- run: (item) => ({
310
- output: `answer-for-${item.id}`,
311
- trace: { traceId: `trace-${item.id}` },
312
- }),
166
+ const dataset = await datasets.getDataset<string, string>({
167
+ name: "support-cases",
313
168
  });
314
169
  ```
315
170
 
316
- For eval suites, `runEvalAsExperiment` runs the suite and posts a
317
- dataset run alongside the metric scores:
171
+ ## Prompts
318
172
 
319
173
  ```ts
320
- import { agentEvalTarget } from "@anvia/core/evals";
321
- import { runEvalAsExperiment } from "@anvia/langfuse";
322
-
323
- const { suite, datasetRun } = await runEvalAsExperiment(
324
- {
325
- name: "smoke",
326
- cases: [
327
- { id: "c-1", input: "a", expected: "A" },
328
- { id: "c-2", input: "b", expected: "B" },
329
- ],
330
- target: agentEvalTarget(supportAgent),
331
- metrics: [/* ... */],
332
- reporters: [/* existing reporters still score */],
333
- },
334
- {
335
- tracing,
336
- datasetName: "smoke-set",
337
- runName: "smoke-run",
338
- publishScores: true,
339
- reporterOptions: { onMissingTrace: "warn" },
340
- },
341
- );
342
-
343
- console.log(suite.metrics.passed, datasetRun.posted);
344
- ```
345
-
346
- `publishScores` adds a Langfuse eval reporter without replacing reporters
347
- already configured on the suite. `agentEvalTarget(...)` returns the response trace used to attach
348
- each score. Set `includeContexts: true` only when case context may be persisted in Langfuse dataset
349
- metadata.
350
-
351
- ### Options
352
-
353
- - `createLangfuseDatasetClient(tracing, options)`:
354
- - `publicKey`, `secretKey`, `baseUrl`: optionally override the
355
- tracing instance's resolved values. Falls back to env vars
356
- (`LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_BASE_URL`).
357
- - `pageSize` (default `50`): dataset item pagination.
358
- - `timeoutMs` (default `30_000`): per-request timeout via
359
- `AbortSignal.timeout`.
360
- - `client.runExperiment({ ... })`:
361
- - `items` (optional): supply items directly to skip the
362
- `getDataset` round trip.
363
- - `run`: invoked per item, returns `{ output, trace? }`.
364
- Per-item failures are caught and surfaced in the result's
365
- `errors` array; only successful items reach the batched POST.
366
-
367
- ### Failure handling
368
-
369
- `runExperiment` continues on per-item errors. The `errors` array
370
- contains `{ itemId, error }` entries for failed items; the POST
371
- still goes out with the successful subset. Non-2xx on the
372
- batched POST throws (and the items that already errored are
373
- also included in the thrown error's context).
374
-
375
- ## Prompt management
376
-
377
- Pull prompts from Langfuse's prompt store and link generations to
378
- the prompt version. The tracing instance attaches the prompt name
379
- and version to the root trace and every generation in the run
380
- when a prompt ref is configured.
381
-
382
- ```ts
383
- import { createLangfusePromptClient, langfuse } from "@anvia/langfuse";
384
-
385
- const tracing = langfuse.create({ publicKey: "pk", secretKey: "sk" });
386
- const prompts = createLangfusePromptClient(tracing);
387
-
388
- const prompt = await prompts.getPrompt("support.system");
389
- console.log(prompt.prompt, prompt.version);
390
-
391
- await agent
392
- .prompt("hi")
393
- .withTrace({
394
- promptRef: { name: "support.system", version: prompt.version },
395
- })
396
- .send();
397
- ```
174
+ const prompts = langfuse.promptClient({ cacheTtlMs: 60_000 });
398
175
 
399
- `promptRef` is also accepted on `trace.metadata` (keys
400
- `promptName` and `promptVersion`) for back-compat with users who
401
- already attach metadata to `withTrace(...)`.
402
-
403
- ### Prompt client options
404
-
405
- - `cacheTtlMs` (default `60_000`): in-memory TTL per
406
- `${name}::${version}::${label}` key.
407
- - `timeoutMs` (default `30_000`): per-request timeout via
408
- `AbortSignal.timeout`.
409
- - `publicKey`, `secretKey`, `baseUrl`: override the tracing
410
- instance's resolved values, falling back to env vars.
411
-
412
- ### Per-call options
413
-
414
- - `getPrompt(name, { version?, label?, cacheTtlMs?, refresh? })`:
415
- - `version` and `label` filter the upstream request.
416
- - `cacheTtlMs` overrides the client default for this call.
417
- - `refresh: true` skips the cache and re-fetches.
418
-
419
- ### Helpers
420
-
421
- - `getPromptText(name, options?)`: returns the prompt string;
422
- throws if the prompt is a chat prompt.
423
- - `getPromptChat(name, options?)`: returns the chat message
424
- array; throws if the prompt is a text prompt.
425
- - `refresh()`: clears the cache.
426
-
427
- ## PII redaction
428
-
429
- Mask personally identifiable information in observations before it
430
- leaves the process. The default pattern set catches emails,
431
- credit cards (with Luhn validation), phone numbers, IPv4
432
- addresses, JWTs, and common API key shapes.
433
-
434
- ```ts
435
- import { langfuse } from "@anvia/langfuse";
436
-
437
- const tracing = langfuse.create({
438
- publicKey: "pk",
439
- secretKey: "sk",
440
- redactInputs: true,
441
- redactOutputs: "deep",
176
+ const text = await prompts.getPromptText({
177
+ name: "support.system",
178
+ label: "production",
442
179
  });
443
- ```
444
-
445
- - `redactInputs` redacts system instructions, root inputs, chat history,
446
- tool arguments, request metadata, and nested-agent inputs.
447
- - `redactOutputs` redacts streaming/final generation output, errors,
448
- tool results, transcripts, and nested-agent outputs.
449
- - `"deep"` recurses into nested objects and arrays (in addition to
450
- top-level strings).
451
-
452
- ### Customizing
453
-
454
- ```ts
455
- const tracing = langfuse.create({
456
- publicKey: "pk",
457
- secretKey: "sk",
458
- redactOutputs: true,
459
- redaction: {
460
- replacement: "[HIDDEN]",
461
- patterns: [
462
- { name: "ssn", regex: /\b\d{3}-\d{2}-\d{4}\b/g },
463
- ],
464
- },
465
- });
466
- ```
467
-
468
- `createPiiRedactor(options)` is also exported for ad-hoc use:
469
180
 
470
- ```ts
471
- import { createPiiRedactor } from "@anvia/langfuse";
472
-
473
- const redactor = createPiiRedactor();
474
- const safe = redactor.redactString("email alice@example.com today");
475
- const safeMessages = redactor.redactMessages(messages);
476
- const safeObject = redactor.redactObject(spanInput);
181
+ const chat = await prompts.getPromptChat({ name: "support.chat" });
182
+ prompts.refresh();
477
183
  ```
478
184
 
479
- ## Exports
480
-
481
- - `langfuse`
482
- - `createLangfuseDatasetClient`
483
- - `createLangfuseEvalReporter`
484
- - `createLangfusePromptClient`
485
- - `runEvalAsExperiment`
486
- - `LangfuseScoreError`
487
- - `LangfuseTracing`
488
- - `LangfuseTraceHandle`
489
- - `LangfuseTracingOptions`
490
- - `LangfuseScoreArgs`
491
- - `LangfuseScoreDataType`
492
- - `LangfuseEvalReporterOptions`
493
- - `LangfuseDatasetClient`
494
- - `LangfuseDatasetClientOptions`
495
- - `LangfuseDataset`
496
- - `LangfuseDatasetItem`
497
- - `LangfuseRunExperimentOptions`
498
- - `LangfuseRunExperimentResult`
499
- - `LangfuseRunItemResult`
500
- - `LangfuseRunItemError`
501
- - `LangfusePromptClient`
502
- - `LangfusePromptClientOptions`
503
- - `LangfusePromptGetOptions`
504
- - `LangfusePrompt`
505
- - `LangfuseChatMessage`
506
- - `RunEvalAsExperimentOptions`
507
- - `RunEvalAsExperimentResult`
508
- - `createPiiRedactor`
509
- - `DEFAULT_PATTERNS`
510
- - `PiiRedactor`
511
- - `RedactorPattern`
512
- - `LangfuseRedactionOptions`
513
- - `LangfuseRedactionMode`
514
-
515
185
  ## Development
516
186
 
517
187
  ```sh