Code interpreting for your AI app

E2B's Code Interpreter SDK allows you to add code interpreting capabilities to your AI apps.

With code interpreting, you can build apps like:

  • AI code execution
  • Data analysis with AI
  • AI tutors
  • Reasoning modules for LLM

Quickstart

1. Install SDK

npm i @e2b/code-interpreter

2. Execute code with code interpreter inside sandbox

import { CodeInterpreter } from '@e2b/code-interpreter'

const sandbox = await CodeInterpreter.create()
await sandbox.notebook.execCell('x = 1')

const execution = await sandbox.notebook.execCell('x+=1; x')
console.log(execution.text)  // outputs 2

await sandbox.close()

3. Hello World guide

Dive depeer and check out the JavaScript and Python Hello World guides to learn how to connect the code interpreter to LLMs.