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

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

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

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.

Repository Information

Analyzed by OSRepos on March 18, 2026

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

The langsmith-sdk repository hosts the official Python and JavaScript SDKs for seamless interaction with the LangSmith platform. Developed and maintained by LangChain, 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 and LangChain JS 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:

pip install -U langsmith

Then, set up your environment variables:

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:

yarn add langsmith
# or npm install langsmith

And configure your environment:

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

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

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

Related repositories

Similar repositories that may be relevant next.

Source repository

Open the original repository on GitHub.

6 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️