Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1a7c980
docs(langsmith): remove the self-hosted split from agent docs
fjmorris Nov 7, 2026
e1b11be
docs(langsmith): finish removing project alternatives from agent docs
fjmorris Nov 7, 2026
8362002
docs(langsmith): name the Online Evaluators tab in agent environments
fjmorris Nov 8, 2026
d9a652e
docs(langsmith): match the evaluator spend widgets to the product
fjmorris Nov 8, 2026
a511809
docs(langsmith): describe spend limit stops by agent environment
fjmorris Nov 8, 2026
923a1c6
docs(langsmith): apply review and source verification findings
fjmorris Nov 8, 2026
cf9fd53
docs(langsmith): revise the self-hosted v0.18 agent migration page
fjmorris Nov 8, 2026
8f64270
docs(langsmith): fix and rename the create-an-agent tracing snippet
fjmorris Nov 11, 2026
c1365ec
docs(langsmith): link deployment and cut a repeat on the upgrade page
fjmorris Nov 11, 2026
eaba66a
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-1
fjmorris Nov 11, 2026
f248c8f
docs(langsmith): describe the project resource type in agent terms on…
fjmorris Nov 11, 2026
57cad83
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-1
fjmorris Nov 12, 2026
6f3184d
docs(langsmith): resolve upgrade page questions and fix alert steps
fjmorris Nov 13, 2026
212e267
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-1
fjmorris Nov 13, 2026
7221659
docs(langsmith): scrub project wording from retention, dashboards, an…
fjmorris Nov 14, 2026
6b6bd72
docs(langsmith): give the full Tracing path on evaluator, rule, and d…
fjmorris Nov 15, 2026
ae12937
docs(langsmith): scrub project wording from tracing plugins, tags, an…
fjmorris Nov 15, 2026
ffdb3b8
docs(langsmith): drop the agent-based workspace qualifier from --agen…
fjmorris Nov 15, 2026
2bb2525
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-1
fjmorris Nov 15, 2026
862e447
docs(langsmith): describe thread idle time as an agent environment se…
fjmorris Nov 15, 2026
422a394
docs(langsmith): reword the remaining project-scoped settings for age…
fjmorris Nov 16, 2026
dd3e556
docs(langsmith): tighten PR 2 wording after review
fjmorris Nov 16, 2026
b0717ee
docs(langsmith): replace or scope LANGSMITH_PROJECT for agent addressing
fjmorris Nov 16, 2026
cfc0301
docs(langsmith): apply PR 3 review and source fixes
fjmorris Nov 16, 2026
50bfd8f
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-1
fjmorris Nov 17, 2026
e321235
docs(langsmith): apply PR 1 review feedback and list v0.18 audit oper…
fjmorris Nov 17, 2026
6d3e788
Merge branch 'fjmorris/DOC-1797-1' into fjmorris/DOC-1797-2
fjmorris Nov 17, 2026
679a3be
docs(langsmith): split multi-turn evaluator configuration into subsec…
fjmorris Nov 17, 2026
fb6d666
Merge branch 'fjmorris/DOC-1797-2' into fjmorris/DOC-1797-3
fjmorris Nov 17, 2026
eb48ad3
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-1
fjmorris Nov 17, 2026
10f3541
docs(langsmith): apply npentrel review feedback on PR 1
fjmorris Nov 17, 2026
cf51dd9
Merge branch 'fjmorris/DOC-1797-1' into fjmorris/DOC-1797-2
fjmorris Nov 17, 2026
6e12004
Merge branch 'fjmorris/DOC-1797-2' into fjmorris/DOC-1797-3
fjmorris Nov 17, 2026
7ce5ab0
docs(langsmith): resolve agent environments for project IDs, apply re…
fjmorris Nov 18, 2026
6c78ebd
docs(langsmith): apply Naomi and Robin review on PR 3
fjmorris Nov 19, 2026
dc6098a
docs(langsmith): verify integration tracing destinations against sour…
fjmorris Nov 19, 2026
c031d01
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-3
fjmorris Nov 22, 2026
0627cbe
docs(langsmith): state the Go OTel tracer's agent version floor on PR 3
fjmorris Nov 22, 2026
d81397a
Merge remote-tracking branch 'origin/main' into fjmorris/DOC-1797-3
fjmorris Nov 24, 2026
d14aeba
docs(deepagents): use the environment tracer session name in subagent…
fjmorris Nov 24, 2026
3d2bed5
docs(langsmith): tighten the .env warning on the ADK and other-framew…
fjmorris Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/code-samples/deepagents/subagents-filter-runs-any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const client = new Client();

