LANGFUSE SA DEEP DIVE
keys: ... model: ... session: ...
NOT EVERY "AGENT" IS THE SAME

Three control loops, three telemetry needs.

More autonomy means more surface area to evaluate. Run each loop, then open the exact trace in Langfuse to see what was captured. Every loop runs on your own OpenAI and Langfuse keys, which you paste in Setup.

00BRING YOUR OWN KEYS

Setup

  • All three keys are required: OpenAI, Langfuse public, Langfuse secret. Nothing runs until all three are in.
  • The keys stay in this browser tab. They are sent with each request and are not stored on the server.
  • Closing the tab discards them.
  • The Langfuse secret key grants full read and write on that Langfuse project. Know what you are pasting.
Why all three: tracing is this demo, and your own Langfuse keys are what keep your prompts in your project. The Langfuse SDK patches the OpenAI client for the whole server process, so a run carrying no Langfuse key of its own can be exported into whichever project the server has open, meaning another visitor's. Requiring the pair makes that unreachable.

Pays for every model call in the three loops.

Pins every model call to your project. Only usable as a pair with the secret key.

Full read and write on that Langfuse project.

The server accepts these hosts only.

A listed model may not be enabled on your account. Type one that is, and it wins over the list. Letters, digits and . _ : - only, up to 64 characters.

01DETERMINISTIC

Workflow

  • Predefined steps
  • Limited branching
  • Easier to replay and test
Trace key steps + outputs

A fixed pipeline: classify - route - draft reply - guardrail. Same steps every run.

Run the workflow to see the control loop and its trace.
02MODEL-DIRECTED

Agent

  • Model chooses next action
  • Tool calls and state
  • Harder to evaluate
Trace decisions, tools, context, scores

The model decides which tools to call (orders, knowledge base, refund policy) and when to answer.

Run the agent to watch it decide which tools to call.
03SIDE-EFFECTING

Coding agent

  • Files, shell, sandbox
  • Real side effects
  • Approval gates & rollbacks
Trace commands, diffs, approvals, outcomes

Edits sandbox/pricing.py. Proposes a diff, then waits for your approval before writing.

Propose a change to see the diff and the approval gate.