Enable at build time
telemetry: true, AI Kit:
- creates a root span named after the workflow
id; - automatically records
input,output, andmetadata(recordInputs/recordOutputs); - attaches
ai_kit.workflow.*attributes for easier filtering in Langfuse or OTEL.
WhenuserIdis provided, it is exported aslangfuse.user.id,user.id, andai_kit.workflow.user_id.
Update an existing instance
Per-run overrides
recordInputs, recordOutputs, metadata, …).
Associate a user
tenantId, plan, …) for richer filters.
Plug into Langfuse
ai_kit.workflow.step.kind(automaticorhuman);ai_kit.workflow.step.occurrence(iteration counter for loops);ai_kit.workflow.step.branch_id/next_step_idwhen conditions are involved.
request and resume. human.requested / human.completed events are emitted for easier tracking.
If you don’t useautoFlush: "process", callprovider.forceFlush()/provider.shutdown()when your app shuts down.