From 1ad529895696aca2968368be30eb218c9acaf584 Mon Sep 17 00:00:00 2001 From: Ondrej Drapalik Date: Thu, 20 Aug 2026 15:13:34 +0200 Subject: [PATCH] Add E2B to the integrations catalog --- docs/integrations/assets/e2b.png | Bin 0 -> 3654 bytes docs/integrations/e2b.md | 109 +++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 docs/integrations/assets/e2b.png create mode 100644 docs/integrations/e2b.md diff --git a/docs/integrations/assets/e2b.png b/docs/integrations/assets/e2b.png new file mode 100644 index 0000000000000000000000000000000000000000..00819e047b2f4e4a04d70008619292a956c5e910 GIT binary patch literal 3654 zcmeHKX;70168$2OaBKn&A_#&EuA(alY%pj7;wJ*52mud9xd}%=L=ZxvU?9g}RtLnD z73GK^3PFwp1m(WUB@BavI1msb1cZffBoUFs379PI{@$wH-|LUA?$^~-UDfrf>%CjP zKAv!0Q(XW6;3t1LaRvY&pT34RbhFbxBD%eqbP|8Km<#}VhF=2$6cm|kHX+GpJdXox z-p++hpos^)K>(=B(c1{u+QbNg`vt<;glGaOJShtBh{eZ;KdQ@%*xb>5@&tJ98bmS? ze%t)KY47ye2m@17E9x=JyM6|molk?Q65Y}R_H0X@?sq?i1%daB-m<%zwg_`*21d{= z)V*-(&0|f;qK??C0-pWpmL!>)Y!S1&k2N=m?nJYE&U;5>^#A~B+!YGcu4tMATeQ)D zrU3!awiE*f$M_ISN{PlX0EAHh8UlcP8~ApI|3g0T;3{ibhYNf}$iW)3R65~5Pf+`C+e<37;gU8JZjfGx|h8<}xpy9#iYcR%*}+)-P65)QFc z3jKunk-JiN{R^$^Bm2^6cI~L5gu7U9V+96gu%l;txk zL1iiS3Jrb4mGno?*6zQwzXQ5j&^$ESrxTJr?WnKp`!3CvqfuA}UESsSkUQ@$7_V~J z5Gu;$xz9&HPCeRdxpqu?5c?|@HTY(fH9s&cgnpUZf40~)9 zR&H4Vmulh`<=wvhvO|HgieUbd%_QC35^FA8o3gBE_cO;z$FBFLYA}c+|_qX_3e$^L@cpC9N;CKGs<1FU~RrHto46 zP&7f5>}+WoAv{245I^24K4_{%2E2z?u8c9yaJr9GYVAr?-lo)bS@hzGv;8mteS87Y$Z_Oq!50r$A9}ADarJU&gm#_JKaH^vz_jQ zmnAx+lhKFW)|QuZ8d)m~zjq%Xm>3cti0C*a z_vQkdzdcy58Pn;|8F2pB^H%;L2(u+*IR3Ofl;_6B`?fkiE?hD$@9qztFs%tn?tNvW zNrqzj=?bA@Z{rod#{`?O`rFjDR-p^`r-FP@Gj6%?XW>Zn8O3aR>SR_FVo0?l3J#`L zUi5&UPNDg0+>bh;+QrojaRM1<&$T5473F#LzK2)4f{f0JYZ>J0MoAR!@5LWz1%DN_ zM0y}DTY!xDOa7`d&-+`O|F-!yM!VbS;DRTgx{vgrel@fh5%aYUb#cV7tU(y=#%fGB(I=3G zI8kv|lzOXJHOyvIxdQUsn)L@f4N?6fAfS^}Ym&y8EP-;Y#K_8vnarkP z5B6675W-1~Fyz)x`8QV9-+$gQ^vNGNu+*s^gWMa`Y0qUI7@Arh z+vY@2x5UrP?P+!1F|)}QKbByVd#u3GIX_WFPfS?d>YTns zVd)uF23irh-rE>lC^IBz61D5*#u7|A1xlb_H2s)Nj{ zZ`8q5W$U#0nw_A_a@}jVSlmu^whMsGbyM7^J1jL3A&zA}x9Wh$on>25NngQYWN< z`S69%h;(a-h0UtKt)4(3nD;7)AP0#W{SA^NFcHNQLjsN}*M1fmKiUa1sK^_S%aT<@ z@s~8z%hWOw#Zj$PluAOLy|lwW+mo-Hg8bqep`4tKS$Y?o3gz*4tC_%ClNW6vhJPjur6;{TSwet{8T?@*oHDW=(hV!`dG}&)4D}j`@ + Supported in ADKPython + + +The [e2b-adk](https://github.com/e2b-dev/e2b-adk-plugin) plugin connects an ADK +agent to [E2B](https://e2b.dev) sandboxes. It exposes tools for code execution, +shell commands, file operations, and long-running processes while managing the +sandbox lifecycle for the agent. + +## Use cases + +- **Secure code execution**: Run agent-generated code in an isolated, + stateful sandbox instead of on the host machine. +- **Shell command automation**: Install packages, run builds, and inspect the + sandbox filesystem with configurable timeouts and working directories. +- **File workflows**: Write scripts or datasets, run them, and read generated + results back into the agent. +- **Background processes**: Start long-running commands such as development + servers and optionally return a preview URL for an exposed port. + +## Prerequisites + +- Python 3.10 or later +- An [E2B account and API key](https://docs.e2b.dev/api-key) +- A [Gemini API key](https://aistudio.google.com/app/api-keys) + +Set both API keys before running the example: + +```bash +export E2B_API_KEY="your-e2b-api-key" +export GOOGLE_API_KEY="your-google-api-key" +``` + +## Installation + +```bash +pip install e2b-adk +``` + +## Use with agent + +```python +import asyncio + +from e2b_adk import E2BPlugin +from google.adk.agents import Agent +from google.adk.apps import App +from google.adk.runners import InMemoryRunner + + +async def main() -> None: + plugin = E2BPlugin() + root_agent = Agent( + model="gemini-flash-latest", + name="sandbox_agent", + instruction="Use the sandbox to run and verify code before answering.", + tools=plugin.get_tools(), + ) + app = App(name="e2b_app", root_agent=root_agent, plugins=[plugin]) + + async with InMemoryRunner(app=app) as runner: + await runner.run_debug( + "Write and run Python code that calculates the 20th Fibonacci number." + ) + + +if __name__ == "__main__": + asyncio.run(main()) +``` + +The plugin creates a sandbox lazily on the first E2B tool call and closes it +when the runner exits. + +## Available tools + +Tool | Description +---- | ----------- +`run_code` | Execute code in a stateful kernel +`run_command` | Run a shell command in the sandbox +`write_file` | Write a file to the sandbox filesystem +`read_file` | Read a file from the sandbox filesystem +`list_files` | List files and directories at a path +`start_background_command` | Start a long-running process and optionally return a preview URL + +## Configuration + +The `E2BPlugin` constructor accepts optional settings such as `template`, +`envs`, `timeout`, and `lifecycle`. Other supported E2B sandbox creation options +are forwarded to the E2B SDK. See the +[configuration reference](https://github.com/e2b-dev/e2b-adk-plugin#configuration) +for the full option list. + +## Additional resources + +- [Build ADK agents with E2B](https://docs.e2b.dev/agents/google-adk) +- [E2B documentation](https://docs.e2b.dev/) +- [e2b-adk on PyPI](https://pypi.org/project/e2b-adk/) +- [e2b-adk on GitHub](https://github.com/e2b-dev/e2b-adk-plugin) +- [Data analysis agent example](https://github.com/e2b-dev/e2b-adk-plugin/blob/main/examples/data_analysis.py) +- [Code generator agent example](https://github.com/e2b-dev/e2b-adk-plugin/blob/main/examples/code_generator.py)