# Langsmith-sdk: Client SDK for LLM Debugging, Evaluation, and Monitoring

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/langchain-ai-langsmith-sdk
Generated for open source discovery and AI-assisted research.

The Langsmith-sdk provides client SDKs for interacting with the LangSmith platform, enabling robust debugging, evaluation, and monitoring of language models and intelligent agents. It offers native integrations with both LangChain Python and LangChain JS, making it an essential tool for LLM application development.

GitHub: https://github.com/langchain-ai/langsmith-sdk
OSRepos URL: https://osrepos.com/repo/langchain-ai-langsmith-sdk

## Summary

The Langsmith-sdk provides client SDKs for interacting with the LangSmith platform, enabling robust debugging, evaluation, and monitoring of language models and intelligent agents. It offers native integrations with both LangChain Python and LangChain JS, making it an essential tool for LLM application development.

## Topics

- evaluation
- language-model
- observability
- Python
- JavaScript
- LLM development
- AI tools
- LangChain

## Repository Information

Last analyzed by OSRepos: Wed Mar 18 2026 17:01:59 GMT+0000 (Western European Standard Time)
Detail views: 3
GitHub clicks: 6

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The `langsmith-sdk` repository hosts the official Python and JavaScript SDKs for seamless interaction with the [LangSmith platform](https://smith.langchain.com/). Developed and maintained by [LangChain](https://langchain.com/), the company behind the popular LangChain framework, LangSmith is designed to help teams debug, evaluate, and monitor their language models and intelligent agents. It integrates natively with both [LangChain Python](https://github.com/langchain-ai/langchain) and [LangChain JS](https://github.com/langchain-ai/langchainjs) open-source libraries, supporting any LLM application.

## Installation

Getting started with the `langsmith-sdk` is straightforward for both Python and JavaScript environments.

### Python

To install the Python SDK, use pip:

bash
pip install -U langsmith


Then, set up your environment variables:

bash
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=ls_...
export LANGSMITH_WORKSPACE_ID=<your-workspace-id> # Required for org-scoped keys


### JavaScript / TypeScript

To install the JavaScript/TypeScript SDK, use yarn or npm:

bash
yarn add langsmith
# or npm install langsmith


And configure your environment:

bash
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=ls_...
export LANGSMITH_WORKSPACE_ID=<your-workspace-id> # Required for org-scoped keys


## Examples

Once installed and configured, you can start tracing your LLM applications.

### Python Example

python
import openai
from langsmith import traceable
from langsmith.wrappers import wrap_openai

client = wrap_openai(openai.Client())

client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello, world"}],
    model="gpt-3.5-turbo"
)


### JavaScript Example

javascript
import { OpenAI } from "openai";
import { traceable } from "langsmith/traceable";
import { wrapOpenAI } from "langsmith/wrappers";

const client = wrapOpenAI(new OpenAI());

await client.chat.completions.create({
  model: "gpt-3.5-turbo",
  messages: [{ content: "Hi there!", role: "user" }],
});


## Why Use LangSmith?

LangSmith is an invaluable tool for anyone developing with Large Language Models. It provides a comprehensive platform for:

*   **Debugging**: Quickly identify and resolve issues in your LLM applications.
*   **Evaluation**: Systematically assess the performance and quality of your models and agents.
*   **Monitoring**: Keep track of your LLM applications in production, ensuring optimal performance and detecting anomalies.

By offering these capabilities, LangSmith helps developers build more reliable, performant, and robust LLM-powered solutions.

## Links

*   **GitHub Repository**: [langchain-ai/langsmith-sdk](https://github.com/langchain-ai/langsmith-sdk)
*   **LangSmith Platform**: [smith.langchain.com](https://smith.langchain.com/)
*   **LangSmith Documentation**: [docs.smith.langchain.com](https://docs.smith.langchain.com/)
*   **LangSmith Cookbook**: [langchain-ai/langsmith-cookbook](https://github.com/langchain-ai/langsmith-cookbook/tree/main)
*   **LangChain Python**: [langchain-ai/langchain](https://github.com/langchain-ai/langchain)
*   **LangChain JS**: [langchain-ai/langchainjs](https://github.com/langchain-ai/langchainjs)