Commit Graph

4332 Commits

Author SHA1 Message Date
Johannes du Plessis a42f1eeaad docs: align extensions page with the revised stack
Async-only factories, runtime registration and /restart semantics, the
full source and trust order, sandbox backend limits, and /extensions.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-24 16:57:03 +00:00
Johannes du Plessis 82da5d1bec docs: document the dcode Python extensions API
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-23 17:04:18 +00:00
langsmith-fleet[bot] 4a7bd195ba Remove prompt hub references from LLM-as-judge evaluator configuration docs (#5616)
Fixes DOC-1556

## Summary

- Removed the "Pull a prompt from the prompt hub" option from Step 2
(Configure the evaluator) of the LLM-as-judge docs, since this feature
was removed when evaluators became reusable.
- Simplified the Prompt section to only describe creating a custom
inline prompt.
- Removed a trailing sentence in the Feedback configuration section that
referenced using an existing prompt from the hub (now-stale guidance).

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1556/remove-prompt-hub-suggestion-from-llm-as-judge-evaluator-configuration
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1787271651330269

## Verification

Not run; docs-only copy change removing stale UI instructions.

## Reviewers

Requested review from: @katmayb, @fjmorris

Co-authored-by: Docs Writer Bot <brace@langchain.dev>
2026-08-21 16:47:03 -04:00
Ramon Petgrave 29f261ee53 feat: document Anthropic OAuth passthrough (#5574)
## Overview

Documents Anthropic OAuth passthrough for Claude Code Plus and Max users
now that it is available to every organization. The update explains how
Claude Code reuses its saved subscription login, how the LangSmith API
key authenticates the gateway, and how gateway permissions, policies,
tracing, and billing behave.

## Type of change

**Type:** Update existing documentation

## Related issues/PRs

- GitHub issue:
- Feature PR:
https://github.com/langchain-ai/langchainplus/pull/34207#issue-5173173004

- Linear issue:
- Slack thread:

## Checklist

- [x] I have read the [contributing guidelines](README.md), including
the [language
policy](https://docs.langchain.com/oss/python/contributing/overview#language-policy)
- [x] I have tested my changes locally using `docs dev`
- [x] All code examples have been tested and work correctly
- [x] I have used **root relative** paths for internal links
- [x] I have updated navigation in `src/docs.json` if needed

(Internal team members only / optional): Create a preview deployment as
necessary using the [Create Preview Branch
workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml)

## Additional notes

Vale passes on both changed pages, the shell configuration passes syntax
validation, and `docs dev` started the local preview successfully.

Made by [Open
SWE](https://openswe.vercel.app/agents/13d18a55-bfb0-d76e-20a5-37017973efd5)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
Co-authored-by: Martha Janicki <10112032+marthajanicki@users.noreply.github.com>
2026-08-21 19:02:28 +00:00
Kenil Vora 655658c310 feat: document new dedicated permission for api key management (#4755)
## Overview
<!-- Brief description of what documentation is being added/updated -->

## Type of change

**Type:** [Replace with: New documentation page / Update existing
documentation / Fix typo/bug/link/formatting / Remove outdated content /
Other]

## Related issues/PRs
<!--
Link to related issues, feature PRs, or discussions (if applicable)

To automatically close an issue when this PR is merged, use closing
keywords:
- "closes #123" or "fixes #123" or "resolves #123"

For regular references without auto-closing, just use:
- "#123" or "See issue #123"

Examples:
- closes #456 (will auto-close issue #456 when PR is merged)
- See #789 for context (will reference but not auto-close issue #789)
-->
- GitHub issue:
- Feature PR:

<!-- For LangChain employees, if applicable: -->
- Linear issue:
- Slack thread:

## Checklist
<!-- Put an 'x' in all boxes that apply -->
- [x] I have read the [contributing guidelines](README.md), including
the [language
policy](https://docs.langchain.com/oss/python/contributing/overview#language-policy)
- [x] I have tested my changes locally using `docs dev`
- [x] All code examples have been tested and work correctly
- [x] I have used **root relative** paths for internal links
- [x] I have updated navigation in `src/docs.json` if needed

(Internal team members only / optional): Create a preview deployment as
necessary using the [Create Preview Branch
workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml)

## Additional notes
<!-- Any other information that would be helpful for reviewers -->

---------

Co-authored-by: Florence Morris <1629446+fjmorris@users.noreply.github.com>
2026-08-21 16:41:01 +00:00
Florence Morris c96eeb6205 Update docs for new AQ operations using new SDK endpoints (#5253)
Fixes DOC-1467

Modified annotation-queues-sdk.mdx, added Add runs and threads to a
queue.
2026-08-21 11:12:34 -04:00
bentanny e0f7a4fd7b docs(langsmith): describe Engine issue tracking instead of custom evaluators (#5615)
The Engine pages presented a generated custom evaluator as a user-facing
deliverable ("generates a custom evaluator to prevent regressions",
"Deploy the suggested evaluator Engine generates for each issue").
Engine does author regression evaluators internally, but what a user
sees is issue upkeep: once an issue is filed, later scans attach new
traces matching the same failure pattern to that issue. These pages now
say that.

## What changed

- `engine-overview.mdx`: closed-loop sentence, lifecycle intro,
frontmatter description, and the Test/Monitor cards.
- `engine.mdx`: step 4 of the loop and the matching mermaid node. Added
a paragraph under **Linked Traces** explaining that new matching traces
are attached automatically on later scans, which is where a reader looks
for this behavior.
- `engine-issue-categories.mdx`: the See also entry pointed at
Evaluators for a per-issue evaluator; it now points at Manage datasets.
- `engine-security.mdx`: the advisory-outputs sentence no longer lists
evaluators among recommended assets.
- `evaluators.mdx`: the Engine tip claimed one-click evaluator
deployment. Rewritten to state the real relationship, which is the
reverse: evaluator scores are a high-priority signal when Engine picks
traces to analyze.

Dataset examples stay throughout, since Engine does propose grounded
regression examples.

## Deliberately unchanged

- `engine.mdx` lines on feedback sampling and the scope-filter
limitation, and the `engine-security.mdx` data table: these describe
*your* evaluators as an input signal, which is accurate.
- `engine-self-hosted.mdx` "generate fixes, and write evaluators": this
is the LCU cost driver and model-role breakdown. Engine still spends
model calls authoring regression evaluators, so removing it would
misstate where cost goes.

## Review focus

Whether "tracks the issue as new matching traces arrive" is the framing
we want in the closed loop, given the loop already ends with automatic
reopening after a close. The two are distinct (attaching to an open
issue vs. reopening a closed one) and both are now stated.

Drafted with Claude Code; every claim checked against the Engine
implementation rather than the previous copy.

## Test Plan
- [ ] `make lint_prose` on the five changed files — clean (0 errors, 0
warnings, 0 suggestions).
- [ ] Preview the Engine overview and Engine pages and confirm the
mermaid node renders and the three lifecycle cards still read
coherently.
- [ ] Confirm the new `/langsmith/manage-datasets` link in Engine issue
categories resolves.
2026-08-20 17:04:09 -07:00
Lauren Hirata Singh 671b5471ae docs: [Self-Hosted Changelog Bot] Changelog updates for new version(s) (#5578)
Automated changelog update created by the LangGraph Server Changelog
Bot.

Feel free to merge anytime.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-08-20 17:15:34 -04:00
Josh Rogers 2567e1639c Update Agent Server changelog (#5612)
Updates langgraph-api release notes in the Agent Server changelog.

Versions in this update: 0.11.3, 0.12.4, 0.12.5, 0.12.6, 0.13.0rc4,
0.13.0rc5.
2026-08-20 16:01:29 -04:00
Thushanth Bengre 808182f6c6 docs(langchain): document error retryability for JS (#5516)
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2026-08-20 13:50:19 -04:00
Will Bradley 00d23d1daa fix: simplify managed Deep Agents tools intro (#5601)
## Description
Replaces the jargon-heavy Managed Deep Agents tools intro with a direct
explanation: “Tools add custom capabilities to your agent.”


Made by [Open
SWE](https://openswe.vercel.app/agents/ebe40242-f005-5164-94cc-e15258acc7f1)

Co-authored-by: Will Bradley <3030224+wbbradley@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-20 12:44:35 -04:00
Asamu David 870a4a835e Restructure Cloud deployment docs and add Preview builds (#4468)
## Overview

Reorganizes the Cloud deployment documentation around common deployment
tasks and adds a standalone **Preview builds** page.

The new **Deployment guide** sidebar group contains:

- Create a deployment
- Revisions
- Monitor a deployment
- Preview builds
- Manage a deployment

The update also moves the deployment IP allowlist into **Cloud platform
features → Static IP addresses** and updates existing links to the new
anchor.

## Type of change

**Type:** Documentation restructure and new documentation page

## Related issues/PRs

- Linear issue: https://linear.app/langchain/issue/LSD-1569/v010-docs
- Slack thread:

## Validation

- [x] Rebased onto the latest `main`
- [x] Built the documentation locally with `docs build`
- [x] Ran Vale on all changed documentation pages
- [x] Ran markdownlint on the restructured deployment pages
- [x] Verified `src/docs.json` pages and redirects
- [x] Checked cross-references
- [x] Used root-relative internal links

## Additional notes

The full-site Mintlify link scan continues to report existing generated
and API-reference links. It did not report broken links in the
restructured deployment pages.

---------

Co-authored-by: Kathryn May <44557882+katmayb@users.noreply.github.com>
Co-authored-by: victorm-lc <victor@langchain.dev>
2026-08-20 09:05:32 -07:00
langsmith-fleet[bot] e6a66534c2 docs: refresh Managed Deep Agents overview diagram styling (#5583)
## What
Restyle the Mermaid architecture diagram at the top of the Managed Deep
Agents overview page:

- Replace the plain rectangles with rounded/stadium shapes (`([...])`,
`(...)`) and round-cornered class defs, so the three cards read as
intentional rather than default rects.
- Add bold titles inside each node and swap `<br/>- item` pseudo-bullets
for `&nbsp;•&nbsp;` glyphs with breathing room between the title and the
list.
- Give both subgraphs subtle tinted fills and dashed borders (light
green for _You provide_, light blue for _Managed Deep Agents_) so the
two halves read as related-but-different.
- Upgrade the `Logic --> mda` edge to a thick arrow (`==>`) so the
hand-off from your logic into the managed platform is the visual focal
point.
- Inherit the site's Inter font via `themeVariables.fontFamily`, and
make the cluster background transparent so the tinted subgraphs actually
show through.

## Why
Requested via Slack by @Stephen Chu:

> Can you make this diagram look better. the shape and bullets look very
plain and lazy.
>
https://docs.langchain.com/langsmith/python/managed-deep-agents-overview

## Notes for reviewer
- Opened as a draft — please review the rendered diagram in the Mintlify
preview before marking ready. Mermaid HTML-in-labels can render slightly
differently across versions.
- Only the ```mermaid block was touched; the rest of the page is
unchanged.
- Kept it typography- and shape-only (no emoji or icon images) to stay
portable across renderers.
- Cleanup: an accidental `test-file.md` was created at the repo root on
this branch during the update flow — will remove it in a follow-up
commit. It should not be merged.

---------

Co-authored-by: langsmith-fleet[bot] <242644093+langsmith-fleet[bot]@users.noreply.github.com>
2026-08-19 20:23:37 -04:00
langsmith-fleet[bot] a3fbf8f2ec Clarify monorepo structure: cd into package dir before uv sync (#5570)
Fixes DOC-1547

## Summary

- Adds a `<Warning>` callout to the "Clone and setup" step explaining
that `langchain-ai/langchain` is a monorepo with no root
`pyproject.toml` — each package lives under `libs/` and has its own.
- Replaces the misleading `uv venv && source .venv/bin/activate && uv
sync --all-groups` (run at repo root) with `cd libs/core && uv sync
--all-groups` to reflect the correct workflow.
- Adds a pointer to the Repository Structure section for the full list
of package directories.

This fixes a common contributor pain point where `uv sync --all-groups`
fails at the repo root with `error: No pyproject.toml found in current
directory or any parent directory`.

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1547/fix-contributing-docs-clarify-pyprojecttoml-lives-in-package-subdirs
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1787073553651679
- Forum thread:
https://forum.langchain.com/t/langchain-project-pyproject-toml-file-is-forget-in-root/4371

## Verification

Verified against the live repo: `langchain-ai/langchain` has no
`pyproject.toml` at root; package directories under `libs/` each have
their own. No build commands to run for this prose-only change.

## Reviewers

Requested review from: @npentrel, @lnhsingh

Co-authored-by: Docs Writer <brace@langchain.dev>
2026-08-19 20:22:43 -04:00
langsmith-fleet[bot] d07e9d0662 Add Stagehand as an official Deep Agents integration (#5576)
Linear: DOC-1549

## Summary

- Adds `src/oss/deepagents/stagehand.mdx` — a new integration page for
[Stagehand](https://stagehand.dev), the open-source browser automation
framework built on Playwright
- Documents both deployment patterns: local (MCP over stdio) and managed
(native Python tools with Browserbase)
- Includes configuration tables, step-by-step setup instructions, and
warnings matching the upstream Stagehand docs
- Registers the page in `src/docs.json` under the **Execution
environment** group in the Deep Agents tab

## Links

- Linear: https://linear.app/langchain/issue/DOC-1549
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1787085658718839
- Stagehand source:
https://docs.stagehand.dev/v4/integrations/deep-agents

## Verification

Docs-only content page; no code execution required. Content was
cross-referenced directly against the Stagehand docs at
https://docs.stagehand.dev/v4/integrations/deep-agents.

## Reviewers

Requested review from: @mdrxy, @npentrel

---------

Co-authored-by: Docs Bot <docs-bot@langchain.dev>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2026-08-19 16:28:30 -07:00
hari-dhanushkodi 7ddf9d1296 fix: clarify DeltaChannel compatibility guidance (#5598)
## Description
Clarifies LangGraph guidance to discourage changing persisted channels
between delta and non-delta representations.
Adds a Deep Agents v0.6.0 downgrade warning so users understand the risk
to existing threads.

## Test Plan
- [x] `make lint_prose FILES="src/oss/langgraph/pregel.mdx
src/oss/python/releases/changelog.mdx"`
- [x] `make broken-links`

Made by [Open
SWE](https://openswe.vercel.app/agents/0eab83a9-2f97-5fe6-9dbe-6ffdc45f5b94)

---------

Co-authored-by: hari-dhanushkodi <203702815+hari-dhanushkodi@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-19 18:46:45 -04:00
Rashiq cf2f62f3f2 docs: note dual-stack (IPv4 + IPv6) support in self-hosted guides (#5593)
## Summary

Add a note to the Kubernetes self-hosted guide (`kubernetes.mdx`) and
the standalone server guide (`deploy-standalone-server.mdx`) that
services listen on both IPv4 and IPv6 by default

Related PRs:
- https://github.com/langchain-ai/helm/pull/952 (merged)
- https://github.com/langchain-ai/langchainplus/pull/33616 (merged)
- https://github.com/langchain-ai/langgraph-api/pull/3985

## Test plan

- [ ] Verify notes render correctly on both pages
- [ ] Run `make broken-links` to confirm no link regressions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
Co-authored-by: Josh Rogers <jrogepoge@gmail.com>
2026-08-19 16:03:46 -04:00
Raju Ansari a26dfeb197 docs: document MPP support in AgentCore Payments middleware (#5566)
## Summary

Amazon Bedrock AgentCore Payments added support for the [Machine
Payments Protocol (MPP)](https://mpp.dev) alongside x402.
`AgentCorePaymentsMiddleware` now detects the protocol automatically
from the 402 response and handles both. This updates the AWS middleware
integration docs to cover MPP.

Corresponding SDK change: MPP support in `bedrock-agentcore-sdk-python`
(adds MPP challenge handling, the `buyer_pays_gas_fees` config option,
and x402 fallback).

## Changes to `src/oss/python/integrations/middleware/aws.mdx`

- **Intro + summary table** — the middleware now handles x402 *and* MPP,
protocol auto-detected from the 402 response
- **How it works** — the sequence diagram and numbered steps note
protocol detection and the three proof headers (`X-PAYMENT`,
`PAYMENT-SIGNATURE`, `Authorization: Payment <token>`)
- **New "MPP (Machine Payments Protocol)" section** covering
`WWW-Authenticate: Payment` challenge handling, supported methods
(`evm`/`tempo` → ETHEREUM, `solana` → SOLANA), `charge`-only intent,
gas-fee authorization via `buyer_pays_gas_fees`, and
MPP-preferred-with-x402-fallback behavior
- **Detection priority** — lenient fallback now recognizes MPP
challenges in `responseHeaders`/`headers`
- **Configuration reference** — added the `buyer_pays_gas_fees` row;
generalized `payment_instrument_id` from "x402 signing" to "payment
signing"

## Notes

- Only documentation changed; no code changes.

---------

Co-authored-by: Raju Ansari <ansraju@amazon.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2026-08-19 08:37:08 -04:00
Winston Huynh 5cf44f8b49 docs(langsmith): document the Threads item type for automation rules (#5559)
Adds docs for thread automation rules.

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2026-08-19 08:30:05 -04:00
Caspar Broekhuizen c0cd1be6ae docs: mention managed-deep-agents skill in MDA quickstart (#5581)
## Description

Adds an "Add the `managed-deep-agents` skill" section to the Managed
Deep Agents quickstart, between Prerequisites and the build steps.
Readers who build with a coding agent get better results with the
[`managed-deep-agents`
skill](https://github.com/langchain-ai/langchain-skills/blob/main/config/skills/managed-deep-agents/SKILL.md)
installed, so the section links the skill and gives the `npx skills add
langchain-ai/langchain-skills --skill managed-deep-agents --yes` install
command.

Placement is the main thing worth a look: the skill is most useful
before the reader starts scaffolding, but it can move to Next steps if
that reads better.

Docs-only change; no new pages, so `src/docs.json` is untouched. `make
lint_prose` passes on the changed file. Written by an AI agent (Open
SWE) at the requester's direction.

## Test Plan

- [ ] Preview the quickstart page and confirm the new section renders
with the heading in code formatting.

Made by [Open
SWE](https://openswe.vercel.app/agents/25e9b868-246d-5f0a-afc6-dffbd06e42a5)

---------

Co-authored-by: Caspar Broekhuizen <25157475+casparb@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-18 17:52:33 -07:00
Harrison Chase d3003b3b85 chore: remove authored tools section (#5568)
## Description
Remove the unclear “Add authored tools” section from the Managed Deep
Agents tools page while retaining the concrete setup instructions that
follow.

## Test Plan
- [x] Run scoped Vale prose lint on `managed-deep-agents-tools.mdx`

Made by [Open
SWE](https://openswe.vercel.app/agents/f021d759-cb90-50a9-bb5a-ed6b219f7b04)

Co-authored-by: Harrison Chase <11986836+hwchase17@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-18 10:12:26 -07:00
SpiliosDmk 6169ee88ba [navigation] retrieval nav links point to redirect sources instead of canonical URLs (#5552)
Two entries in the sidebar navigation (`src/docs.json`) point to pages
that
immediately redirect the user elsewhere:

- `oss/python/langchain/retrieval` redirects to
`/oss/python/deepagents/retrieval`
- `oss/javascript/langchain/retrieval` redirects to
`/oss/javascript/deepagents/retrieval`

The content was moved to the `deepagents/` path and redirects were added
correctly, but the navigation was not updated. Every user clicking the
nav
link gets an unnecessary redirect hop instead of landing directly on the
canonical page.

Fix: update the 2 nav entries in `src/docs.json` to point directly to
`oss/python/deepagents/retrieval` and
`oss/javascript/deepagents/retrieval`.
Verified with a full pipeline build (no warnings, JSON valid). Fix
ready.
2026-08-18 09:38:59 -07:00
langsmith-fleet[bot] c08520094f Add --create-namespace note to helm upgrade command in Kubernetes self-hosted docs (#5558)
Fixes DOC-1544

## Summary

- Added a `<Note>` callout after the `helm upgrade` command in the
Kubernetes self-hosted deployment guide explaining that the namespace
must already exist before running the command
- Instructs users to either pre-create the namespace with `kubectl
create namespace <namespace>` or append `--create-namespace` to the helm
command

## Links

- Linear: https://linear.app/langchain/issue/DOC-1544
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1787010227131159

## Verification

- `make lint_prose` — no errors in `kubernetes.mdx` (pre-existing errors
in other files are unrelated)
- `make check-cross-refs` —  all cross-references resolved

## Reviewers

Requested review from: @katmayb, @fjmorris

Co-authored-by: Docs Bot <brace@langchain.dev>
2026-08-18 08:38:52 -07:00
github-actions[bot] 51721a4ae5 chore: refresh LangSmith platform OpenAPI spec (#5562)
## Summary
Automated daily refresh of the LangSmith Platform API spec.

## Details
- Fetched latest spec from api.smith.langchain.com
- Applied post-processing: hid fleet/internal endpoints, added
human-readable group tags
- Output: `src/langsmith/langsmith-platform-openapi.json`
- Generated by `scripts/process_langsmith_openapi.py`

🤖 This PR was created automatically by GitHub Actions

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 15:36:21 +00:00
Florence Morris 8d03177a04 docs(langsmith): clarify Include extended stats evaluator data (#5519)
Fixes DOC-1523

## Summary

Documents the **Include extended stats** evaluator setting so users can
determine when to enable it and which data it makes available.

- Clarifies run-level support and the multi-turn evaluator limitation.
- Distinguishes `feedback_stats` from individual feedback records
available to code evaluators.
- Adds supported LLM-as-a-judge variable-mapping guidance and a
feedback-filtered chaining link.

## Validation

- `make lint_prose FILES='src/langsmith/evaluators.mdx
src/langsmith/online-evaluations-code.mdx'`
- `make broken-links-with-anchors`

## Notes

This PR was prepared with AI agent assistance and reviewed against the
LangSmith UI and backend implementation.

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2026-08-18 08:02:57 -07:00
Mason Daugherty 3f035ef3fd docs(dcode): document cold prompt-cache warning and trusted endpoints (#5524)
Draft documentation for two `deepagents-code` features:

-
[langchain-ai/deepagents#5439](https://github.com/langchain-ai/deepagents/pull/5439)
— warn before expensive cold-cache turns
-
[langchain-ai/deepagents#5462](https://github.com/langchain-ai/deepagents/pull/5462)
— trust user-declared endpoints for cold-cache policies

Generated with AI assistance (Deep Agents Code).
2026-08-17 23:57:40 -04:00
Mason Daugherty 4b2a8240f0 fix(docs): clarify ToolRuntime injection wording on tools page (#5521)
## Summary

Rewrites one sentence in the `<Info>` block of the "Short-term memory
(State)" section on the Python tools page
(`src/oss/langchain/tools.mdx`).

Old:

> Add `runtime: ToolRuntime` to your tool signature to access state.
This parameter is automatically injected and hidden from the LLM - it
won't appear in the tool's schema.

New:

> To access state, add `runtime: ToolRuntime` to your tool signature.
When the tool runs, the runtime (for example, `ToolNode`) supplies the
value, not the model, and the parameter is omitted from the tool schema
sent to the model.

## Why

"Automatically injected" is ambiguous about who acts. Injection is
opt-in: the user declares the `runtime: ToolRuntime` parameter
themselves. What is automatic is that, once declared, the value is
supplied at call time by the runtime (e.g. `ToolNode`) rather than
generated by the model, and the parameter is omitted from the
model-facing tool schema. The new wording makes that distinction
explicit and matches the "hidden from the model" phrasing used in the
`<Warning>` further down the same page.

No other content changed. Vale prose lint passes on the edited file.

---

AI-assisted change (reviewed and verified against the repo's style
conventions).

---------

Co-authored-by: Docs Bot <brace@langchain.dev>
2026-08-17 23:57:28 -04:00
Ramon Nogueira c922046a7a docs(sandboxes): correct sandbox docs that drifted from the backend (#5528)
The sandbox pages had accumulated claims the implementation no longer
honors. Some are cosmetic; several actively break anyone who copies
them. Each item below was checked against `smith-go/sandboxes`, the
LangSmith CLI, and the SDKs.

## Wrong in a way that breaks users

- **`wait_for_ready` removed from the REST examples.** The field was
deleted from `CreateSandboxPayload` and is now silently ignored.
Creating a sandbox already boots it and returns once it reports `ready`,
so the parameter is redundant rather than load-bearing. The name
survives as a *client-side* SDK kwarg (default `True`), which is
probably how the REST examples drifted.
- **CLI `--wait` and the `wait` subcommands removed.** `--wait`,
`--timeout`, `sandbox wait`, and `snapshot wait` no longer exist, for
the same reason: `create` returns ready. Snapshot builds are genuinely
asynchronous, so those keep a documented poll.
- **CLI output default corrected.** It is human-readable tables, with
`--format json` for scripting; the docs had it backwards. Also fixed on
the CLI overview and profile pages.
- **GCS mount `scopes` removed from the examples.** The SDK drops the
field when building `mount_config.auth.gcp` and the backend rejects it
outright, deriving the scope from each mount's `read_only`. Also
documents that one `mount_config` cannot mix read-only and writable GCS
mounts.

## Wrong numbers and facts

- **Running-command idle timeout is 1 hour**, not 5 minutes. Five
minutes is the finished-session TTL, which was previously left
unnumbered and is now stated.
- **Builder sandbox default is 0.5 vCPU**, not "a single core".
- **The 2-vCPU Dockerfile builder example** paired 2 vCPU with 4 GiB,
landing exactly on the edge of the 4 GiB per vCPU tolerance. Now 8 GiB,
matching the JS SDK README.
- **AWS and GCP auth-rule limits count disabled rules too**, so "at most
one enabled GCP rule" was wrong.
- **`/tmp` is not a tmpfs.** Only `/dev/shm` is, so `/tmp` lives on the
sandbox disk and is captured. The old note claimed the opposite while
the stop/start example on the same page relied on `/tmp` persisting.

## Reachable but undocumented

Memory snapshots (`include_memory`, `restore_memory`,
`preserve_memory_on_stop`), the CPU/memory/filesystem limits, labels,
and the CLI `--vcpus` / `--memory` sizing flags. Memory snapshots are
documented as REST-only, since the `langsmith.sandbox` clients do not
expose them.

## Stop and start

Sandboxes wake on their next request, so the docs no longer walk users
through starting one by hand. Explicit `start` is gone from the prose,
examples, and the CLI command reference; `stop` stays where releasing
resources early is the point. The `start` API and CLI command still
exist, they are just no longer presented as a step you take.

## Worth a careful look

- The `/tmp` claim is the one I could not confirm on a live sandbox,
because the only endpoint configured locally is production. It rests on
three code sources agreeing: the guest init mounts only `/dev/shm` as
tmpfs, the rootfs image adds no `/tmp` tmpfs, and `e2e/snapshot_test.go`
says the same in a comment. Happy to confirm on a real box if you would
rather not take the code's word for it.
- The GCS `scopes` behavior reads as a product bug rather than a doc
bug, and is documented as-is here: the SDK silently drops a field the
backend would have rejected.

## Test plan

- [x] `make lint_prose` clean on all changed files
- [x] `make build` succeeds; the one new anchor (`#resume-from-memory`)
resolves
- [x] Every changed claim traced to the implementation in
`smith-go/sandboxes`, `langsmith-cli`, or `langsmith-sdk`

Written with Claude Code.
2026-08-17 16:56:09 -07:00
SpiliosDmk 2de40d494f [deepagents]: em dashes in backends.mdx use spaces (violates LangChain.DashesSpaces Vale rule) (#5553)
`src/oss/deepagents/backends.mdx` contains 22 em dashes written as
`word — word` (with surrounding spaces), which violates the
`LangChain.DashesSpaces` Vale rule enforced by `make lint_prose` (CI).

Per AGENTS.md: "Add spaces around em dashes — write word—word not
word — word (make lint_prose enforces this)."

Fix: replace all 22 instances of ` — ` with `—` in prose lines
(the 2 instances inside code block comments are untouched).
1 file changed, 23 lines. Pipeline build clean. Fix ready.
2026-08-17 16:52:56 -07:00
Eli Verdun 0c4cb33714 fix: clarify Managed Deep Agents memory durability (#5536)
## Description
Clarifies that only writes to the `memories/agent` Context Hub tree are
durable across threads and sessions. Distinguishes other agent
filesystem writes as runtime-only without introducing a potentially
misleading path example.

## Test Plan
- [x] Run the focused Vale prose lint on the updated page.

Made by [Open
SWE](https://openswe.vercel.app/agents/582d6744-669d-8592-0cdd-1b5485d8e6e8)

Co-authored-by: Eli Verdun <290473658+eli-verdun@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-17 15:27:35 -07:00
Eli Verdun 6c823cfff8 fix: document MDA delete filesystem tool (#5535)
## Description
Add the supported `delete` operation to the Managed Deep Agents sandbox
filesystem-tool inventory while leaving the narrower memory-tool list
unchanged.

## Test Plan
- [x] Verify the sandbox inventory matches the current MDA backend
surface.

Made by [Open
SWE](https://openswe.vercel.app/agents/80bf7834-2d3a-ec03-c4d9-36d84b664cb2)

Co-authored-by: Eli Verdun <290473658+eli-verdun@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-17 15:24:43 -07:00
github-actions[bot] ee9584a162 chore: update package download counts (#5546)
## Summary
Automated update of package download statistics from pepy.tech and npm

## Details
- Updates download counts in `packages.yml`
- Regenerates provider overview page at
`src/oss/python/integrations/providers/overview.mdx`
- Regenerates integration download tables under `src/snippets/oss/`
- Generated by GitHub Actions workflow `update-package-downloads.yml`
- Scheduled to run every Sunday at 11:59 PM UTC

🤖 This PR was created automatically by GitHub Actions

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2026-08-17 15:24:09 -07:00
langsmith-fleet[bot] 9f3a3b850e Make LANGSMITH_API_KEY primary for gateway; LANGSMITH_GATEWAY_API_KEY as override (#5557)
Fixes DOC-1543

## Summary

- Updates all LLM Gateway docs to present `LANGSMITH_API_KEY` as the
primary authentication key
- Removes examples that explicitly copy `LANGSMITH_API_KEY` into
`LANGSMITH_GATEWAY_API_KEY`
- Reframes `LANGSMITH_GATEWAY_API_KEY` as an optional override for users
who need a different key specifically for gateway calls
- Updates prose, code examples, and bullet lists in 4 files:
  - `src/langsmith/llm-gateway-quickstart.mdx`
  - `src/langsmith/llm-gateway-direct-model-access.mdx`
  - `src/langsmith/manage-prompts-programmatically.mdx`
  - `src/langsmith/managed-deep-agents-agent-definition.mdx`

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1543/flip-gateway-env-var-order-langsmith-api-key-primary-langsmith-gateway
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1787001342365919

## Verification

- `make lint_prose` — no errors in changed files (60 pre-existing errors
in unrelated files)

## Reviewers

Requested review from: @fjmorris, @katmayb

Co-authored-by: Docs Bot <docs-bot@langchain.dev>
2026-08-17 15:21:17 -07:00
Lauren Hirata Singh 2cc2507926 docs: backfill self-hosted release notes dropped by the changelog bot (#5556)
## Why

Ten self-hosted releases published with only the `Internal improvements
and maintenance updates` placeholder even though they shipped real
customer-facing changes. This restores 33 notes.

**Root cause:** the deployed `helm-changelog-bot` runs code from before
2026-06-25, so it only scrapes the legacy `## Self-Hosted Release Note`
PR-body section. Three features merged that day were never deployed (the
repo has no CI, deploys are manual):

- `f3cd4f3` read `.changelog/*.yaml` fragments
- `2537c64` PR-title fallback for fragment-less PRs
- `2bbda07` honor the `skip-changelog` label

As `langchainplus` migrated to fragments, every fragment-sourced note
was silently dropped. Evidence: langsmith-0.16.1 published the polished
*legacy* Release Note from langchainplus#33020, not that PR's fragment
body.

## What changed

Notes re-derived from the fragments and PR titles, following the
resolution order in the bot's current `main`.

| Release | Notes restored |
|---|---|
| 0.16.7 | 1 |
| 0.16.2 | 1 |
| 0.16.0-rc.29 | 5 |
| 0.16.0-rc.28 | 4 |
| 0.16.0-rc.27 | 2 |
| 0.16.0-rc.24 | 6 |
| 0.16.0-rc.23 | 2 |
| 0.16.0-rc.22 | 1 |
| 0.16.0-rc.16 | 10 |
| 0.17.0-rc.1 | 1 |

The fix propagates through the image-dedup links: 0.16.3 and 0.16.4
point at 0.16.2, and 0.17.0-rc.2 through rc.6 point at 0.17.0-rc.1.

## Please review carefully

**Wording.** These were condensed from fragment bodies by hand, not by
the bot's LLM polish step. Past tense per the changelog's established
voice.

**Deliberate exclusions:**

- Two `status: held` fragments still gated behind Eppo flags
(`forge_issue_board_enabled` on 0.16.0-rc.29, `threads_aq` on
0.17.0-rc.1). Worth noting the bot does not check `status` at all, so
once redeployed it would publish gated features early.
- Notes referencing SmithDB, which was not available for self-hosted at
those versions. Matches `SELF_HOSTED_EXCLUDED_TERMS` and the precedent
in #4476.
- Raw internal PR titles with no customer meaning (CI pinning, token
minting, service co-hosting, internal flag gating).

**Untouched and correct:** 0.16.5, 0.16.0-rc.25, rc.20, rc.18, 0.15.17,
and 0.15.16 shipped only chore bumps or opted-out PRs, so their
placeholders are accurate.

## Follow-up outside this PR

1. Redeploy the bot from `main`, and add deploy automation so merges
cannot silently fail to ship again.
2. Teach `get_pr_release_notes` to skip fragments where `status !=
"ready"`.
3. Backport PRs into `v16-stable` carry `self_hosted: false` fragments
authored for Cloud (langchainplus#33187, #33719, and six rc.16 PRs), so
genuinely self-hosted changes are marked Cloud-only.
4. Security fixes are being labeled `skip-changelog`
(langchainplus#33480, vulnerable Python dependency bumps). Self-hosted
operators generally want those.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-08-17 15:16:22 -07:00
ccurme ffeabb4533 oss: document trace_policy on middleware (#5551) 2026-08-17 15:55:44 -04:00
langsmith-fleet[bot] 3566c479ff Update hyperlink text from "LangSmith Gateway" to "LLM Gateway" (#5534)
Fixes DOC-1532

## Summary

- Updates the inline link text from "LangSmith Gateway" to "LLM Gateway"
in the managed deep agents agent definition page, so all references in
the LLM Gateway section are consistent.

## Links

- Linear: https://linear.app/langchain/issue/DOC-1532
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1786596501339629

## Verification

Not run; docs-only copy change.

## Reviewers

Requested review from: @katmayb, @fjmorris

Co-authored-by: Docs Bot <docs-bot@langchain.dev>
2026-08-17 10:48:49 -07:00
langsmith-fleet[bot] db8f496eba Remove "normal" qualifier from MDA middleware and tools surface descriptions (#5533)
Fixes DOC-1540

## Summary

- Remove the word "normal" from the opening sentence on both the MDA
middleware and MDA tools pages
- `managed-deep-agents-middleware.mdx`: "the normal Deep Agents
`middleware` configuration surface" → "the Deep Agents `middleware`
configuration surface"
- `managed-deep-agents-tools.mdx`: "the normal Deep Agents `tools`
configuration surface" → "the Deep Agents `tools` configuration surface"

This was flagged by Eli Verdun as informal — "normal" implies an awkward
hierarchy. Eli suggested just saying "Deep Agents" directly.

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1540/replace-normal-deep-agents-with-clearer-terminology-in-mda-middleware
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1786826676152809

## Verification

Not run; docs-only copy change (two single-word removals).

## Reviewers

Requested review from: @fjmorris, @katmayb

Co-authored-by: Docs Bot <docs-bot@langchain.dev>
2026-08-17 10:48:20 -07:00
langsmith-fleet[bot] 6bd25c52cb Update Agent Server name and add link on MDA overview page (#5531)
## Summary

- On the Managed Deep Agents overview page, renamed "LangSmith Agent
Server" to "LangSmith Deployment's Agent Server" and added a hyperlink
to `/langsmith/agent-server-overview`

## Links

- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1786826031653559

## Verification

Not run; docs-only copy change.

## Reviewers

Requested review from: @fjmorris, @katmayb

Co-authored-by: Docs Bot <docs-bot@langchain.dev>
2026-08-17 10:47:55 -07:00
Lauren Hirata Singh 9e438ea7cc docs: [Self-Hosted Changelog Bot] Changelog updates for new version(s) (#5537)
Automated changelog update created by the LangGraph Server Changelog
Bot.

Feel free to merge anytime.
2026-08-17 10:39:46 -07:00
langsmith-fleet[bot] 9c02826cb4 Weekly changelog: August 10-17, 2026 (#5550)
Week covered: August 10-17, 2026

Source fragments:
- .changelog/2026-08-11-* (21 ready, 5 held)
- .changelog/2026-08-12-* (10 ready, 5 held)
- .changelog/2026-08-13-* (14 ready, 4 held)
- .changelog/2026-08-14-* (4 ready, 0 held)

Held or skipped:
- 14 held fragments stayed out of the published changelog because they
are still gated / not fully rolled out.
- 0 invalid fragments in this week’s range.

Agent involvement: drafted and published by an AI agent.

Co-authored-by: Lauren <lauren@langchain.dev>
2026-08-17 10:38:38 -07:00
langsmith-fleet[bot] 0c88d45d4b Fix sentence case: "managed deep agent" (common noun) across MDA docs (#5532)
Fixes DOC-1538

## Summary

- Follow AGENTS.md style guide: "Managed Deep Agents" (product name,
always capitalized) vs. "a managed deep agent" (common noun — an
instance the user creates, lowercase)
- Fix Tab title from title case `"Model & Configuration"` → sentence
case `"Model & configuration"` in `managed-deep-agents-overview.mdx`
(`#example-agent` section)
- Fix 5 other inline prose occurrences across MDA docs pages where the
singular instance was incorrectly capitalized as a proper noun

**Files changed:**
- `src/langsmith/managed-deep-agents-overview.mdx` — Tab title sentence
case
- `src/langsmith/managed-deep-agents-memory.mdx` — "a Managed Deep
Agent's" → "a managed deep agent's"
- `src/langsmith/managed-deep-agents-mcp-connectors.mdx` — "to a Managed
Deep Agent" → "to a managed deep agent"
- `src/langsmith/managed-deep-agents-channels.mdx` — "a Managed Deep
Agent to" → "a managed deep agent to"
- `src/langsmith/managed-deep-agents-channels-slack.mdx` — 2 instances
of "Managed Deep Agent" → "managed deep agent"
- `src/langsmith/managed-deep-agents-sandboxes.mdx` — "a Managed Deep
Agent" → "a managed deep agent"

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1538/fix-sentence-case-for-managed-deep-agent-and-product-name
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1786826257729819

## Verification

- `make check-cross-refs` —  All cross-references resolved
- `make lint_prose` — No errors in changed files (60 pre-existing errors
in other unrelated files)

## Reviewers

Requested review from: @lnhsingh, @fjmorris

---------

Co-authored-by: Docs Bot <docs-bot@langchain.dev>
2026-08-17 10:31:26 -07:00
github-actions[bot] 64bb22833a chore: refresh LangSmith platform OpenAPI spec (#5548)
## Summary
Automated daily refresh of the LangSmith Platform API spec.

## Details
- Fetched latest spec from api.smith.langchain.com
- Applied post-processing: hid fleet/internal endpoints, added
human-readable group tags
- Output: `src/langsmith/langsmith-platform-openapi.json`
- Generated by `scripts/process_langsmith_openapi.py`

🤖 This PR was created automatically by GitHub Actions

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2026-08-17 17:30:03 +00:00
Mukil Loganathan 8a081f65b2 fix: pin mirrored image examples (#5451)
## Description
The mirroring guide told users to use mutable `latest` tags, which can
lead to mixed service versions during releases. It now directs users to
the Helm chart `appVersion` and uses a concrete version in Docker
examples.

## Test Plan
- [x] Run Vale on the changed page
- [x] Verify the example image tag exists on Docker Hub

Made by [Open
SWE](https://openswe.vercel.app/agents/72c6367c-4a4b-9450-bc47-ab5f5754a7c2)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-17 10:26:09 -07:00
Jake Broekhuizen e20a655e2c docs(langsmith): add Tuned evaluators guide (#5425)
## What

Add a guide for LangChain Tuned evaluators, starting with Perceived
Error. Link the guide from evaluator management, evaluation types, and
multi-turn online evaluator documentation, and add it to the Online
evaluators navigation.

## Why

Tuned evaluators use specialized LangChain-managed judges to attach
feedback to traces without requiring customers to maintain prompts,
models, credentials, or inference infrastructure. The existing docs
cover custom online evaluators but do not explain Tuned evaluator
enablement, project requirements, validation, or operational behavior.

## How

- Explain how Tuned evaluators work and how teams can use Perceived
Error feedback.
- Document organization-level enablement, data handling, and how to
disable the feature.
- Document tracing-project and thread requirements, save-time
message-list validation, filters, sampling, charges, and
troubleshooting.
- Cross-link the guide from related evaluator and multi-turn
documentation.

Related implementation:

-
[langchain-ai/langchainplus#32896](https://github.com/langchain-ai/langchainplus/pull/32896)
-
[langchain-ai/langchainplus#32906](https://github.com/langchain-ai/langchainplus/pull/32906)
-
[langchain-ai/langchainplus#32949](https://github.com/langchain-ai/langchainplus/pull/32949)
-
[langchain-ai/langchainplus#33015](https://github.com/langchain-ai/langchainplus/pull/33015)
-
[langchain-ai/langchainplus#33259](https://github.com/langchain-ai/langchainplus/pull/33259)
-
[langchain-ai/langchainplus#33331](https://github.com/langchain-ai/langchainplus/pull/33331)

## Review notes

Please review the project eligibility, managed-inference data handling,
and usage-charge language against launch behavior.

## Testing

- [x] `make lint_prose FILES="src/langsmith/tuned-evaluators.mdx
src/langsmith/evaluators.mdx
src/langsmith/online-evaluations-multi-turn.mdx
src/langsmith/evaluation-types.mdx"`
- [x] `make broken-links`
- [x] `python3 -m json.tool src/docs.json`
- [x] Verify changed files contain no trailing whitespace.
2026-08-17 09:28:55 -07:00
Mark McDonald 41abc08558 docs(gemini): point to latest models (37F/31P) (#5547)
## Overview
Update Gemini docs to use 3.7 Flash in examples.

## Type of change

**Type:** Update existing documentation

## Related issues/PRs
- Slack thread: 

## Checklist
- [x] I have read the [contributing guidelines](README.md), including
the [language
policy](https://docs.langchain.com/oss/python/contributing/overview#language-policy)
- [x] I have tested my changes locally using `docs dev`
- [x] All code examples have been tested and work correctly
- [x] I have used **root relative** paths for internal links
- [x] I have updated navigation in `src/docs.json` if needed

(Internal team members only / optional): Create a preview deployment as
necessary using the [Create Preview Branch
workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml)

## Additional notes
<!-- Any other information that would be helpful for reviewers -->
2026-08-17 01:26:32 -04:00
Caspar Broekhuizen 372b262313 docs(mda): link to prebuilt middleware docs (#5529)
Link "prebuilt middleware" to the prebuilt middleware documentation.
2026-08-15 11:18:13 -07:00
bentanny e38c0a0697 docs: Describe Engine scan cadence as dynamic instead of fixed-interval (#5522)
## Summary
Removes the hardcoded "every 6 hours" scan-cadence claim from the
LangSmith Engine docs and describes recurring scans as running on a
dynamic schedule tuned to balance cost and performance instead.

- `src/langsmith/engine.mdx`: updated the LCU cost table's "Recurring
scans" trigger and the accompanying prose.
- `src/langsmith/engine-overview.mdx`: updated the "How Engine runs"
section.

## Why this approach?
The scan interval is an internal implementation detail that can change
over time to optimize cost and performance. Documenting a fixed 6-hour
interval creates a stale, overly specific commitment; describing the
cadence as dynamic keeps the docs accurate without needing a follow-up
edit whenever the interval changes.

## Test Plan
- [x] `make lint_prose FILES="src/langsmith/engine.mdx
src/langsmith/engine-overview.mdx"` — 0 errors, 0 warnings, 0
suggestions
- [x] Verified no other `.mdx` file in the repo references Engine's scan
interval as a fixed hour count

## Release Note
Updated the Engine docs to describe scan cadence as dynamic (tuned for
cost/performance) rather than a fixed 6-hour interval.
2026-08-14 16:58:13 -07:00
langsmith-fleet[bot] 51de09f828 Add OTEL_RESOURCE_ATTRIBUTES paragraph to OTel tracing docs (#4718)
Fixes DOC-1333

## Summary

- Adds a new `### Add process-level resource attributes` section to the
OTel tracing docs (`src/langsmith/trace-with-opentelemetry.mdx`), under
the existing "Use environment variables for global configuration"
subsection.
- Explains how to use the standard `OTEL_RESOURCE_ATTRIBUTES` env var to
attach custom metadata (deployment environment, service version, team,
region, etc.) to all traces emitted by a process, without modifying
application code.
- Also adds `OTEL_RESOURCE_ATTRIBUTES` to the existing env var listing
code block.

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1333/add-otel-resource-attributes-paragraph-to-otel-tracing-docs
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1783186731049369

## Verification

Cross-references checked: `make check-cross-refs` . Prose linting
(Vale) not available in sandbox — docs-only copy change.

## Reviewers

Requested review from: @katmayb, @fjmorris

---------

Co-authored-by: Docs Writer Bot <brace@langchain.dev>
Co-authored-by: Kathryn May <44557882+katmayb@users.noreply.github.com>
2026-08-14 15:33:11 -07:00
langsmith-fleet[bot] b03ff811ef Clarify return_direct behavior for parallel tool calls and Command usage (#5069)
Fixes DOC-1430

## Summary

- Expands the `return_direct` docs on parallel tool calls.
`create_agent` routes to `END` only when **every** client-side tool call
in the step has `return_direct=True`; all tools in the batch execute
first, and the final response carries every `ToolMessage`.
- Adds a `<Warning>` for mixed parallel calls: a `return_direct=True`
tool called alongside a normal tool does **not** exit the loop. The
agent routes back to the model with all results.
- Adds a Python-only "Return a Command with return_direct" subsection
covering `Command` returns from a `return_direct` tool, the
matching-`ToolMessage` requirement, and the `graph=Command.PARENT`
escape hatch.
- Corrects the pre-existing "Return a Command" section, which said a
`Command` could be returned "with or without including a `ToolMessage`".
A matching `ToolMessage` is required when the `Command` targets the
current graph.
- Scopes Python-only claims by language. `ToolNode` validation and the
`ValueError` exist only in Python, and the tool call ID accessor differs
between languages, so both now sit in `:::python` / `:::js` fences.

## Correction to an earlier revision of this description

An earlier version of this description claimed the agent exits when
**any** tool in a parallel batch has `return_direct=True`, citing
`chat_agent_executor.py`. That is the behavior of the legacy
`langgraph.prebuilt.create_react_agent`, not the
`langchain.agents.create_agent` this page documents. The two
implementations genuinely differ. The page's `all` wording is correct
and was never changed to `any`.

## Verification

Verified against `langchain-ai/langchain` `master` and
`langchain-ai/langgraph` `main` as of 2026-08-14.

**Parallel `return_direct` (`all`, not `any`):**
`libs/langchain_v1/langchain/agents/factory.py`,
`_make_tools_to_model_edge` → `tools_to_model`. Exit condition is
`client_side_tool_calls and
all(tool_node.tools_by_name[c["name"]].return_direct for c in
client_side_tool_calls)`. A mixed batch falls through to the default
case and routes back to the model.

For contrast, `langgraph`
`libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py`
`route_tool_responses` returns `END` as soon as one trailing
`ToolMessage` matches `should_return_direct`, with an `any(...)`
fallback for tools executed in a separate `Send`. That is
`create_react_agent`, a different entry point.

**`ToolMessage` requirement:** `langgraph`
`libs/prebuilt/langgraph/prebuilt/tool_node.py`,
`_validate_tool_command`. The `ValueError` is guarded by
`require_terminator and updated_command.graph is None and not
has_matching_tool_message`, which confirms both the requirement for the
current graph and that `graph=Command.PARENT` lifts it. Matching is on
`message.tool_call_id == call["id"]`.

**JavaScript:** `langgraphjs`
`libs/langgraph-core/src/prebuilt/tool_node.ts` has no equivalent of
`_validate_tool_command` and never raises on a missing `ToolMessage`, so
the `ValueError` claim is Python-only. `runtime.toolCallId` is confirmed
in `langchainjs` `libs/langchain/src/agents/tests/tools.test.ts`.

**Linting and build:** `make lint_prose` → 0 errors, 0 warnings. `make
build` → clean; the generated JS page keeps the shared requirement and
drops both Python-only blocks. `make check-cross-refs` → all
cross-references resolved.

## Links

- Linear:
https://linear.app/langchain/issue/DOC-1430/document-return-direct-behavior-gaps-on-oss-tools
- Slack:
https://langchain.slack.com/archives/C09G1T60QV9/p1784904894989719

## AI involvement

Drafted by an AI agent and revised by a second agent session, which
verified every behavioral claim against the langchain, langgraph,
langchainjs, and langgraphjs sources. Human review still needed.

## Reviewers

Requested review from: @npentrel, @lnhsingh

---------

Co-authored-by: Docs Bot <brace@langchain.dev>
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 15:29:42 -07:00
Lauren Hirata Singh 8268a3a091 docs: [Self-Hosted Changelog Bot] Changelog updates for new version(s) (#5520)
Automated changelog update created by the LangGraph Server Changelog
Bot.

Feel free to merge anytime.
2026-08-14 15:10:40 -07:00