MCPcopy Index your code
hub / github.com/e2b-dev/e2b-cookbook

github.com/e2b-dev/e2b-cookbook @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
413 symbols 1,605 edges 109 files 21 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

E2B Cookbook Preview Light E2B Cookbook Preview Dark

✴️ E2B Cookbook

Example code and guides for building with E2B SDK.

Read more about E2B on the E2B website and the official E2B documentation.

Examples

Hello World guide

Open-source apps

  • E2B AI Analyst - analyze your data & create interactive charts
  • E2B Fragments - prompt different LLMS to generate apps with UI
  • E2B Surf - computer use AI agent powered by OpenAI

LLM providers

Provider Topic(s) Example Python TypeScript
OpenAI Agents SDK Agentic workflows running in E2B sandboxes Python -
o1, o3-mini Data analysis and visualization of a CSV Python TypeScript
GPT-4o Code interpreter and reasoning on image data Python TypeScript
o1, o3-mini, GPT-4 Code interpreter for ML on dataset Python TypeScript
Codex CLI OpenAI Codex, running inside a Sandbox Python TypeScript
Anthropic Claude 3 Opus Code interpreter Python TypeScript
Claude Code Claude Code, running inside a Sandbox Python TypeScript
Claude Managed Agents Self-hosted worker running inside a Sandbox Python -
Mistral Codestral Code interpreter Python TypeScript
Groq Llama 3 Code interpreter via function calling Python TypeScript
Fireworks AI Qwen2.5-Coder-32B-Instruct Code interpreter Python -
Llama 3.1 405B, 70B, 8B Code interpreter Python -
Together AI Llama 3.1, Qwen 2, Code Llama, DeepSeek Coder Code interpreter Python TypeScript
WatsonX AI IBM Graphite, Llama, Mistral Code interpreter Python TypeScript

AI frameworks integrations

Framework Description Python TypeScript
🦜⛓️ LangChain LangChain with Code Interpreter Python -
🦜🕸️ LangGraph LangGraph with code interpreter Python -
Autogen Autogen with secure sandboxed for code interpreting Python -
▲ Vercel AI SDK Next.js + AI SDK + Code Interpreter - TypeScript
AgentKit AgentKit Coding Agent - TypeScript
Sandbox Agent SDK Run Sandbox Agent inside E2B and connect with the SDK - TypeScript
Stirrup The lightweight framework for building agents Python -

Model Context Protocol (MCP)

Example Description TypeScript
MCP Client Basic MCP client connection to E2B sandbox TypeScript
MCP Custom Server Connect to custom filesystem MCP server from GitHub TypeScript
MCP Custom Template Create custom E2B template with pre-installed MCP servers TypeScript
MCP Research Agent Research agent using arXiv and DuckDuckGo MCP servers TypeScript
MCP Claude Code Claude Code with MCP integration TypeScript
MCP Browserbase Web automation agent using Browserbase MCP server TypeScript
MCP Groq Exa AI research using Groq with Exa MCP server TypeScript

Example use cases

  • Upload dataset and analyze it with Llama 3 - Python
  • Scrape Airbnb and analyze data with Claude 3 Opus and Firecrawl - TypeScript
  • Visualize website topics with Claude 3.5 Sonnet and Firecrawl - Python
  • Next.js app with LLM + Code Interpreter and streaming - TypeScript
  • How to run a Docker container in E2B - Python/TypeScript
  • How to run Playwright in E2B - TypeScript

Extension points exported contracts — how you extend this code

ToolCallResult (Interface)
(no doc)
examples/nextjs-code-interpreter/app/page.tsx

Core symbols most depended-on inside this repo

get
called by 32
examples/anthropic-managed-agents/python/anthropic_managed_agents_e2b/app_sandbox_store.py
write
called by 28
examples/anthropic-managed-agents/javascript/src/app-sandbox-store.ts
requireSetting
called by 20
examples/anthropic-managed-agents/javascript/src/settings.ts
_get
called by 18
examples/openai-agents-sdk/desktop_repl.py
get
called by 16
examples/anthropic-managed-agents/javascript/src/app-sandbox-store.ts
exec
called by 15
examples/openai-agents-sdk/desktop_repl.py
optionValue
called by 13
examples/anthropic-managed-agents/javascript/src/cli.ts
require_anthropic_environment_id
called by 12
examples/anthropic-managed-agents/python/anthropic_managed_agents_e2b/settings.py

Shape

Function 318
Method 56
Class 33
Route 5
Interface 1

Languages

Python66%
TypeScript34%

Modules by API surface

examples/openai-agents-sdk/desktop_repl.py34 symbols
examples/openai-agents-sdk/codex_website.py24 symbols
examples/openai-agents-sdk/sarima_grid_search_parallel.py23 symbols
examples/anthropic-managed-agents/python/anthropic_managed_agents_e2b/app_webhook_server.py18 symbols
examples/openai-agents-sdk/fullstack_code_review_parallel.py17 symbols
examples/anthropic-managed-agents/python/anthropic_managed_agents_e2b/webhook_runtime.py16 symbols
examples/openai-agents-sdk/homepage_prototype_parallel.py15 symbols
examples/openai-agents-sdk/parallel_anomaly_triage.py13 symbols
examples/anthropic-managed-agents/javascript/src/webhook-runtime.ts13 symbols
examples/anthropic-managed-agents/javascript/src/app-webhook-server.ts13 symbols
examples/anthropic-managed-agents/python/anthropic_managed_agents_e2b/sandbox_worker.py12 symbols
examples/openai-agents-sdk/forecast_model_bakeoff.py11 symbols

For agents

$ claude mcp add e2b-cookbook \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact