> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LangSmith

> Query LangSmith tracing projects, runs, datasets, and examples for LLM observability

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key from `LANGSMITH_API_KEY` is sent as the `x-api-key` header.
* **Docs**: [https://docs.langchain.com/langsmith/create-account-api-key](https://docs.langchain.com/langsmith/create-account-api-key)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable            | Required | Description                                                                                                 |
| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| `LANGSMITH_API_KEY` | Yes      | LangSmith API key (starts with lsv2\_) [Docs](https://docs.langchain.com/langsmith/create-account-api-key). |

## Setup

1. **Create a LangSmith account**: Sign up at [https://smith.langchain.com](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.

* API keys are workspace-scoped; data from other workspaces is not visible to the key
* EU-region organizations use [https://eu.api.smith.langchain.com](https://eu.api.smith.langchain.com) - these tools target the default US endpoint
* Query Runs filter expressions are documented at [https://docs.langchain.com/langsmith/trace-query-syntax](https://docs.langchain.com/langsmith/trace-query-syntax)

Provider API reference: [https://api.smith.langchain.com/redoc](https://api.smith.langchain.com/redoc)

## Tools

| Tool          | Access | Description                                                                        |
| ------------- | ------ | ---------------------------------------------------------------------------------- |
| List Projects | Read   | List tracing projects (tracer sessions) in your LangSmith workspace                |
| Query Runs    | Read   | Query traced runs with filters (project, trace filter expressions, root runs only) |
| Get Run       | Read   | Get full details of a single run, including inputs, outputs, and errors            |
| List Datasets | Read   | List evaluation datasets in your LangSmith workspace                               |
| List Examples | Read   | List 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.
