← all repositories
langchain-ai/langsmith-sdk

Trace LLM calls without chaining yourself to LangChain

Official client SDKs for piping LLM traces and evaluations into LangSmith, with or without LangChain.

1k stars Python LLMOps · Eval
langsmith-sdk
Velocity · 7d
+1.1
★ / day
Trend
steady
star history

What it does

This repository ships the official Python and JavaScript client SDKs for LangSmith, an observability platform for language models and agents. You wrap your existing OpenAI client—or any LLM call—with a decorator or thin wrapper, and the SDK pipes traces, errors, and usage stats to LangSmith for debugging and evaluation. It is maintained by the LangChain team but deliberately framework-agnostic.

The interesting bit

The SDK treats LLM observability like distributed tracing rather than a framework plugin. A single wrap_openai call or @traceable decorator is enough to start emitting spans, which means you can adopt it without rewriting your application around LangChain’s abstractions.

Key highlights

  • Supports both Python and TypeScript/JavaScript from a single repository
  • Native but optional integration with LangChain Python and LangChain JS
  • Works with any LLM application via thin wrappers around standard clients
  • Emits traces for debugging, evaluation, and monitoring through environment-driven configuration
  • Backed by the LangChain company, with a separate cookbook repo for advanced patterns

Caveats

  • The top-level README is a sparse landing page; real documentation hides in the Python and JavaScript subdirectories
  • Tracing is hard-wired to the LangSmith platform, so these libraries are client stubs for a commercial backend rather than standalone tools

Verdict

Pick this up if you are already using LangSmith and want low-friction instrumentation in Python or Node. If you are not bought into the platform, these SDKs are just well-built proprietary client libraries.

Frequently asked

What is langchain-ai/langsmith-sdk?
Official client SDKs for piping LLM traces and evaluations into LangSmith, with or without LangChain.
Is langsmith-sdk open source?
Yes — langchain-ai/langsmith-sdk is open source, released under the MIT license.
What language is langsmith-sdk written in?
langchain-ai/langsmith-sdk is primarily written in Python.
How popular is langsmith-sdk?
langchain-ai/langsmith-sdk has 1k stars on GitHub and is currently holding steady.
Where can I find langsmith-sdk?
langchain-ai/langsmith-sdk is on GitHub at https://github.com/langchain-ai/langsmith-sdk.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.