← Back to articles Blog

LangSmith: LangChain's Observability Platform Explained

Emmanuel Ekunsumi · 5 min read · 2026-07-27

LangSmith is LangChain's observability and evaluation platform for LLM applications. It provides tracing, debugging, evaluation, and monitoring specifically designed around LangChain and LangGraph applications, though it also works with non-LangChain LLM calls via its SDK.

What LangSmith does

LangSmith vs Tokoscope vs other observability tools

LangSmithTokoscopeHelicone
Primary focusChain/agent tracing & evalsToken cost & optimizationProxy-based logging
LangChain integrationNative (built by LangChain)Works alongside any frameworkWorks alongside any framework
Semantic cachingNoYesNo
Prompt compressionNoYesNo
Budget alertsLimitedYes (email/Slack/webhook)Limited
Evaluation datasetsYes — strong featureNoNo
Free tier5K traces/monthYesYes

LangSmith and Tokoscope solve different problems and are often used together: LangSmith for understanding what happened inside a complex chain, Tokoscope for understanding what it costs and automatically reducing that cost through caching and compression.

Getting started with LangSmith

pip install langsmith

import os
os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_API_KEY"] = "YOUR_LANGSMITH_KEY"

# Any LangChain or LangGraph code now automatically traces to LangSmith
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o")
response = llm.invoke("Hello")  # this call is now traced

Using LangSmith without LangChain

LangSmith also works with raw API calls via decorators, for teams not using the LangChain framework:

from langsmith import traceable

@traceable
def my_llm_call(prompt):
    return client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": prompt}]
    )

When you need LangSmith vs when you don't

Add cost optimization alongside your tracing stack

Tokoscope handles token cost tracking, semantic caching, and prompt compression — pairs well with LangSmith's tracing. Free to start.

Get started free →