Code Interpreter
A sandboxed code-execution tool an AI agent can call to run scripts, do math, analyse files, or generate charts on the fly.
In plain English
A code interpreter is a tool that lets an LLM write and run code — usually Python — inside a safe sandbox. The model writes a snippet, the sandbox runs it, the output (text, numbers, files, charts) feeds back into the conversation.
Why it's transformative: LLMs are bad at exact arithmetic and statistics. Give them a code interpreter and they can solve any task that's expressible as code: data analysis on uploaded CSVs, image manipulation, web-scraping scripts, complex math, regex on log files.
Where you see it:
- ChatGPT Advanced Data Analysis (the original Code Interpreter)
- Claude's analysis tool (Anthropic's equivalent)
- Gemini's code execution
- Open-source equivalents — Open Interpreter, E2B, Modal sandboxes
How it works under the hood: The sandbox is usually a short-lived Docker container or a process-isolated VM with Python plus common data-science libraries pre-installed. State persists across calls within a session; files can be uploaded in and downloaded out.