docs: add LangChain and LangGraph integration guide#326
Conversation
Adds docs/best-practices/use-langchain-langgraph.md walking through how to use OpenKruise Agents' E2B-compatible API from LangChain and LangGraph agents. Covers SDK configuration (including the customized_e2b patch_e2b shim for the private protocol), a one-shot LangChain @tool example, and a LangGraph workflow that keeps a single sandbox alive across multiple tool calls.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @deepak0x! It looks like this is your first PR to openkruise/agents 🎉 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #326 +/- ##
==========================================
+ Coverage 74.65% 74.69% +0.04%
==========================================
Files 141 141
Lines 9836 9836
==========================================
+ Hits 7343 7347 +4
+ Misses 2183 2181 -2
+ Partials 310 308 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ⅰ. Describe what this PR does
Adds
docs/best-practices/use-langchain-langgraph.md, a how-to guide for using OpenKruise Agents' E2B-compatible API from LangChain and LangGraph agents. It mirrors the layout of the existinguse-e2b.mdand links to the runnableexamples/code_interpretertemplate and thesdk/customized_e2bshim.The guide covers:
patch_e2bshim for the private protocol@toolexample that claims a fresh sandbox per call (create_react_agent)e2b.agents.kruise.io/csi-*metadata keys, and timeout configurationⅡ. Does this pull request fix one issue?
fixes #62
Ⅲ. Describe how to verify it
Render the markdown locally (or via the GitHub PR preview) and confirm:
./use-e2b.md,../../examples/code_interpreter/sandboxset.yaml,../../sdk/customized_e2b/README.md).--e2b-max-timeoutflag referenced in the doc matchexamples/code_interpreter/README.mdandcmd/sandbox-manager/main.go:82respectively.Ⅳ. Special notes for reviews
Pure docs change — no code touched. The location under
docs/best-practices/follows the existinguse-e2b.mdprecedent and answers the open scoping question @Daiwik-1901 raised in the issue thread.