Introduction
Overview
ipybox
is a lightweight and secure Python code execution sandbox based on IPython and Docker. You can run it locally on your computer or remotely in an environment of your choice - no API key required.
While optimized for AI agents that interact with their environment through code execution, such as freeact
agents, ipybox
also serves as a general-purpose sandbox for secure code execution. It is fully open-source and distributed under the Apache 2.0 license.
Features
- Secure code execution inside Docker containers
- Restrict network access with a configurable firewall
- Stateful code execution with IPython kernels
- Stream code execution output as it is generated
- Install Python packages at build time or runtime
- Return plots generated with visualization libraries
- Invocation of MCP servers via generated client code
- Flexible deployment options, local or remote
asyncio
API for managing the execution environment