Summary
Expand the sandbox execution system to support Docker containers and SSH remote execution as additional isolation backends beyond the existing Native, Claude (srt), and Vercel providers.
Motivation
OpenLoomi currently has a well-architected sandbox system (packages/ai/src/agent/sandbox/) with:
- NativeProvider — direct host execution (no isolation)
- ClaudeProvider — process isolation via Anthropic srt
- VercelProvider — VM isolation via Firecracker MicroVMs
However, it's missing two common enterprise-grade isolation options:
| Backend |
Use Case |
Priority |
| Docker |
Container isolation, reproducible environments |
High |
| SSH |
Remote server execution, CI/CD integration |
Medium |
Current Sandbox Architecture
packages/ai/src/agent/sandbox/
├── types.ts # ISandboxProvider interface
├── plugin.ts # BaseSandboxProvider, defineSandboxPlugin()
├── registry.ts # SandboxRegistry
└── providers/
├── native.ts # ✅ existing
├── claude.ts # ✅ existing
├── vercel.ts # ✅ existing
├── docker.ts # ❌ missing
└── ssh.ts # ❌ missing
Implementation Details
Docker Backend
- Use Docker Engine API or
docker CLI
- Support image specification (node, python, bun)
- Resource limits (CPU, memory, network)
- Volume mounts for workspace
- Container lifecycle management
interface DockerConfig {
image: string; // e.g., \"node:22\", \"python:3.13\"
network: 'bridge' | 'none';
memory?: string; // e.g., \"512m\"
cpu?: number; // e.g., 1
volumes?: string[]; // mount points
}
SSH Backend
- Use
ssh2 library or CLI
- Support key-based and password authentication
- Command execution with timeout
- Stream output back to client
- Connection pooling
interface SSHConfig {
host: string;
port: number;
username: string;
auth: 'key' | 'password';
privateKey?: string;
password?: string;
cwd?: string; // working directory
timeout?: number;
}
Requirements
References
Summary
Expand the sandbox execution system to support Docker containers and SSH remote execution as additional isolation backends beyond the existing Native, Claude (srt), and Vercel providers.
Motivation
OpenLoomi currently has a well-architected sandbox system (
packages/ai/src/agent/sandbox/) with:However, it's missing two common enterprise-grade isolation options:
Current Sandbox Architecture
Implementation Details
Docker Backend
dockerCLISSH Backend
ssh2library or CLIRequirements
ISandboxProviderinterfaceexec()andrunScript()methodsBuiltinSandboxProviderTypegetDockerConfigSchema(),getSSHConfigSchema()SandboxRegistryReferences