Official SDKs for Hopx.ai - Secure, isolated cloud sandboxes that spin up in ~100ms.
Hopx provides lightweight VM sandboxes perfect for:
- 🤖 AI Agents - Safe code execution environments for LLMs
- 🔬 Code Execution - Run untrusted code securely
- 🧪 Testing - Isolated environments for integration tests
- 📊 Data Processing - Execute scripts with rich output capture
pip install hopx-aifrom hopx_ai import Sandbox
sandbox = Sandbox.create(template="python")
result = sandbox.run_code("print('Hello, Hopx!')")
print(result.stdout) # "Hello, Hopx!"
sandbox.kill()npm install @hopx-ai/sdkimport { Sandbox } from '@hopx-ai/sdk';
const sandbox = await Sandbox.create({ template: 'nodejs' });
const result = await sandbox.runCode("console.log('Hello, Hopx!')");
console.log(result.stdout); // "Hello, Hopx!"
await sandbox.kill();- ⚡ Fast - Sandbox creation in ~100ms
- 🔐 Secure - Isolated VM environments
- 🌍 Multi-language - Python, Node.js, Go, Rust, Java, and more
- 📊 Rich Outputs - Capture charts, tables, and visualizations
- 🗂️ File Operations - Full filesystem access
- 🖥️ Desktop Support - VNC, mouse, keyboard control (Premium)
- 🔧 Template Building - Create custom environments
- 📡 Real-time - WebSocket streaming support
- Website: hopx.ai
- Documentation: docs.hopx.ai
- Dashboard: hopx.ai/dashboard
- Discord: discord.gg/hopx
hopx/
├── python/ # Python SDK
│ ├── hopx_ai/ # Source code
│ ├── examples/ # Usage examples
│ └── README.md # Python docs
├── javascript/ # JavaScript/TypeScript SDK
│ ├── src/ # Source code
│ ├── examples/ # Usage examples
│ └── README.md # JavaScript docs
└── cookbook/ # Advanced examples
├── python/
└── javascript/
# Your AI generates code, Hopx executes it safely
sandbox = Sandbox.create(template="python")
result = sandbox.run_code(agent_generated_code)
if result.success:
return result.stdout# Automatically capture charts
code = """
import matplotlib.pyplot as plt
plt.plot([1, 2, 3], [1, 4, 9])
plt.show()
"""
result = sandbox.run_code(code)
png_data = result.rich_outputs[0].data # Base64 PNGconst sandbox = await Sandbox.create({ template: 'nodejs' });
await sandbox.commands.run('git clone https://github.com/user/repo /app');
await sandbox.commands.run('cd /app && npm install');
const result = await sandbox.commands.run('cd /app && npm test');
console.log(result.exitCode === 0 ? '✅ PASSED' : '❌ FAILED');We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick start:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing - Make your changes
- Run tests:
pytest(Python) ornpm test(JavaScript) - Submit a pull request
MIT License - see LICENSE file for details.
- Email: [email protected]
- Discord: discord.gg/hopx
- Issues: GitHub Issues
Found a security issue? Please report it to [email protected] instead of opening a public issue.
See SECURITY.md for our security policy.
Built with ❤️ by the Hopx team
Website • Documentation • Twitter • Discord