Althea's Code Agent is a sandboxed Python execution environment. It generates scripts, installs dependencies, runs code, and returns results—including plots and metrics—directly in the chat interface.
Agent Orchestration
The Code Agent operates as one tool in Althea's broader toolkit. A single user request can trigger multiple agents in sequence.
For example, when asked to verify the implementation of a research paper:
"Find the official code base of the FSNet paper (NeurIPS 2025), clone the repo and figure out if they use dropout."
Althea first dispatches the Research Agent to locate the paper and its associated repository. Once found, the results are passed to the Code Agent, which clones the repo and performs the requested analysis.

This orchestration pattern applies to other tools. A Deep Research query can produce citations that the Code Agent then validates by inspecting the linked source code. A web search can retrieve a dataset URL that the Code Agent downloads and analyzes.
Running Experiments
The Code Agent executes arbitrary Python in a secure, ephemeral sandbox. This is useful for quick prototyping without polluting your local environment.
"Run a small experiment to see if a random forest classifier overfits on the iris dataset with default parameters."

The agent formulates a plan, generates the script, and ensures the necessary dependencies are installed.

Execution occurs in a sandboxed container.

Results—including generated plots and computed metrics—are returned directly in the chat.

Data Uploads
You can upload datasets (CSV, JSON, or other files) directly into the chat. The Code Agent has access to these files during execution. Maximum file size is a few gigabytes.
