Skip to content

Installation

Requirements

  • Python 3.10 or higher
  • pip, uv, or poetry

Basic Installation

Install the core package:

pip install agent-airlock
uv add agent-airlock
poetry add agent-airlock

Optional Dependencies

Agent-Airlock supports optional features through extras:

E2B Sandbox Support

For executing code in isolated Firecracker MicroVMs:

pip install agent-airlock[sandbox]

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:

export E2B_API_KEY="your-key-here"

FastMCP Integration

For seamless integration with FastMCP servers:

pip install agent-airlock[mcp]

This installs: - mcp>=1.0 - MCP SDK - fastmcp>=2.0,<3.0 - FastMCP framework

Full Installation

Install everything:

pip install agent-airlock[all]

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

import agent_airlock
print(agent_airlock.__version__)

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:

python --version  # Should be 3.10+

E2B Connection Issues

If E2B sandbox fails to connect:

  1. Verify your API key is set correctly
  2. Check your network connection
  3. Ensure you have the [sandbox] extra installed

Type Checking Errors

Agent-Airlock uses strict typing. If mypy complains:

pip install types-all  # Install type stubs
mypy your_code.py --ignore-missing-imports