{"name":"Langsmith-sdk: Client SDK for LLM Debugging, Evaluation, and Monitoring","description":"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","url":"https://osrepos.com/repo/langchain-ai-langsmith-sdk","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/langchain-ai-langsmith-sdk","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/langchain-ai-langsmith-sdk.md","json":"https://osrepos.com/repo/langchain-ai-langsmith-sdk.json","topics":["evaluation","language-model","observability","Python","JavaScript","LLM development","AI tools","LangChain"],"keywords":["evaluation","language-model","observability","Python","JavaScript","LLM development","AI tools","LangChain"],"stars":null,"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.","content":"## Introduction\n\nThe `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.\n\n## Installation\n\nGetting started with the `langsmith-sdk` is straightforward for both Python and JavaScript environments.\n\n### Python\n\nTo install the Python SDK, use pip:\n\nbash\npip install -U langsmith\n\n\nThen, set up your environment variables:\n\nbash\nexport LANGSMITH_TRACING=true\nexport LANGSMITH_API_KEY=ls_...\nexport LANGSMITH_WORKSPACE_ID=<your-workspace-id> # Required for org-scoped keys\n\n\n### JavaScript / TypeScript\n\nTo install the JavaScript/TypeScript SDK, use yarn or npm:\n\nbash\nyarn add langsmith\n# or npm install langsmith\n\n\nAnd configure your environment:\n\nbash\nexport LANGSMITH_TRACING=true\nexport LANGSMITH_API_KEY=ls_...\nexport LANGSMITH_WORKSPACE_ID=<your-workspace-id> # Required for org-scoped keys\n\n\n## Examples\n\nOnce installed and configured, you can start tracing your LLM applications.\n\n### Python Example\n\npython\nimport openai\nfrom langsmith import traceable\nfrom langsmith.wrappers import wrap_openai\n\nclient = wrap_openai(openai.Client())\n\nclient.chat.completions.create(\n    messages=[{\"role\": \"user\", \"content\": \"Hello, world\"}],\n    model=\"gpt-3.5-turbo\"\n)\n\n\n### JavaScript Example\n\njavascript\nimport { OpenAI } from \"openai\";\nimport { traceable } from \"langsmith/traceable\";\nimport { wrapOpenAI } from \"langsmith/wrappers\";\n\nconst client = wrapOpenAI(new OpenAI());\n\nawait client.chat.completions.create({\n  model: \"gpt-3.5-turbo\",\n  messages: [{ content: \"Hi there!\", role: \"user\" }],\n});\n\n\n## Why Use LangSmith?\n\nLangSmith is an invaluable tool for anyone developing with Large Language Models. It provides a comprehensive platform for:\n\n*   **Debugging**: Quickly identify and resolve issues in your LLM applications.\n*   **Evaluation**: Systematically assess the performance and quality of your models and agents.\n*   **Monitoring**: Keep track of your LLM applications in production, ensuring optimal performance and detecting anomalies.\n\nBy offering these capabilities, LangSmith helps developers build more reliable, performant, and robust LLM-powered solutions.\n\n## Links\n\n*   **GitHub Repository**: [langchain-ai/langsmith-sdk](https://github.com/langchain-ai/langsmith-sdk)\n*   **LangSmith Platform**: [smith.langchain.com](https://smith.langchain.com/)\n*   **LangSmith Documentation**: [docs.smith.langchain.com](https://docs.smith.langchain.com/)\n*   **LangSmith Cookbook**: [langchain-ai/langsmith-cookbook](https://github.com/langchain-ai/langsmith-cookbook/tree/main)\n*   **LangChain Python**: [langchain-ai/langchain](https://github.com/langchain-ai/langchain)\n*   **LangChain JS**: [langchain-ai/langchainjs](https://github.com/langchain-ai/langchainjs)","metrics":{"detailViews":3,"githubClicks":6},"dates":{"published":null,"modified":"2026-03-18T17:01:59.000Z"}}