Infrastructure for running coding agents in Daytona sandboxes, orchestrated by Rivet actors.
┌─────────────────────────────────────────────────────────────┐
│ Server (Hono) │
│ /api/sessions /api/integrations /api/workflows │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Rivet Actor Registry │
│ ┌──────────┐ ┌────────────────────┐ ┌─────────────────┐ │
│ │ Session │ │ IntegrationRegistry│ │ WorkflowRegistry│ │
│ └──────────┘ └────────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Daytona Sandbox │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ sandbox-agent server │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │ │
│ │ │ Claude │ │ Codex │ │OpenCode │ │ Amp │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
npm installCopy env.example to .env and fill in:
# Required
DAYTONA_API_KEY=your-daytona-api-key
ANTHROPIC_API_KEY=your-anthropic-key # For Claude agent
# Optional
OPENAI_API_KEY=your-openai-key # For Codex agentnpm run devcurl -X POST http://localhost:3000/api/sessions \
-H "Content-Type: application/json" \
-d '{"repo": "owner/repo", "author": "user", "agent": "claude"}'| Endpoint | Method | Description |
|---|---|---|
/api/sessions |
GET | List all sessions |
/api/sessions |
POST | Create a new session |
/api/sessions/:id |
GET | Get session status |
/api/sessions/:id/start |
POST | Start the session |
/api/sessions/:id/prompt |
POST | Send prompt to agent |
/api/sessions/:id/trace |
GET | Get event trace |
/api/sessions/:id/stop |
POST | Stop the session |
| Endpoint | Method | Description |
|---|---|---|
/api/integrations |
GET | List all integrations |
/api/integrations/:name |
GET | Describe an integration |
/api/integrations/all |
GET | Get all integration metadata |
| Endpoint | Method | Description |
|---|---|---|
/api/workflows |
GET | List all workflows |
/api/workflows/:name |
GET | Describe a workflow |
npm testnpm run test:sandboxnpm run test:integrationrivet_actor_implementation/
├── src/
│ ├── actors/
│ │ ├── session.ts # Session actor (core)
│ │ ├── integration-registry.ts # Integration discovery
│ │ └── workflow-registry.ts # Workflow discovery
│ ├── sandbox/
│ │ ├── daytona.ts # Daytona sandbox provider
│ │ └── agent.ts # sandbox-agent SDK wrapper
│ ├── config.ts # Configuration
│ ├── types.ts # Shared types
│ ├── registry.ts # Rivet actor registry
│ ├── server.ts # Hono server
│ └── index.ts # Main exports
├── tests/
│ ├── unit/ # Unit tests
│ ├── sandbox/ # Sandbox integration tests
│ └── integration/ # API integration tests
├── package.json
├── tsconfig.json
└── vitest.config.ts
The core actor that wraps a coding agent session:
- Creates Daytona sandbox with sandbox-agent
- Manages agent session lifecycle
- Captures event trace
- Broadcasts real-time updates
Singleton actor for dynamic integration discovery:
- Stores integration metadata
- Provides list/describe APIs
- Tracks configuration status
Singleton actor for workflow discovery:
- Stores workflow metadata
- Provides list/describe APIs
- Tracks deployment status
- Finds workflows by trigger
MIT