Skip to content

docs: document overriding default middleware by name#4701

Merged
Nishitha M (imnishitha) merged 14 commits into
mainfrom
open-swe/deepagents-middleware-override-docs
Jul 7, 2026
Merged

docs: document overriding default middleware by name#4701
Nishitha M (imnishitha) merged 14 commits into
mainfrom
open-swe/deepagents-middleware-override-docs

Conversation

@imnishitha

@imnishitha Nishitha M (imnishitha) commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

Depends on:

Documents two related Python deepagents behaviors:

  • A middleware= (or SubAgent's middleware) instance whose.namematches a default replaces that default in place instead of erroring on duplicate middleware. Updates the default middleware stack, the middleware= table row, and the SubAgent.middleware field description, and adds a new "Override a default middleware instance" section with an example.
  • The new tools allowlist on FilesystemMiddleware for enabling or disabling individual built-in filesystem tools (ls, read_file, write_file, edit_file, delete, glob, grep, execute), which relies on the middleware-override behavior above to swap in a restricted FilesystemMiddleware instance. Adds a "Restricting filesystem tools" example.

Scoped to Python docs only (:::python fences), since both changes only shipped in the Python SDK.

Test Plan

  • vale (prose lint) passes clean on the changed files
  • markdownlint shows no new violations introduced (same pre-existing count before/after)

Opened collaboratively by Nishitha Madhu and open-swe

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added internal deepagents For docs changes to Deep Agents oss labels Jul 2, 2026
Nishitha M (imnishitha) and others added 3 commits July 2, 2026 15:00
…ubagents

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added the langchain For docs changes to LangChain label Jul 2, 2026
@imnishitha Nishitha M (imnishitha) marked this pull request as ready for review July 2, 2026 18:22
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening a docs PR, Nishitha M (@imnishitha)! When it's ready for review, please add the relevant reviewers:

  • @npentrel or @lnhsingh (Deep Agents)
  • @npentrel or @lnhsingh (LangChain)

Comment thread src/oss/deepagents/customization.mdx Outdated
Comment thread src/oss/deepagents/customization.mdx Outdated
Comment thread src/oss/deepagents/customization.mdx Outdated
Comment thread src/oss/deepagents/customization.mdx Outdated
Comment thread src/oss/deepagents/subagents.mdx Outdated
Comment thread src/oss/deepagents/overview.mdx Outdated
Comment thread src/oss/deepagents/overview.mdx Outdated
Comment thread src/oss/deepagents/overview.mdx Outdated
Comment thread src/oss/deepagents/overview.mdx Outdated
@npentrel

Copy link
Copy Markdown
Contributor

mostly phrasing changes: I found some sentences hard to follow. The Accorrdion has to entirely be in the python flag otherwise we'll have an empty accordion for javascript

Comment thread src/oss/deepagents/customization.mdx Outdated
Comment thread src/oss/deepagents/overview.mdx Outdated
Comment thread src/oss/deepagents/customization.mdx
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Mintlify preview branch generated: preview-opensw-1783454697-4d4e2b4

Site preview: https://langchain-5e9cc07a-preview-opensw-1783454697-4d4e2b4.mintlify.app

Important

Preview links may take a few minutes to start working while the deployment finishes.

Changed documentation pages (preview deep links):

@imnishitha Nishitha M (imnishitha) merged commit 5d921ac into main Jul 7, 2026
24 checks passed
@imnishitha Nishitha M (imnishitha) deleted the open-swe/deepagents-middleware-override-docs branch July 7, 2026 20:07
Lauren Hirata Singh (lnhsingh) added a commit that referenced this pull request Jul 7, 2026
## Description

Adds a single consolidated changelog entry for the `deepagents` 0.7.0
alpha releases, covering the `delete` filesystem tool, `write_file`
overwrite behavior, default middleware override by name, and the
`FilesystemMiddleware` tools allowlist (already documented in #4746,
#4680, #4701). Individual alpha versions (a1, a2, ...) are not called
out separately.

## Test Plan
- [ ] `npx markdownlint-cli src/oss/python/releases/changelog.mdx` — no
new lint errors introduced by this change

_Opened collaboratively by Nishitha Madhu and open-swe_

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents For docs changes to Deep Agents internal langchain For docs changes to LangChain oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants