Suna - Open Source Generalist AI Agent
Suna - Open Source Generalist AI Agent
https://github.com/kortix-ai/suna
https://github.com/fanqingsong/suna
(that acts on your behalf)
Suna is a fully open source AI assistant that helps you accomplish real-world tasks with ease. Through natural conversation, Suna becomes your digital companion for research, data analysis, and everyday challenges—combining powerful capabilities with an intuitive interface that understands what you need and delivers results.
Suna's powerful toolkit includes seamless browser automation to navigate the web and extract data, file management for document creation and editing, web crawling and extended search capabilities, command-line execution for system tasks, website deployment, and integration with various APIs and services. These capabilities work together harmoniously, allowing Suna to solve your complex problems and automate workflows through simple conversations!
Suna consists of four main components:
Python/FastAPI service that handles REST endpoints, thread management, and LLM integration with Anthropic, and others via LiteLLM.
Next.js/React application providing a responsive UI with chat interface, dashboard, etc.
Isolated execution environment for every agent - with browser automation, code interpreter, file system access, tool integration, and security features.
Handles data persistence with authentication, user management, conversation history, file storage, agent state, analytics, and real-time subscriptions.
Suna can be self-hosted on your own infrastructure using our comprehensive setup wizard. For a complete guide to self-hosting Suna, please refer to our Self-Hosting Guide.
The setup process includes:
- Setting up a Supabase project for database and authentication
- Configuring Redis for caching and session management
- Setting up Daytona for secure agent execution
- Integrating with LLM providers (Anthropic, OpenAI, OpenRouter, etc.)
- Configuring web search and scraping capabilities (Tavily, Firecrawl)
- Setting up QStash for background job processing and workflows
- Configuring webhook handling for automated tasks
- Optional integrations (RapidAPI, Smithery for custom agents)
daytona
https://www.daytona.io/
Fast, Scalable, Stateful
Infrastructure for AI Agents.
from daytona_sdk import Daytona daytona = Daytona() workspace = daytona.create() response = workspace.process.code_run( 'print("Hello World!")' ) print(response.result) response = workspace.process.exec( 'echo "Hello World from exec!"', cwd="/home/daytona", timeout=10 ) print(response.result) file_content = b"Hello, World!" workspace.fs.upload_file("/home/daytona/data.txt", file_content)
根据 [Daytona官网](https://www.daytona.io/) 的信息,Daytona确实是一个很有意思的AI代码执行平台,让我为你解答关于本地使用和云服务的问题:
## 🏠 本地使用 vs 云服务
### ✅ **可以本地使用**
从网站信息看,Daytona支持多种部署方式:
1. **Python SDK安装**:
```bash
pip install daytona
```
2. **自托管能力**:
- 网站明确提到"self-host"功能
- "run anywhere"的架构设计
- FAQ中有"Can I Run My Own Instance of Daytona?"
3. **本地使用示例**:
```python
from daytona import Daytona, CreateSandboxParams
daytona = Daytona()
sandbox = daytona.create()
# 安全执行代码
response = sandbox.process.code_run('print("Hello World!")')
print(response.result)
```
### 🌩️ **云服务选项**
Daytona提供多种服务模式:
- **托管云服务**:官方提供的云端基础设施
- **企业私有部署**:可以在自己的基础设施上运行
- **混合模式**:根据需求灵活选择
## 🔧 **核心特性**
### **安全执行环境**:
- **90ms快速沙盒创建**
- **完全隔离的运行时保护**
- **零风险执行AI生成的代码**
### **丰富的API支持**:
- 进程执行和命令运行
- 文件系统CRUD操作
- Git集成和凭证管理
- 内置LSP语言服务器支持
## 🎯 **适用场景**
特别适合你的项目需求:
- **AI代理代码执行**:安全运行AI生成的代码
- **代码解释器**:实时输出流的隔离环境
- **AI评估**:并行环境中的可重现状态快照
- **数据可视化**:让AI代理运行代码并渲染图表
## 💡 **建议**
对于你的项目,我建议:
1. **先尝试本地版本**:
```bash
pip install daytona
```
2. **评估性能需求**:
- 本地版本适合开发和小规模使用
- 云服务适合生产环境和大规模并发
3. **企业需求考虑**:
- 如需完全控制数据,选择自托管
- 如需全球低延迟,选择云服务
总的来说,**Daytona不强制使用云服务**,你完全可以通过`pip install daytona`开始本地使用,这对于开发和测试阶段是完全足够的!