Skip to content

Sandbox Code Execution

AI Scientist includes a built-in secure Python execution environment — a sandbox — that allows you to run custom code for data processing and analysis tasks that go beyond the built-in tools. The sandbox runs in an isolated environment, ensuring your data and system remain safe.

The sandbox is useful when you need to:

  • Process custom data formats — parse non-standard file formats or transform data between formats
  • Perform batch calculations — apply the same analysis across hundreds of sequences or data points
  • Create custom visualizations — generate plots or charts tailored to your specific data
  • Integrate cross-tool results — combine outputs from multiple AI Scientist tools into a unified analysis

The sandbox supports standard Python with access to common scientific libraries:

  • Batch data processing — read, transform, and write large datasets using loops and list comprehensions
  • Conditional logic — apply different processing rules based on data characteristics (e.g., filter sequences by length, classify results by score threshold)
  • Cross-tool data integration — pull results from previous AI Scientist operations (sequence analyses, primer designs, BLAST results) and combine them into custom analyses
  • Custom calculations — implement domain-specific formulas, statistical tests, or scoring functions not covered by the built-in tools

The sandbox is not a standalone tool — it integrates with your ongoing research session. AI Scientist can automatically write and execute Python code on your behalf when a request requires custom processing. You can also provide your own code snippets for the sandbox to execute.

Results from sandbox execution (tables, numbers, plots) are displayed inline in your conversation and can be referenced by subsequent AI Scientist operations.