Overview
Daytona sandboxes enable secure, isolated execution of AI-generated data analysis code. Build agents that can explore datasets, generate visualizations, and provide insights - all through natural language prompts.Key Capabilities
Secure Code Execution
- AI-generated Python code runs in isolated sandboxes
- No risk to host system from untrusted code
- Automatic environment setup and cleanup
- Package installation on demand
Natural Language Interface
- Describe analysis tasks in plain English
- Agent generates appropriate Python code
- Automatic chart and visualization generation
- Structured result extraction
File Management
- Upload datasets to sandbox environments
- Download generated charts and reports
- Process multiple files in batch
- Persistent storage during analysis session
Framework Integration
LangChain Integration
LangChain provides powerful agent capabilities with theDaytonaDataAnalysisTool.
Example: Vehicle Price Analysis
- Multi-step reasoning and planning
- Automatic artifact handling (charts, tables)
- Dataset upload with metadata
- Custom result handlers
- Sandbox file management
OpenAI Direct Integration
Build custom data analysis workflows with OpenAI’s API. Python Example: Cafe Sales AnalysisAdvanced Patterns
Recursive Analysis with DSPy
DSPy enables recursive language models that can call sub-LLMs during analysis. Example: RLM with Daytona- RLM prompts LLM with task and REPL history
- LLM generates Python code
- Code executes in Daytona sandbox (persistent REPL)
- Code can call
llm_query()for sub-reasoning - Output appends to history
- Loop continues until
SUBMIT()called
Custom Tools Integration
Best Practices
Dataset Preparation
Error Handling
Result Processing
Package Management
Common Use Cases
Exploratory Data Analysis
Time Series Analysis
Statistical Modeling
API Reference
DaytonaDataAnalysisTool (LangChain)
Related Resources
- AI Coding Agents - Build autonomous coding agents
- Jupyter Notebooks - Interactive analysis environments
- Multi-Agent Systems - Coordinate multiple analysis agents
- Python SDK - Direct sandbox control