Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
LANGSMITH_API_KEYYesLangSmith API key (starts with lsv2_) Docs.

Setup

  1. Create a LangSmith account: Sign up at https://smith.langchain.com - the free Developer plan includes traces for testing.
  2. Create an API key: In LangSmith go to Settings → API Keys and create a key (Personal Access Token or Service Key). Copy it immediately - it is only shown once.
  3. Store the key: Add it to your .env file as LANGSMITH_API_KEY=lsv2_…
  4. Verify access: Run the List Projects tool. If you belong to multiple workspaces, make sure the key was created in the workspace you want to query.
Provider API reference: https://api.smith.langchain.com/redoc

Tools

ToolAccessDescription
List ProjectsReadList tracing projects (tracer sessions) in your LangSmith workspace
Query RunsReadQuery traced runs with filters (project, trace filter expressions, root runs only)
Get RunReadGet full details of a single run, including inputs, outputs, and errors
List DatasetsReadList evaluation datasets in your LangSmith workspace
List ExamplesReadList examples in a LangSmith dataset

Example prompts

  • Query my LangSmith projects for recent runs with errors and summarize what went wrong.
  • List my LangSmith tracing projects with their run counts and last activity.