Jev in n8n: a node for TypeSafe's decision model, traced in Langfuse

TypeSafe released Jev on OpenRouter two days ago, the first of their “System One” models. It does not generate text: you give it a state and a set of typed questions, and it answers with a label or a probability, calibrated.

There is no node for that in n8n, so the usual workaround is an HTTP Request. It works, but it leaves the call outside your observability.

I maintain n8n-nodes-agent-langfuse, and 0.7.0 adds a second node for exactly this.

Decision Agent + Langfuse

  • Takes a state and a list of questions: yes/no, a choice between labelled options, or a score over ordered levels.
  • Returns each answer flattened onto the item, plus the raw probabilities and confidence, so you can branch with a plain IF node.
  • Traces to Langfuse as a generation with the model, the input, the answers and the token usage.
  • Records the cost the provider reported, not an estimate. Langfuse honours a provided cost over its own price table, so the number on your dashboard is the one that was billed.
  • Reuses n8n’s own OpenRouter credential, so there is no second key to manage.

The trace, with latency, session, environment and the provider’s cost on the same line:

Numbers from my own pipeline, 31 real cases against an LLM agent doing the same job: 87 ms per decision instead of 2965 ms, and 4.3x cheaper. Yours will differ, but the order of magnitude is the point: a classification does not need a chat model.

Two things to know before you try it

  • These models are not deterministic, and there is no temperature to turn down. On a 40 case set, repeating the same request changed 6 answers. Confidence predicts that well: above 0.7, none of 25 answers changed; below it, 40 percent did. A hybrid works, decide with the model above a threshold and fall back to an LLM below it. That is what the Confident enough? branch does in the first screenshot.
  • The endpoint is alpha (/api/alpha/decisions). Pin the model version and keep a fallback path.

The other node in the package

AI Agent + Langfuse is a drop-in for the native AI Agent when you want Langfuse in the loop. There are several ways to get Langfuse into n8n and telling them apart is genuinely confusing, so:

Option What it does
Official @langfuse/n8n-nodes-langfuse Fetches a prompt. No agent, no tracing.
OpenAI + Langfuse chat-model nodes Traces an OpenAI model call. OpenAI only.
OpenTelemetry instrumentation Traces whole workflows at the container level.
n8n-nodes-agent-langfuse Runs the tool-calling agent, pulls its prompt from Langfuse, and traces it, on any model.

It lists your Langfuse chat prompts in a dropdown, takes model and temperature from the prompt config, and links each generation to the prompt version. Built on LangChain 1.x, the major modern n8n ships, so tool calling works. Complementary to n8n’s native OpenTelemetry: workflow spans there, generation detail here.

Install

Settings → Community Nodes → n8n-nodes-agent-langfuse. Published with SLSA provenance.

Feedback and issues welcome.