// :snippet-start: subagents-filter-runs-any-js
const runs = client.listRuns({
projectName: "<your-project>",
projectName: "<environment-tracer-session-name>",
filter: "has(metadata, 'lc_agent_name')",
});
// :snippet-end:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Client } from "langsmith";
const client = new Client();

const runs = client.listRuns({
projectName: "<your-project>",
projectName: "<environment-tracer-session-name>",
filter: 'has(metadata, \'{"lc_agent_name": "research-agent"}\')',
});
// :snippet-end:
Expand Down
4 changes: 2 additions & 2 deletions src/code-samples/deepagents/subagents-filter-runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
client = Client()

runs = client.list_runs(
project_name="<your-project>",
project_name="<environment-tracer-session-name>",
filter='has(metadata, \'{"lc_agent_name": "research-agent"}\')',
)
# :snippet-end:

# :snippet-start: subagents-filter-runs-any-py
runs = client.list_runs(
project_name="<your-project>",
project_name="<environment-tracer-session-name>",
filter="has(metadata, 'lc_agent_name')",
)
# :snippet-end:
Expand Down
1 change: 0 additions & 1 deletion src/code-samples/langsmith/create-an-agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def log_message(self, *args):
agent = client.agents.retrieve("support-agent")
production = next(env for env in agent.environments if env.environment == "PRODUCTION")
print(production.tracer_session_name) # Use as LANGSMITH_PROJECT
print(production.tracer_session_id) # Use with APIs that take a project ID
# :snippet-end:

# :remove-start:
Expand Down
2 changes: 1 addition & 1 deletion src/langsmith/alerts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ You can preview alert behavior over a historical time window to understand how m

