Installation¶
Requirements¶
- Python 3.10 or higher
- pip, uv, or poetry
Basic Installation¶
Install the core package:
Optional Dependencies¶
Agent-Airlock supports optional features through extras:
E2B Sandbox Support¶
For executing code in isolated Firecracker MicroVMs:
This installs:
- e2b>=1.0 - E2B SDK
- cloudpickle>=3.0 - Function serialization
E2B API Key Required
You'll need an E2B API key. Set it via environment variable:
FastMCP Integration¶
For seamless integration with FastMCP servers:
This installs:
- mcp>=1.0 - MCP SDK
- fastmcp>=2.0,<3.0 - FastMCP framework
Full Installation¶
Install everything:
Development Installation¶
For contributing to Agent-Airlock:
git clone https://github.com/sattyamjjain/agent-airlock.git
cd agent-airlock
pip install -e ".[dev,all]"
This includes: - pytest and coverage tools - mypy for type checking - ruff for linting/formatting - bandit for security scanning
Verify Installation¶
Or test the decorator:
from agent_airlock import Airlock
@Airlock()
def test_func(x: int) -> int:
return x * 2
result = test_func(x=5)
print(result) # 10
Troubleshooting¶
Import Errors¶
If you get import errors, ensure you have the correct Python version:
E2B Connection Issues¶
If E2B sandbox fails to connect:
- Verify your API key is set correctly
- Check your network connection
- Ensure you have the
[sandbox]extra installed
Type Checking Errors¶
Agent-Airlock uses strict typing. If mypy complains: