Back to prompt library
LangChain + E2B Tool Integration
Linked challenge: Sandboxed Memory Profiling for Agent Code Execution with LangChain and E2B
Prompt source
implementation1 lines1 sectionsNo variables0 checklist items
Import `from langchain.agents import initialize_agent` and `from e2b import Sandbox`. Create a LangChain tool named `e2b_runner` that runs Python code inside E2B and returns both the output and peak RAM used.