# LangSmith

> A tool from LangChain that records, tests and watches LLM apps.

**Field:** Software Development  
**Category:** AI Engineering  
**Also known as:** LangSmith Observability, LangSmith Tracing

## Think of it like

It is like a black box on a plane. After a bad trip, you can see what happened.

## Definition

LangSmith is a platform from LangChain for tracing, testing and watching LLM apps. Each run of your app becomes a trace, with every model call and tool step inside. You turn it on with two settings: LANGSMITH_TRACING set to true, and your key. It works with many frameworks, not only LangChain. It also has tests, dashboards and alerts, in the cloud or on your own servers.

## Example

Emma's agent gives a wrong refund amount. In LangSmith she opens that run's trace and sees that a tool returned last year's price.

## Example code

```bash
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY="<your-langsmith-api-key>"
```

Two settings turn tracing on. Each run then shows up in your project.

## Why it matters

An LLM app can fail in many quiet ways. A trace shows the exact step that went wrong, so you do not have to guess.

## Common mistake

Thinking it only works with LangChain. It traces plain code and other frameworks too, through its own code kit.

## Three principles

- **Traces.** Every step of a run.
- **Evaluations.** Score runs against tests.
- **Any framework.** Not only for LangChain.

## Related terms

- [LLM Observability](https://learn.benibix.com/term/development/llm-observability)
- [Langfuse](https://learn.benibix.com/term/development/langfuse)
- [LangChain](https://learn.benibix.com/term/development/langchain)
- [LangGraph](https://learn.benibix.com/term/development/langgraph)
- [LLM Evaluation](https://learn.benibix.com/term/ai/llm-evaluation)
- [Prompt Versioning](https://learn.benibix.com/term/development/prompt-versioning)
- [Distributed Tracing](https://learn.benibix.com/term/infrastructure/distributed-tracing)

## Told apart from

- [LangSmith vs Langfuse](https://learn.benibix.com/compare/langsmith-vs-langfuse): People think LangSmith and Langfuse are one tool, because the names sound alike and both trace and test LLM apps. LangSmith comes from LangChain, the team behind the LangChain framework. Langfuse is a separate project with open code, free to run on your own servers. Both record each step of a run, keep prompts and score answers.

![A trace of one user request, drawn as a timeline. It shows the retrieval step, two model calls and a tool call, each with its time, tokens and cost.](https://learn.benibix.com/diagrams/dev-llm-observability.svg)

---

Source: https://learn.benibix.com/term/development/langsmith
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