- **Request Body Template**: Customize the JSON payload sent to your endpoint
- Default: LangSmith sends the payload defined and the following additional key-value pairs appended to the payload:
- `project_name`: Name of the LangSmith project the alert is scoped to.
- `project_name`: The [`tracer_session_name`](/langsmith/create-an-agent#use-an-environment-project) of the agent environment the alert is scoped to.
- `workspace_name`: Name of the LangSmith workspace.
- `alert_rule_id`: A UUID to identify the LangSmith alert. This can be used as a de-duplication key in the webhook service.
- `alert_rule_name`: The name of the alert rule.
Expand Down
20 changes: 12 additions & 8 deletions src/langsmith/annotation-queues-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ sidebarTitle: Manage feedback & annotation queues
tag: "SDK"
---

Use the LangSmith SDK to manage feedback configurations and [annotation queue](/langsmith/evaluation-concepts#human) rubrics programmatically, and to add runs and threads to a queue for review. Define reusable feedback schemas at the organization level (like accuracy scores or pass/fail judgments), then assign them to specific queues with custom instructions. This enables version control, automation across projects, and consistency—particularly useful for CI/CD pipelines or replicating evaluation setups across environments.
import ResolveAgentEnvironmentRequirements from '/snippets/langsmith/resolve-agent-environment-requirements.mdx';

Use the LangSmith SDK to manage feedback configurations and [annotation queue](/langsmith/evaluation-concepts#human) rubrics programmatically, and to add runs and threads to a queue for review. Define reusable feedback schemas at the workspace level (like accuracy scores or pass/fail judgments), then assign them to specific queues with custom instructions. This enables version control, automation across agents, and consistency—particularly useful for CI/CD pipelines or replicating evaluation setups across environments.

<Callout icon="code">
This guide uses the Python and TypeScript SDKs. For installation and setup, refer to the [Python SDK documentation](https://reference.langchain.com/python/langsmith) and [TypeScript SDK documentation](https://reference.langchain.com/javascript/langsmith).
Expand All @@ -18,15 +20,15 @@ To review the free-form acceptance criteria that [LangSmith Engine](/langsmith/e

LangSmith uses a three-layer architecture for structured human feedback:

1. **Feedback configs**: Organization-wide definitions of feedback keys that establish the schema for evaluation metrics. For example, you might define "accuracy" as a continuous 0–1 score or "correctness" as a pass/fail categorical choice. These configs are reusable across all annotation queues in your organization.
1. **Feedback configs**: Workspace-wide definitions of feedback keys that establish the schema for evaluation metrics. For example, you might define "accuracy" as a continuous 0–1 score or "correctness" as a pass/fail categorical choice. These configs are reusable across all annotation queues in your workspace.
1. **Annotation queue rubric items**: Queue-specific assignments that determine which feedback configs annotators must fill out when reviewing [runs](/langsmith/observability-concepts#runs) in a particular queue. Each rubric item can include custom descriptions, guidance for specific score values, whether the feedback is required or optional, and conditions that show or require the item based on earlier answers.
1. **Feedback**: Individual scores and values that annotators submit on specific [runs](/langsmith/observability-concepts#runs). This is the actual evaluation data collected using the schemas you've defined. Learn more about [feedback in LangSmith](/langsmith/observability-concepts#feedback).

## Feedback configs

### Create a feedback config

Feedback configs define the schema for a feedback key—whether it's a continuous score, a categorical choice, or freeform text. A unique key identifies each config within your organization and specifies how annotators can submit feedback for that metric.
Feedback configs define the schema for a feedback key—whether it's a continuous score, a categorical choice, or freeform text. A unique key identifies each config within your workspace and specifies how annotators can submit feedback for that metric.

<Note>
Calling @[`create_feedback_config`] with an identical config that already exists returns the existing config. If a different config already exists for the same key, the system raises a 400 error.
Expand Down Expand Up @@ -105,7 +107,7 @@ await client.createFeedbackConfig({

### List feedback configs

Retrieve feedback configs to see what evaluation criteria are available in your organization with @[`list_feedback_configs`]. You can list all configs or filter by specific keys. Each returned config object includes the key, type, configuration details (like `min`/`max` or `categories`), and metadata like `is_lower_score_better`:
Retrieve feedback configs to see what evaluation criteria are available in your workspace with @[`list_feedback_configs`]. You can list all configs or filter by specific keys. Each returned config object includes the key, type, configuration details (like `min`/`max` or `categories`), and metadata like `is_lower_score_better`:

<CodeGroup>
```python Python
Expand Down Expand Up @@ -188,7 +190,7 @@ Removing a category does not change feedback already written with that value. A

### Delete a feedback config

Remove a feedback config from your organization with @[`delete_feedback_config`]. This performs a soft delete, which marks the config as deleted but doesn't permanently remove it from the system. You can recreate a config with the same key later if needed:
Remove a feedback config from your workspace with @[`delete_feedback_config`]. This performs a soft delete, which marks the config as deleted but doesn't permanently remove it from the system. You can recreate a config with the same key later if needed:

<CodeGroup>
```python Python
Expand Down Expand Up @@ -413,18 +415,20 @@ The `items` resource requires `langsmith>=0.10.13` (Python) or `langsmith>=0.8.8

Each item sets an `item_type` of `RUN` or `THREAD`:

- **RUN items** require `run_id`. Also provide `project_id` (the project UUID) and `start_time`, which together locate the run directly.
- **RUN items** require `run_id`. Also provide `project_id` and `start_time`, which together locate the run directly.
- **THREAD items** require `thread_id` and `project_id`.

Resolve these IDs with the SDK:

- **`project_id`**: Look up a project by name with @[`read_project`] and read its `id`, for example `client.read_project(project_name="my-project").id`.
- **`project_id`**: The agent environment's `tracer_session_id`. [Resolve the agent environment](/langsmith/resolve-an-agent#resolve-an-agent-and-query-its-runs) with `client.sessions.resolve()` and use the returned `session_id`.
- **`run_id`**: Query runs with `client.runs.query()`. Each run exposes `id`, `project_id`, and `start_time`, the fields a RUN item needs.
- **`thread_id`**: Query threads with `client.threads.query()`. Each result exposes its `thread_id`.

<ResolveAgentEnvironmentRequirements />

You can also find these IDs in the [LangSmith UI](https://smith.langchain.com):

- **`project_id`**: The agent environment's `tracer_session_id`. Select your agent, go to **Tracing**, and select the environment. Click the **ID** badge next to the environment name and copy the **Tracing Project ID**. To learn why these APIs take a project ID, see [Compatibility with older APIs](/langsmith/observability-concepts#tracing-projects).
- **`project_id`**: The agent environment's `tracer_session_id`. Select your agent, go to **Tracing**, and select the environment. Click the **ID** badge next to the environment name and copy the **Tracing Project ID**. To learn why these APIs take a project ID, see [Resolve an agent environment](/langsmith/resolve-an-agent).
- **`run_id`**: Open a run in the [Details view](/langsmith/view-traces#details-view) and click the **ID** badge next to the run name to copy the run ID.
- **`thread_id`**: Select your agent, go to **Tracing**, select the environment, and open the **Threads** tab. Copy the value from the **Thread ID** column.

Expand Down
16 changes: 6 additions & 10 deletions src/langsmith/composite-evaluators-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ _Composite evaluators_ are a way to combine multiple evaluator scores into a sin

This guide describes setting up an evaluation that uses multiple evaluators and combines their scores with a custom aggregation function using the [LangSmith SDK](https://reference.langchain.com/python/langsmith).

<Note> Requires langsmith>=0.4.29 </Note>

<Tip>
To create composite evaluators in the LangSmith UI, refer to [How to create a composite evaluator (UI)](/langsmith/composite-evaluators-ui).
</Tip>

## Prerequisites

- `langsmith>=0.4.29`, `openai`, and `python-dotenv` installed.
- `LANGSMITH_API_KEY` and `OPENAI_API_KEY` set in your environment or in a `.env` file. The examples call `load_dotenv()` to load the file. For details, see [Set up environment variables](/langsmith/evaluation-quickstart).

## 1. Configure evaluators on a dataset

Start by configuring your evaluators. In this example, the application generates a tweet from a blog introduction and uses three evaluators—summary, tone, and formatting—to assess the output.

If you already have your own dataset with evaluators configured, you can skip this step.

```python
import os
from dotenv import load_dotenv
from openai import OpenAI
from langsmith import Client
Expand All @@ -30,12 +32,6 @@ import json
# Load environment variables from .env file
load_dotenv()

# Access environment variables
openai_api_key = os.getenv('OPENAI_API_KEY')
langsmith_api_key = os.getenv('LANGSMITH_API_KEY')
langsmith_project = os.getenv('LANGSMITH_PROJECT', 'default')


# Create a dataset. Only need to do this once.
client = Client()
oai_client = OpenAI()
Expand Down Expand Up @@ -185,7 +181,7 @@ def calculate_weighted_score(feedback_stats: dict) -> float:

async def main():
client = Client()
# The experiment is a tracing project; its root runs carry the evaluator scores
# Look up the experiment by name. Its root runs carry the evaluator scores.
experiment = client.read_project(project_name=YOUR_EXPERIMENT_NAME)

# Process each run and write feedback
Expand Down
2 changes: 1 addition & 1 deletion src/langsmith/create-an-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Retrieve the agent with a credential that can read its environments. With the Py

<AgentEnvironmentProjectPy />

With REST, call `GET /api/v1/agents/support-agent` using the same authentication headers as the creation request. In `environments`, select `PRODUCTION`, `STAGING`, `DEVELOPMENT`, or `LOCAL` and read its `tracer_session_name` or `tracer_session_id`.
With REST, call `GET /api/v1/agents/support-agent` using the same authentication headers as the creation request. In `environments`, select `PRODUCTION`, `STAGING`, `DEVELOPMENT`, or `LOCAL` and read its `tracer_session_name`. For APIs that take a project ID instead, see [Resolve an agent environment](/langsmith/resolve-an-agent).

Copy the selected environment's `tracer_session_name` into your integration's destination setting:

Expand Down
12 changes: 11 additions & 1 deletion src/langsmith/deploy-google-adk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ pip install -e .

## Run locally

`langgraph dev` loads the `.env` file set in `langgraph.json`, but local runs are not bound to an agent environment the way a deployment is. Export [agent addressing](/langsmith/log-traces-to-agent) in your shell so local traces go to the agent's Local environment. Keep `LANGSMITH_AGENT_ID` and `LANGSMITH_AGENT_ENVIRONMENT` out of `.env`, because `langgraph deploy` uploads that file and the variables [conflict with](/langsmith/log-traces-to-agent#remove-conflicting-destination-settings) the deployment's agent environment:

```bash
export LANGSMITH_AGENT_ID=<your-agent-id>
export LANGSMITH_AGENT_ENVIRONMENT=local
```

Without the agent variables, local traces do not reach the agent.

Start the local Agent Server with the [LangGraph CLI](/langsmith/cli):

```bash
Expand Down Expand Up @@ -186,10 +195,11 @@ For environment configuration, deployment types, and revision management, refer
```bash .env
LANGSMITH_API_KEY=your-langsmith-api-key
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=my-adk-agent # optional
GOOGLE_API_KEY=your-google-api-key
```

LangSmith traces every deployment to the [agent environment it is bound to](/langsmith/deploy-to-agent-environment), so you do not set a tracing destination yourself.

[Traces](/langsmith/observability) show agent invocations, tool calls, and LLM interactions in the [LangSmith UI](https://smith.langchain.com). For more on the underlying tracing integration, see [Trace Google ADK applications](/langsmith/trace-with-google-adk).

## API reference
Expand Down
21 changes: 15 additions & 6 deletions src/langsmith/deploy-other-frameworks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ dependencies = [
```bash .env
LANGSMITH_API_KEY=your-langsmith-api-key
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=my-claude-agent
ANTHROPIC_API_KEY=your-anthropic-api-key
```

Expand Down Expand Up @@ -601,13 +600,14 @@ dependencies = [
```bash .env
LANGSMITH_API_KEY=your-langsmith-api-key
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=my-strands-agent
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.smith.langchain.com/otel/v1/traces
OTEL_EXPORTER_OTLP_HEADERS=x-api-key=your-langsmith-api-key,Langsmith-Project=my-strands-agent
OTEL_EXPORTER_OTLP_HEADERS=x-api-key=your-langsmith-api-key,Langsmith-Project=<environment-tracer-session-name>
AWS_REGION=your-aws-region
AWS_PROFILE=your-aws-profile
```

In `OTEL_EXPORTER_OTLP_HEADERS`, replace `<environment-tracer-session-name>` in the `Langsmith-Project` header with the agent environment's [`tracer_session_name`](/langsmith/create-an-agent#use-an-environment-project).

</Tab>
<Tab title="CrewAI">

Expand Down Expand Up @@ -638,7 +638,6 @@ dependencies = [

```bash .env
LANGSMITH_API_KEY=your-langsmith-api-key
LANGSMITH_PROJECT=my-crewai-agent
OPENAI_API_KEY=your-openai-api-key
```

Expand Down Expand Up @@ -672,7 +671,6 @@ dependencies = [

```bash .env
LANGSMITH_API_KEY=your-langsmith-api-key
LANGSMITH_PROJECT=my-autogen-agent
OPENAI_API_KEY=your-openai-api-key
```

Expand All @@ -691,12 +689,23 @@ pip install -e .

Use the framework-specific `.env` template in [Project layout](#project-layout). Agent Server loads this file when `"env": ".env"` is set in `langgraph.json`.

Set `LANGSMITH_PROJECT` and your framework provider credentials in that file. For Claude Agent SDK and Strands Agents, also set `LANGSMITH_TRACING=true`. For CrewAI and AutoGen, tracing is enabled in `agent.py` through `OtelSpanProcessor()` and the framework instrumentors, so set `LANGSMITH_API_KEY` and `LANGSMITH_PROJECT` only.
Set your LangSmith API key and framework provider credentials in that file. For Claude Agent SDK and Strands Agents, also set `LANGSMITH_TRACING=true`. For CrewAI and AutoGen, tracing is enabled in `agent.py` through `OtelSpanProcessor()` and the framework instrumentors, so set `LANGSMITH_API_KEY` only.

LangSmith traces every deployment to the [agent environment it is bound to](/langsmith/deploy-to-agent-environment), so you do not set a tracing destination yourself. Strands Agents sends traces through the OTLP exporter instead, so set `Langsmith-Project` in `OTEL_EXPORTER_OTLP_HEADERS` to that environment's `tracer_session_name`. To look it up, see [Configure integrations that require a project name](/langsmith/create-an-agent#use-an-environment-project).

[Traces](/langsmith/observability) show agent invocations, tool calls, and LLM interactions in the [LangSmith UI](https://smith.langchain.com). For framework-specific tracing options, see the links in [Configure tracing](#configure-tracing).

## Run locally

`langgraph dev` loads the same `.env` file, but local runs are not bound to an agent environment the way a deployment is. Export [agent addressing](/langsmith/log-traces-to-agent) in your shell so local traces go to the agent's Local environment. Keep `LANGSMITH_AGENT_ID` and `LANGSMITH_AGENT_ENVIRONMENT` out of `.env`, because `langgraph deploy` uploads that file and the variables [conflict with](/langsmith/log-traces-to-agent#remove-conflicting-destination-settings) the deployment's agent environment:

```bash
export LANGSMITH_AGENT_ID=<your-agent-id>
export LANGSMITH_AGENT_ENVIRONMENT=local
```

Without the agent variables, local traces for Claude Agent SDK, CrewAI, and AutoGen do not reach the agent. Strands Agents sends traces through the OTLP headers in `.env`, so local traces follow that `Langsmith-Project` value. For local Strands testing, set `Langsmith-Project` to the Local environment's [`tracer_session_name`](/langsmith/create-an-agent#use-an-environment-project).

Start the local Agent Server with the [LangGraph CLI](/langsmith/cli):

```bash
Expand Down
Loading
Loading