Skip to content

docs: add Deep Agents integration page - #336

Merged
r-marques merged 1 commit into
mainfrom
docs/deep-agents-integration
Sep 1, 2026
Merged

docs: add Deep Agents integration page#336
r-marques merged 1 commit into
mainfrom
docs/deep-agents-integration

Conversation

@r-marques

Copy link
Copy Markdown
Member

What

Adds integrate/add-to-your-agent/deep-agents.mdx — a guide for charging for a capability that lives inside a Deep Agents subagent.

@requires_payment works on the Deep Agents harness unchanged, including on a tool one task() delegation hop away from where the buyer supplied the token. LangGraph copies configurable into subagent tool calls, so the decorator still finds config.configurable.payment_token. That property is what makes the harness usable for monetized capabilities at all — a deep agent's premise is that the supervisor hands work to subagents — and nothing documented it.

Contents

  • The delegation hop, with a diagram of where the token enters and where it is read.
  • A quick start that puts the paid tool only on the subagent, so every paid call crosses the boundary.
  • Deployment (unchanged — create_deep_agent() returns a compiled graph, so langgraph.json works as-is).
  • The LangChain v1 version floor (langchain-core>=1.6.1) and why the agent usually wants its own virtualenv.
  • Two harness behaviours that are easy to miss:
    • a deep agent decides for itself how many subagent calls a request warrants, so one user turn can settle credits several times — cap it per run;
    • two LLM layers can paraphrase the paid tool's output, or worse, answer from their own knowledge and give the capability away free.
  • A harness comparison table against plain create_react_agent.

Also adds the nav entry in docs.json (edited as text) and a cross-link <Note> from the LangChain page.

Verification

mintlify broken-linksno broken links. Because that check can go green having scanned nothing when MDX fails to parse, I also ran a canary: a deliberately broken link in the new page was caught (found 1 broken links in 1 files), then reverted — so the green is real.

Related

`@requires_payment` works unchanged on LangChain's Deep Agents harness,
including on a tool that lives inside a subagent — the x402 token a buyer
puts on the run survives the `task()` delegation hop, because LangGraph
copies `configurable` into subagent tool calls. That property is what
makes the harness usable for monetized capabilities at all, and nothing
documented it.

New page covers the delegation hop, a quick start that puts the paid tool
on a subagent, deployment (unchanged — create_deep_agent returns a
compiled graph), and the LangChain v1 version floor.

Also documents the two harness behaviours that need designing around and
are easy to miss: a deep agent decides for itself how many subagent calls
a request warrants, so one user turn can settle credits several times;
and two LLM layers can paraphrase the paid tool's output or, worse,
answer from their own knowledge and give the capability away free.

Verified with `mintlify broken-links` (including a canary check that the
link checker was actually scanning the new page).
@r-marques
r-marques requested a review from a team as a code owner September 1, 2026 12:00
@mintlify

mintlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Nevermined 🟢 Ready View Preview Sep 1, 2026, 12:01 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@aaitor

aaitor commented Sep 1, 2026

Copy link
Copy Markdown
Member

🤖 Fallback review bot picking this up.

@aaitor aaitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback docs review (docs#336) — new Deep Agents integration page + nav entry + a langchain.mdx cross-link.

Checked the code samples against the actual SDK rather than eyeballing them: payments_py.x402.langchain exports requires_payment / PaymentRequiredError / last_settlement at the #267 head, and the decorator signature matches its docstring — so the imports and usage are real. The delegation-hop explanation and the two harness caveats (multi-billing per turn, supervisor answering from its own knowledge) match the behaviour the PR describes. Nav (docs.json) and the reciprocal langchain.mdx note are both in place.

No blockers, no should-fix. Nice page.

@aaitor aaitor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — no blockers, nothing to address.

Inline review: #336 (review)

@r-marques
r-marques merged commit eb1090e into main Sep 1, 2026
2 checks passed
@r-marques
r-marques deleted the docs/deep-agents-integration branch September 1, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants