Archived on GitHubThe repository langchain-ai/langsmith-sdk is read-only: no more fixes or releases. Check an alternative before starting a new project with it.
Used in agent projects
20
1.2% of 1,622 Python repos built with AI coding agents
Gid Score
62 /100
#601 of 3,794 tools, #5 in prompts, structured output and evals · ranking
Rank in prompts, structured output and evals
#4 of 72
by use in those projects
Downloads
20.7M
PyPI, last 7 days, langsmith
GitHub stars
1,081
313 forks · last push Oct 16, 2026
How LangSmith is used
LangSmith is a dependency in 20 of the 6,208 public GitHub projects set up for AI coding agents that we scanned (1.2% of the 1,622 Python ones), #4 of 72 in prompts, structured output and evals. Counting the projects our scan samples by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983), it appears in 626; those are left out of every share on this page. The most used alternative in our scan is Langfuse (Python) (15 projects). Projects that use it most often also use LangChain (85.0%), LangGraph (80.0%), Pydantic (75.0%).
Share of public repos configured for each agent that list LangSmith as a dependency.
What LangSmith projects add to it
Share of the 20 public projects built with AI coding agents that use LangSmith and also depend on each package. From our scan of 6,208 repos, updated Oct 20, 2026.
## LangSmith
- Install with <code>pip install -U langsmith</code> (Python) or <code>pnpm add langsmith</code> (JS/TS).
- Turn tracing on through environment variables: <code>LANGSMITH_TRACING=true</code> and <code>LANGSMITH_API_KEY</code>. Read the key from the environment and never hard-code it.
- Set <code>LANGSMITH_WORKSPACE_ID</code> when the API key is org-scoped.
- In Python, wrap the OpenAI client with <code>wrap_openai</code> from <code>langsmith.wrappers</code>, and import <code>traceable</code> from <code>langsmith</code>.
- In JS, import <code>traceable</code> from <code>langsmith/traceable</code> and <code>wrapOpenAI</code> from <code>langsmith/wrappers</code>.
- API keys come from Settings > API Keys in LangSmith. For other questions, fetch the docs index at <code>/llms.txt</code>.
Minimal code example: trace openai calls in python
LangSmith is a platform from LangChain for debugging, evaluating and monitoring language-model apps and agents. The langsmith package on PyPI is the client SDK for that platform. The same MIT-licensed repository also holds the JavaScript SDK. The README says LangSmith "works with any LLM Application" and has a native integration with LangChain for Python and JS.
Setup is mostly configuration. You set LANGSMITH_TRACING=true and an API key, then wrap your model client. The README's example wraps the OpenAI client with wrap_openai and also imports a traceable helper. Traces go to the LangSmith platform. The docs call them "the record of what your agents did in production", used to debug failures, monitor quality and build evaluation datasets.
The README pitches it at teams who need to debug, evaluate and monitor models and agents. To use it you need a LangSmith account and an API key. The docs list cloud, hybrid and self-hosted setups. [1][4]
Why teams pick it
Tracing turned on with environment variables. The quick start is one install and three exported variables: LANGSMITH_TRACING, LANGSMITH_API_KEY and, for org-scoped keys, LANGSMITH_WORKSPACE_ID. After that you wrap your client. [1]
Integrations beyond LangChain. The docs list integrations for OpenAI, Anthropic, CrewAI, Vercel AI SDK and Pydantic AI, among others. The README's own example traces a plain OpenAI client. [4]
Traces feed the eval datasets. The docs tie observability and evaluation together. The traces you collect are meant to become the datasets you evaluate against. [4]
Dashboards, alerts and online evaluations. Beyond viewing traces, the docs describe dashboards, alerts, and automations driven by rules, webhooks and online evaluations. [4]
Cloud, hybrid or self-hosted. The docs say every hosting option includes observability, evaluation, prompt engineering and deployment. [4]
Python and JS SDKs in one repo. Both SDKs live in the same repository and follow the same pattern: traceable plus an OpenAI wrapper. [1]
Know before you start
Needs a LangSmith account and API key. The SDK talks to the LangSmith platform, so you sign up and create an API key first. The docs say no credit card is required to sign up. [4]
Trace pricing and retention limits. The docs point to a separate billing page for trace pricing, retention and limits. Read it before sending production traffic. [4]
Built by LangChain. The README says LangSmith is developed and maintained by LangChain, the company behind the LangChain framework. The SDK repository is MIT-licensed. [1]
Customer stories come from the vendor's blog. Both case studies below are published on LangChain's own site. The Schneider Electric piece is a guest post on that blog. [5]
Built with LangSmith
Real uses, from the builders' own posts
Schneider Electric AI Platform team
Self-hosted LangSmith across 60+ AI products
The question
The team writes that their traditional MLOps approaches did not translate to LLM-based systems. That left them with limited ability to debug agent behavior beyond raw application logs and no precise measurement of prompt or model changes.
What they built
LangSmith self-hosted on AWS EKS behind the corporate security perimeter, with one workspace per AI product spanning dev to prod. They also built an evaluation CLI on the LangSmith SDK, with evaluators built on openevals patterns, and a custom role that gives subject-matter experts access to annotation queues and datasets.
Result
Every conversation of the internal assistant One Jo is traced. In that section the post says One Jo serves 160,000 employees in 107 countries; the intro gives 140,000 employees in 100+ countries. About 20% of their AI products have at least one active annotation queue with SME participation.
The post says reproducing the orchestration, deployment, monitoring and observability infrastructure for enterprise-grade agents would have required over a year of development.
What they built
Live Intelligence Studio, built on LangChain, with agent observability through LangSmith. A three-layer evaluation in production covers RAG quality, agent behavior and trace monitoring. Per-environment prompt versions are kept in LangSmith Context Hub.
Result
The post says the system improved operational efficiency across teams and gave engineers and SMEs a shared workflow for agent development.
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside LangSmith are not listed here; they are in "Often used with".
Description written by AgentGid from these official pages, checked Oct 14, 2026. Usage numbers come from our own scan. Claims by the maintainers are quoted, not tested by us.