Examples
- Examples
- Getting Started
- Agents
- Teams
- Workflows
- Applications
- Streamlit Apps
- Evals
Agent Concepts
- Reasoning
- Multimodal
- RAG
- User Control Flows
- Knowledge
- Memory
- Async
- Hybrid Search
- Storage
- Tools
- Search
- Social
- Web Scraping
- Database
- Local
- APIs & External Services
- Airflow Tools
- Apify Tools
- AWS Lambda Tools
- Cal.com Tools
- Composio Tools
- Confluence Tools
- DALL-E Tools
- Daytona Code Execution
- Desi Vocal Tools
- E2B Code Execution
- Fal Tools
- Financial Datasets Tools
- Giphy Tools
- GitHub Tools
- Google Calendar Tools
- Google Maps Tools
- Jira Tools
- Linear Tools
- Luma Labs Tools
- MLX Transcribe Tools
- Models Labs Tools
- OpenBB Tools
- Replicate Tools
- Resend Tools
- Todoist Tools
- YFinance Tools
- YouTube Tools
- Zendesk Tools
- MCP
- Vector Databases
- Context
- Embedders
- Agent State
- Observability
- Miscellaneous
Models
- Anthropic
- AWS Bedrock
- AWS Bedrock Claude
- Azure AI Foundry
- Azure OpenAI
- Cerebras
- Cerebras OpenAI
- Cohere
- DeepInfra
- DeepSeek
- Fireworks
- Gemini
- Groq
- Hugging Face
- IBM
- LM Studio
- LiteLLM
- LiteLLM OpenAI
- Meta
- Mistral
- NVIDIA
- Ollama
- OpenAI
- Perplexity
- Together
- XAI
- Vercel
APIs & External Services
Daytona Code Execution
Learn to use Agno’s Daytona integration to run your Agent-generated code in a secure sandbox.
Code
cookbook/tools/daytona_tools.py
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.daytona import DaytonaTools
daytona_tools = DaytonaTools()
# Setup an Agent focused on coding tasks, with access to the Daytona tools
agent = Agent(
name="Coding Agent with Daytona tools",
agent_id="coding-agent",
model=Claude(id="claude-sonnet-4-20250514"),
tools=[daytona_tools],
markdown=True,
show_tool_calls=True,
instructions=[
"You are an expert at writing and validating Python code. You have access to a remote, secure Daytona sandbox.",
"Your primary purpose is to:",
"1. Write clear, efficient Python code based on user requests",
"2. Execute and verify the code in the Daytona sandbox",
"3. Share the complete code with the user, as this is the main use case",
"4. Provide thorough explanations of how the code works",
"You can use the run_python_code tool to run Python code in the Daytona sandbox.",
"Guidelines:",
"- ALWAYS share the complete code with the user, properly formatted in code blocks",
"- Verify code functionality by executing it in the sandbox before sharing",
"- Iterate and debug code as needed to ensure it works correctly",
"- Use pandas, matplotlib, and other Python libraries for data analysis when appropriate",
"- Create proper visualizations when requested and add them as image artifacts to show inline",
"- Handle file uploads and downloads properly",
"- Explain your approach and the code's functionality in detail",
"- Format responses with both code and explanations for maximum clarity",
"- Handle errors gracefully and explain any issues encountered",
],
)
agent.print_response(
"Write Python code to generate the first 10 Fibonacci numbers and calculate their sum and average"
)
Was this page helpful?
On this page
Assistant
Responses are generated using AI and may contain mistakes.