Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesLangChain LangSmith vs Langfuse for production agent debugging: step-level traces (tools/sub-agents/memory), datasets, and regression testing
Most teams don’t hit real pain with agents until they’re already in production: long prompts, nested tool calls, sub-agents, memory updates, and multi-turn threads pile up. When something goes wrong—a hallucinated answer, an infinite loop, or a subtle policy violation—you need to replay exactly what happened, at the step level, and compare it against previous behavior. That’s where LangSmith and Langfuse start to look similar on the surface, but behave very differently once you’re debugging serious agents, not single-shot prompts.
Quick Answer: LangSmith is a trace-first agent engineering platform optimized for multi-step, multi-agent, tool-heavy workflows with integrated datasets and regression-grade evals. Langfuse is a strong observability + logging tool for LLM calls and simple chains. If your main problem is production agent debugging with step-level traces, curated datasets from real runs, and systematic regression testing, LangSmith is built for that lifecycle end-to-end.
The Quick Overview
-
What It Is:
A comparison of LangSmith and Langfuse focused on production agent debugging—specifically step-level traces (tools, sub-agents, memory), turning traces into datasets, and running regression tests before and after changes. -
Who It Is For:
Teams shipping real agents into production: retrieval-augmented workflows, multi-tool copilots, back-office automations, and multi-turn assistants where silent failures are worse than loud ones. -
Core Problem Solved:
You can’t fix what you can’t replay. The core problem is understanding exactly what an agent did—across tools, sub-agents, and memory—then turning those traces into datasets and evals you can rely on for regression testing.
How It Works
Both LangSmith and Langfuse start with instrumentation, but they diverge on what they treat as the “unit of truth” and how far they go beyond raw logs.
- Langfuse focuses on logging LLM calls, prompts, and metrics, then aggregating them into dashboards and simple evaluations.
- LangSmith treats traces—structured execution trees across tools, agents, and threads—as the primary record of behavior, and then builds workflows on top: datasets from traces, annotation queues, multi-turn evals, and deployment with exactly-once execution.
In practice, a typical lifecycle with LangSmith looks like this:
-
Instrument & Trace:
Wire LangSmith into any stack (LangChain, LangGraph, OpenAI SDK, Anthropic, custom code, or via OpenTelemetry). Every run becomes a high-fidelity trace showing the full execution tree: tool calls, sub-agents, retrieved documents, memory updates, and intermediate decisions. -
Turn Traces into Datasets:
Select representative production traces—successes and failures—and convert them into versioned datasets. Non-technical reviewers can annotate traces, label outcomes, and add corrections. These datasets become your benchmark suite. -
Evaluate & Regression-Test:
Run offline and online evals (including multi-turn, LLM-as-judge calibrated with human feedback) against those datasets. Compare versions side-by-side, catch regressions before rollout, and continually refine evaluators using Align Evals and human feedback loops.
Langfuse can participate in pieces of this workflow (instrumentation, logging, basic evals), but LangSmith is explicitly designed as a unified agent engineering loop: Build → Observe → Evaluate → Deploy, with traces as the backbone.
Step-Level Traces: Tools, Sub-Agents, and Memory
What “step-level” really needs to mean
For simple apps, step-level tracing is just “show me the prompts and responses.” For serious agents, step-level means:
- Seeing the full execution tree of an agent run
- Inspecting each tool call: arguments, responses, errors
- Following sub-agent invocations and branches
- Tracking memory writes and reads over time
- Reconstructing multi-turn threads in order
This is the main place where LangSmith and Langfuse diverge in philosophy and depth.
LangSmith: Trace-first view of agents
LangSmith’s core primitive is the run trace:
-
Execution tree:
Every agent run is a hierarchical tree:- Root: the user request or top-level agent
- Children: tool calls, sub-agents, retrievers, models, and custom functions
- Leaves: raw model calls, database hits, HTTP calls, etc.
-
Full parameter visibility:
For each step, you see:- Inputs: prompts, tool arguments, memory state
- Outputs: model completions, tool responses, retrieved docs
- Metadata: timing, tokens, cost, environment, version, tags
-
Sub-agents & branching:
Multi-agent systems and LangGraph-style workflows render clearly:- Which agent took which step
- How control passed between nodes or agents
- Where loops or retries occurred
-
Memory & threads:
LangSmith models:- Message threads for multi-turn chat, with each message tied back to the trace step that produced it
- Memory updates as traceable operations (e.g., “write to vector store,” “update conversation state”), so you can see when and why context changed
This is designed for “agents as stateful systems,” not just “LLM as function.”
Langfuse: Strong logging, less opinionated about agents
Langfuse gives you:
- Logs for model calls, including prompts and completions
- Grouping of events into sessions or traces
- Basic tree structures via spans or nested events
Where it tends to be lighter is:
- No first-class notion of agent runs vs tool runs vs threads as separate but linked concepts
- Less opinionated support for multi-agent, graph-based, or deeply nested tool workflows
- Memory updates treated as another logged event rather than a core primitive you can reason about across runs
If your architecture is mostly:
- Single LLM call per request, or
- A short chain of calls with a couple of tools
Langfuse’s tracing is usually enough. Once you move into long-running, branching agents, you’ll typically find LangSmith’s execution tree and message-thread modeling more suitable for debugging.
Datasets from Production Traces
Why datasets from traces matter
Static, hand-written test cases don’t survive contact with real users. To prevent regressions in agents, you want:
- Real edge cases from production
- Enough diversity to cover tools, sub-agents, and memory usage
- Ground truth labels and corrections from subject matter experts
- A way to version these as datasets tied to code and prompt versions
LangSmith: Traces → Datasets → Evals
LangSmith is built to turn observability into eval fuel:
-
Convert traces into datasets:
From any set of runs, you can:- Filter by tag, route, tool usage, error type, or score
- Select runs and save them as a dataset
- Store inputs, outputs, intermediate context, and metadata
-
Annotation Queues for non-engineers:
Subject matter experts can:- Review full traces in the browser
- Rate output quality (e.g., correctness, policy, tone)
- Add corrections, rationales, and notes
- Label complex multi-step traces, not just single calls
This feedback is stored structurally and feeds directly into evaluation datasets.
-
Align Evals (human-calibrated evaluators):
You can:- Train LLM-as-judge evaluators using human-labeled examples
- Calibrate thresholds and scoring rubrics to match domain expectations
- Iterate until evaluator scores correlate with human judgments
-
Dataset versioning and reuse:
Datasets are first-class objects:- Versioned and reusable across experiments
- Linked to prompts, model configurations, and deployments
- Usable for offline evals, regression checks, and benchmarking
The workflow is: observe → sample traces → annotate → build dataset → calibrate evaluators → keep reusing.
Langfuse: Logging with basic evaluation
Langfuse offers:
- Storage of events that can be exported and repurposed as datasets
- Basic quality metrics, user feedback, and evaluations
- Some workflow to aggregate logs and score outputs
Where it’s more limited is:
- No deep, built-in “traces → datasets” pipeline as a core workflow
- Less structured support for multi-turn or multi-step datasets (where you care about the entire agent run, not just a single LLM call)
- No first-class equivalent of Align Evals to calibrate LLM-as-judge with human labels
You can build your own dataset tooling on top of Langfuse exports, but you’ll be wiring workflows yourself. LangSmith ships those workflows as part of the platform.
Regression Testing and Eval Workflows
What regression testing looks like for agents
Regression testing an agent is more than “did the model error less?” You typically need:
-
Offline evals on a fixed dataset every time you change:
- Model versions
- Prompts
- Tooling / retrieval logic
- Orchestration logic (graphs, policies, routing)
-
Online evals on sampled production traffic:
- Can we detect silent failures?
- Did performance drift after last deploy?
- Are new features breaking edge cases?
-
Multi-turn and multi-step awareness:
- Score an entire conversation or agent run
- Judge tool selection and memory usage, not just final answer text
LangSmith: Evaluations as part of the loop
LangSmith treats evals as a core lifecycle stage:
-
Offline evals on datasets:
- Run models or agents against any dataset (often derived from production traces)
- Use:
- Simple metrics (exact match, ROUGE, etc.)
- LLM-as-judge evaluators
- Custom Python/TypeScript evaluators
- Support for multi-turn and multi-step evals (e.g., “did the agent ask the right clarifying questions?”)
-
Align Evals & human-calibrated scoring:
- Take human-labeled examples and:
- Train evaluators to mimic domain experts
- Validate evaluator reliability before trusting scores
- Ideal for nuanced domains: legal, financial, medical, policy-heavy workflows
- Take human-labeled examples and:
-
Regression comparison & experiment tracking:
- Compare experiment runs side-by-side:
- Old vs new prompts
- Model A vs model B
- Retrieval strategy changes
- Visualize:
- Score deltas
- Failure clusters
- Which dataset items regressed and why (clickable back to traces)
- Compare experiment runs side-by-side:
-
Online evals on production:
- Score sampled production runs
- Route bad runs into annotation queues
- Feed human corrections back into datasets
This closes the loop: production traces → datasets → evals → deploy → production traces again.
Langfuse: Evaluations layered on observability
Langfuse provides:
- Metrics and dashboards around LLM calls and sessions
- Support for some evaluations and scoring
- Feedback capture from end users
But:
- Evals are an add-on to logging, not the backbone of a trace-to-dataset-to-eval loop
- Multi-turn and multi-step agent-level evaluation is possible but less opinionated and less integrated
- Regression testing workflows (exporting datasets, rerunning, comparing) require more custom plumbing
If your eval needs are light—e.g., track a couple of metrics on single-turn calls—Langfuse can be enough. If you need full regression campaigns across complex agent behavior, LangSmith is purpose-built.
Production Debugging: Practical Differences
When an agent breaks in production
Imagine:
- A retrieval-augmented assistant starts giving outdated answers
- A back-office automation agent occasionally skips a validation tool
- A multi-agent workflow loops between two agents for 15 minutes
- A memory-augmented copilot violates policy on long-running threads
With LangSmith, you can:
-
Locate the run quickly:
- Filter traces by:
- Route/agent
- Error flag
- User feedback score
- Tool usage or model
- Jump into the exact trace behind a bad session
- Filter traces by:
-
Replay the execution tree:
- See the full step-by-step timeline
- Inspect each tool/sub-agent call:
- Inputs: what the agent thought was true at that step
- Outputs: what the tool/LLM actually returned
- Check memory:
- When did the wrong context get written?
- Which step polluted or lost state?
-
Turn it into a test:
- Add this trace to a dataset
- Label the expected behavior
- Make it part of your regression suite so it never slips again
With Langfuse, you’ll:
- Find the session via logs and dashboards
- Inspect prompts and outputs (and possibly tool events)
- Manually extract the scenario into your own testing framework
Both can help you debug; LangSmith is optimized to operationalize that debug session into a reusable test artifact.
Features & Benefits Breakdown
| Core Feature | What It Does | Primary Benefit |
|---|---|---|
| Trace-first, execution-tree runs (LangSmith) | Captures full agent execution across tools, sub-agents, and memory | Lets you see exactly what happened, in what order, and why, for complex agents |
| Traces → Datasets workflow (LangSmith) | Converts production traces into versioned evaluation datasets | Turns real-world behavior into reusable tests and benchmarks |
| Annotation Queues & Align Evals (LangSmith) | Lets SMEs label traces and calibrate LLM-as-judge evaluators | Produces reliable, domain-specific evaluators for regression testing |
| LLM and agent observability (Langfuse) | Logs all LLM calls and aggregates metrics | Gives teams quick visibility into usage, latency, and basic quality patterns |
| Basic eval and feedback capture (Langfuse) | Adds scoring and user feedback on logged events | Provides lightweight quality indicators without building a separate system |
| Framework-agnostic tracing & SDKs (Both) | Integrates with OpenAI SDKs, Anthropic, LangChain, LangGraph, custom stacks | Lets you instrument existing agent stacks without rewriting your architecture |
Ideal Use Cases
-
Best for teams building complex, long-running agents:
LangSmith is ideal when you:- Have multi-step, tool-heavy, or multi-agent workflows
- Care about memory, threads, and human-in-the-loop corrections
- Want systematic regression testing tied to production traces
Because LangSmith turns traces into datasets and calibrated evals, and includes deployment primitives like durable checkpointing and exactly-once execution for serious agents.
-
Best for teams monitoring LLM calls and simple chains:
Langfuse is a good fit when you:- Mainly need logging, metrics, and simple evals around prompts and completions
- Have short-lived flows with limited tool usage
- Are comfortable building your own dataset and regression tooling on top of logs
Because Langfuse provides strong observability basics at the request/session level without imposing an agent-centric workflow.
Limitations & Considerations
-
LangSmith requires a trace-first mental model:
If you only care about single LLM calls, the execution-tree view might feel heavier than necessary. The upside is that as you add tools, memory, and sub-agents, you don’t need to replatform. -
Langfuse is less opinionated about agent workflows:
You’ll need to design your own “traces → datasets → evals” flow and may hit limits for multi-turn, multi-agent regression testing. It’s a good toolbox, less of a full agent engineering loop.
Other practical considerations:
-
Framework agnosticism:
Both can work with any framework; LangSmith is explicitly documented as framework-agnostic and integrates with LangChain, LangGraph, OpenAI SDK, Anthropic, custom stacks, and OpenTelemetry. -
Enterprise posture:
LangSmith emphasizes enterprise deployment options (US/EU data residency, hybrid, self-hosted), RBAC/ABAC, SSO/SAML, SCIM, audit logs, encryption, and a clear data policy: LangSmith does not use your data to train models. Evaluate Langfuse’s deployment options similarly if you’re in a regulated environment.
Pricing & Plans
Pricing evolves, but the pattern is:
-
LangSmith:
- Plans for teams of any size, from individual builders up through enterprises
- Typically combines:
- Seat-based pricing for collaborators and reviewers
- Pay-as-you-go or tiered pricing for traces/runs and retention
- Higher tiers unlock:
- Longer retention (e.g., moving from a base window to extended 400-day-style retention)
- Enterprise deployment options (VPC, hybrid, self-hosted)
- Enterprise security controls and admin features
-
Langfuse:
- Metered by volume of logged events and storage
- Additional features by plan tier (e.g., longer retention, advanced analytics)
For the most accurate details, you should check each vendor’s current pricing page and match:
- Expected trace/log volume
- Retention requirements
- Enterprise/security needs
- Number of non-technical reviewers and annotators who’ll be in the loop
Example Plan Fit (Conceptual)
-
Builder / Team Plan (LangSmith):
Best for small teams and startups building their first real agent, needing:- Detailed traces and datasets
- Basic evals and experiment comparison
- Limited but sufficient retention for fast iteration
-
Enterprise Plan (LangSmith):
Best for larger orgs and Fortune-scale teams needing:- High-volume tracing (millions+ traces/day)
- Long retention and analytics on historical behavior
- Enterprise-grade deployment (US/EU, VPC, SSO/SAML, SCIM, RBAC/ABAC, audit logs)
Frequently Asked Questions
Does LangSmith only work with LangChain and LangGraph agents?
Short Answer: No. LangSmith is framework agnostic and works with any LLM framework or custom agent stack.
Details:
LangSmith integrates with:
- LangChain and LangGraph
- OpenAI SDK, Anthropic, and other provider SDKs
- Custom implementations via SDKs for Python, TypeScript, Go, and Java
- OpenTelemetry-based tracing so you can route LangSmith traces alongside your existing observability tools
The core idea is that LangSmith focuses on agent quality, not infrastructure health. Your APM stack monitors servers and latency; LangSmith monitors what the agent actually did and whether its outputs were correct, safe, and on-policy.
How does LangSmith handle high-volume production traffic?
Short Answer: LangSmith is built for enterprise-scale traffic and processes millions of traces per day.
Details:
LangSmith ingests over a billion events per day across customers and supports:
- High-volume tracing for large production workloads
- Efficient run storage and retrieval for long-running and multi-turn agents
- Analytics to spot patterns across millions of traces
- Deployment options that keep data residency and security in line with enterprise requirements
Real customers run serious workloads through it—like Klarna’s AI assistant reducing case resolution time by 80%, Podium cutting engineering escalations by 90%, and C.H. Robinson automating 5,500 orders per day. The platform is battle-tested for production scale.
Summary
If all you need is to log prompts and responses, track latency, and get some quick metrics, Langfuse is a solid observability option. But when your real challenge is production agent debugging—stepping through tool calls, sub-agents, and memory, turning real traces into datasets, and running regression-grade evals—LangSmith is built specifically for that loop.
LangSmith’s trace-first model gives you a complete execution tree for each run. Its datasets and evaluation workflows convert those traces into reproducible tests. And its deployment and enterprise capabilities let you ship agents that don’t just work in a demo, but stay reliable in production.
You can bring any framework, any model, and any agent architecture. The bet LangSmith makes is simple: traces, not just code, are how you understand and improve agents at scale.