Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Summary
A native Clawdbot feature for spinning up isolated, persistent Linux execution environments โ like Sprites but self-hosted.
The Problem
When agents need to run untrusted code, execute long-running tasks, or have persistent workspaces, they currently have limited options:
- Run directly on the host (risky)
- Manually SSH into servers (clunky)
- Use external services like Sprites (cost, dependency)
The Vision
# From anywhere - CLI, Clawdbot, CI
clawdspace create dev
clawdspace exec dev "npm install && npm test"
clawdspace stop dev # Pause (no CPU cost)
clawdspace start dev # Resume instantly
clawdspace destroy devOr as a native Clawdbot tool:
clawdspace:
action: exec
space: agent-workspace
command: "python3 analyze.py"Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLIENTS โ
โ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โclawdspace โ โ Clawdbot โ โ Web UI โ โ
โ โ CLI โ โ (native) โ โ (future) โ โ
โ โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ โ
โ โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ โ
โ โ HTTPS/WSS โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HOST SERVER (Oracle, VPS, etc) โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Clawdspace API Server โ โ
โ โ โข REST + WebSocket exec streaming โ โ
โ โ โข API key or Tailscale identity auth โ โ
โ โ โข Auto-sleep after idle timeout โ โ
โ โ โข File upload/download โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Docker API โ
โ โโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโ โ
โ โSpace 1 โ โSpace 2 โ โSpace 3 โ โSpace N โ โ
โ โ(paused)โ โ(runningโ โ(runningโ โ(paused)โ โ
โ โโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Proposed API
| Endpoint | Description |
|---|---|
POST /spaces |
Create space |
GET /spaces |
List all |
GET /spaces/:name |
Get details |
DELETE /spaces/:name |
Destroy |
POST /spaces/:name/exec |
Execute (WebSocket for streaming) |
POST /spaces/:name/stop |
Pause container |
POST /spaces/:name/start |
Resume container |
PUT /spaces/:name/files/* |
Upload file |
GET /spaces/:name/files/* |
Download file |
POST /spaces/:name/checkpoint |
Snapshot (future, needs CRIU) |
POST /spaces/:name/restore |
Restore snapshot |
Key Features
1. Isolation
Each space is a Docker container with:
- Separate filesystem
- Resource limits (CPU, RAM)
- Network isolation (optional)
- Non-root user by default
2. Persistence
- Files persist between exec calls
- Spaces survive server restarts
- Optional persistent volumes
3. Auto-Sleep
Every 60 seconds:
For each running space:
If last_activity > 10 minutes:
docker pause $container
status = "sleeping"
On exec request:
If sleeping: unpause first (~100ms)
Run command
Update last_activity
4. Clawdbot Integration
- Native tool for agents
- Each agent could have its own persistent space
- Code execution happens in isolation by default
- No manual setup required
Use Cases
- Safe code execution โ Run LLM-generated code without risking the host
- Per-user workspaces โ Each user/agent gets isolated environment
- Long-running tasks โ Start a job, disconnect, come back later
- Dev environments โ Consistent, reproducible setups
- CI/testing sandboxes โ Spin up, test, destroy
Prior Art
- Sprites โ Fly.io hosted version (Firecracker VMs, checkpoint/restore)
- E2B โ Cloud sandboxes for AI
- Modal โ Serverless containers
- Gitpod โ Cloud dev environments
Implementation Options
Option A: Standalone Service
- Separate repo/binary
- Clawdbot connects via HTTP
- Can be used independently
Option B: Clawdbot Plugin
- Built into Clawdbot
- Configured in clawdbot.yaml
- Tighter integration
Option C: Hybrid
- Core API is standalone
- Clawdbot has native tool that talks to it
Open Questions
- Should this be part of Clawdbot core or a separate service?
- How should auth work? (API keys, Tailscale identity, Clawdbot sessions?)
- Should spaces be tied to Clawdbot sessions/agents?
- Multi-host support? (Route to different servers based on load/location)
- Billing/metering for hosted version?
Proof of Concept
Already built a basic version on an Oracle ARM server:
- Docker-based containers
- CLI wrapper for create/exec/stop/start/destroy
- Works, but requires SSH access
The proposal is to make this a proper API-driven service with Clawdbot integration.
Idea from exploring Sprites and wanting a self-hosted equivalent.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Type
Fields
Priority
None yet
Activity
adam91holt commentedon Jan 10, 2026
๐ Proof of Concept Implemented!
I've built a working implementation of Clawdspace:
Repository: https://github.com/adam91holt/clawdspace
What's Included
packages/api/) - Express server with Docker integrationpackages/web/) - Vite + React + TypeScriptpackages/cli/) - Bash script for local controldocker/) - Ubuntu 24.04 sandbox environmentFeatures Working
โ Create/destroy spaces
โ Pause/resume (auto-unpauses on exec)
โ Execute commands with output streaming
โ Auto-sleep after 10 min idle
โ Web dashboard with real-time stats
โ API key authentication
โ System monitoring (CPU, RAM, disk)
Dashboard Screenshot
Live Demo
Currently running on an Oracle ARM server (24GB RAM, 4 CPU):
Architecture
graph TB CLI[CLI Tool] --> API[Express API] Web[React Dashboard] --> API API --> Docker[Docker Engine] Docker --> S1[Space 1] Docker --> S2[Space 2] Docker --> S3[Space N]Next Steps for Integration
Let me know what you think ๐ฆ
thewilloftheshadow commentedon Jan 13, 2026
@joshp123 ๐
adam91holt commentedon Jan 13, 2026
โ Progress update: Clawdspace is live + Clawdbot tool integration is working
Clawdspace is now past โidea/PoCโ โ weโre using it in anger as a real execution substrate for agents.
Whatโs working today (end-to-end)
How Clawdbot fits (this is the important part)
We now have a Clawdbot-side extension that exposes Clawdspace as a native tool โ so agents can create a space, exec, and move files without SSHing into servers or relying on a local CLI.
Architecture diagram
What we should decide next
If we align on the above, we can turn this into a documented, supported โdefault execution sandboxโ path for Clawdbot agents.
joshp123 commentedon Jan 13, 2026
Discussing on discord!
sebslight commentedon Jan 19, 2026
Moved to discussion