Daytona offers secure and elastic infrastructure for runnning your AI-generated code. At Agno, we integrate with it to enable your Agents and Teams to run code in your Daytona sandboxes.Documentation Index
Fetch the complete documentation index at: https://agno-v2-shaloo-ai-support-link.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
The Daytona tools require thedaytona_sdk Python package:
Example
The following example demonstrates how to create an agent that can run Python code in a Daytona sandbox:cookbook/14_tools/daytona_tools.py
Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | str | None | Daytona API key. If not provided, uses DAYTONA_API_KEY env var |
api_url | str | None | Daytona API URL. If not provided, uses DAYTONA_API_URL env var |
sandbox_id | str | None | Existing sandbox ID to connect to |
sandbox_language | CodeLanguage | CodeLanguage.PYTHON | The programming language to run on the sandbox |
sandbox_target | str | None | The target configuration for sandbox creation |
sandbox_os | str | None | The operating system to run on the sandbox |
auto_stop_interval | int | 60 | Stop sandbox after this many minutes of inactivity |
sandbox_os_user | str | None | The user to run the sandbox as |
sandbox_env_vars | Dict[str, str] | None | Environment variables to set in the sandbox |
sandbox_labels | Dict[str, str] | None | Labels to set on the sandbox |
sandbox_public | bool | None | Whether the sandbox should be public |
organization_id | str | None | The organization ID to use for the sandbox |
timeout | int | 300 | Timeout in seconds for communication with the sandbox |
auto_create_sandbox | bool | True | Whether to automatically create a sandbox if none exists |
verify_ssl | bool | False | Whether to verify SSL certificates |
persistent | bool | True | Whether the sandbox should persist between requests |
instructions | str | None | Custom instructions for using the Daytona tools |
add_instructions | bool | False | Whether to add default instructions |
Code Execution Tools
| Function | Description |
|---|---|
run_python_code | Run Python code in the contextual Daytona sandbox |
run_code | Run non-Python code in the contextual Daytona sandbox |
include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.
Developer Resources
- View Tools
- View Daytona Documentation