API reference
Imports, function signatures, and configuration options.
Tracing
Define the Langfuse destination or use its span processor directly.
Prompts
Load Langfuse prompts as Eve instructions and record custom prompts.
Skills
Load one prompt or a folder as Eve skills.
All functions are also exported from @vantezzen/langfuse-eve. The focused imports below
keep agent files explicit.
Tracing
Import from @vantezzen/langfuse-eve/instrumentation.
defineLangfuseInstrumentation(options?)
function defineLangfuseInstrumentation(
options?: LangfuseInstrumentationOptions,
): OTelIntegration;Defines the Langfuse OpenTelemetry destination. Export the result from
agent/instrumentation/langfuse.ts.
Prop
Type
createLangfuseSpanProcessor(options?)
function createLangfuseSpanProcessor(
options?: LangfuseInstrumentationOptions,
): SpanProcessor;Returns the semantic wrapper around the official Langfuse processor for a manually managed
OpenTelemetry pipeline. Most Eve agents should use defineLangfuseInstrumentation().
isEveSpan(span)
function isEveSpan(span: ReadableSpan): boolean;Returns whether a span belongs to Eve's native instrumentation.
Prompts
Import from @vantezzen/langfuse-eve/instructions.
defineLangfuseInstructions(name, options?)
function defineLangfuseInstructions(
name: string,
options?: LangfuseInstructionsOptions,
): DynamicInstructions;Loads a Langfuse text prompt as dynamic Eve instructions and records its version for trace attribution.
Prop
Type
fetchTimeoutMs and maxRetries are passed to the Langfuse prompt client.
trackLangfusePrompt(prompt, options?)
function trackLangfusePrompt(
prompt: TextPromptClient | ChatPromptClient,
options?: TrackLangfusePromptOptions,
): LangfusePromptReference;Records a prompt fetched by application code in the active Eve session.
Skills
Import from @vantezzen/langfuse-eve/skills.
defineLangfuseSkill(name, options?)
function defineLangfuseSkill(
name: string,
options?: DefineLangfuseSkillOptions,
): DynamicSkill;Loads one Langfuse text prompt as an Eve skill.
defineLangfuseSkills(folder, options?)
function defineLangfuseSkills(
folder: string,
options?: DefineLangfuseSkillsOptions,
): DynamicSkillMap;Loads every matching text prompt below a Langfuse folder.
Prop
Type
Both skill functions also accept prompt selection, cache, client, variable, metadata,
description, license, refresh, and transform options. defineLangfuseSkill() enables
tracePrompt by default.