docs: add Deep Agents integration page - #336
Conversation
`@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).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
🤖 Fallback review bot picking this up. |
aaitor
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
✅ Approved — no blockers, nothing to address.
Inline review: #336 (review)
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_paymentworks on the Deep Agents harness unchanged, including on a tool onetask()delegation hop away from where the buyer supplied the token. LangGraph copiesconfigurableinto subagent tool calls, so the decorator still findsconfig.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
create_deep_agent()returns a compiled graph, solanggraph.jsonworks as-is).langchain-core>=1.6.1) and why the agent usually wants its own virtualenv.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-links→ no 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
langchain-deep-agent-py