Discover and explore top open-source AI tools and projects—updated daily.
mavdolSecure runtime for sandboxed AI agent tasks
Top 97.8% on SourcePulse
Summary
Capsule provides a secure, durable runtime for AI agent tasks, enabling untrusted code execution within isolated WebAssembly sandboxes. It targets developers building complex AI systems who need to manage long-running workflows, large-scale processing, or multi-agent interactions safely, offering robust isolation, resource control, and automatic failure handling.
How It Works
The core approach leverages WebAssembly sandboxing. Python or TypeScript/JavaScript functions are annotated or wrapped as tasks, compiled into Wasm modules, and executed in isolated environments. Capsule enforces resource limits (CPU via fuel metering, RAM, timeouts) and provides automatic retries, ensuring task failures are contained and do not impact the host system or other tasks.
Quick Start & Requirements
pip install capsule-run. TypeScript/JavaScript: npm install -g @capsule-run/cli and npm install @capsule-run/sdk.capsule run <your_file.py> or capsule run <your_file.ts>..capsule directory caches compiled artifacts for faster subsequent runs. capsule build can precompile tasks.Highlighted Details
name, compute (CPU allocation via fuel metering), ram, timeout, max_retries, allowed_files, allowed_hosts, and env_variables.allowed_hosts and allowed_files restrict sandbox network and file system interactions. Python uses a custom capsule.http client, while TS/JS uses standard fetch.capsule build) significantly reduce task initialization latency.Maintenance & Community
The project features an active CI pipeline. No specific community channels (e.g., Discord, Slack) or notable contributors/sponsorships are detailed in the provided README.
Licensing & Compatibility
Limitations & Caveats
Python code executed within Capsule's WebAssembly sandboxes cannot utilize C extensions (e.g., NumPy, Pandas). While the host environment running capsule run or capsule exec retains full Python ecosystem access, sandboxed code is strictly limited to pure Python.
16 hours ago
Inactive
zerobootdev
abshkbh
vercel-labs
alibaba