Docker sandbox tools for Axio
Project description
axio-tools-docker
Docker sandbox tools for axio.
Run agent-generated code and commands inside isolated Docker containers. The agent gets sandbox_exec, sandbox_write, and sandbox_read tools that operate entirely within the sandbox — the host filesystem stays untouched.
Features
- Isolated execution — code runs inside a Docker container, not on the host
- Configurable image — use any Docker image as the sandbox environment
- Three sandboxed tools — execute commands, write files, read files — all inside the container
- Persistent sandbox — container is reused across tool calls within a session for faster execution
- TUI integration — configure image, memory limits, and CPU from the
axio-tuisettings screen
Requirements
Docker must be installed and running:
docker info # should succeed
Installation
pip install axio-tools-docker
Usage
from axio import Agent
from axio.context import MemoryContextStore
from axio_transport_openai import OpenAITransport
from axio_tools_docker.plugin import DockerPlugin
async def main() -> None:
plugin = DockerPlugin()
await plugin.init() # uses default config (python:3.12-slim)
agent = Agent(
system=(
"You are a coding assistant. Use sandbox_exec to run code safely. "
"Never attempt to access the host filesystem directly."
),
tools=plugin.all_tools,
transport=OpenAITransport(api_key="sk-...", model="gpt-4o"),
)
ctx = MemoryContextStore()
result = await agent.run(
"Write a Python script that computes the first 20 Fibonacci numbers and run it.",
ctx,
)
print(result)
Sandbox tools
| Tool | Description |
|---|---|
sandbox_exec |
Run a shell command inside the container; returns stdout + stderr |
sandbox_write |
Write a file into the container's filesystem |
sandbox_read |
Read a file from the container's filesystem |
Configuration
from axio_tools_docker.config import SandboxConfig
config = SandboxConfig(
image="python:3.12-slim",
memory_limit="512m",
cpu_quota=100000, # 1 CPU
work_dir="/workspace",
)
Plugin registration
[project.entry-points."axio.tools.settings"]
docker = "axio_tools_docker.plugin:DockerPlugin"
Part of the axio ecosystem
axio · axio-tools-local · axio-tools-mcp · axio-tui
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axio_tools_docker-0.3.2.tar.gz.
File metadata
- Download URL: axio_tools_docker-0.3.2.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
627155944ab70864e701cadb13e128013ec56f972ccf42638f8d2c2517552c46
|
|
| MD5 |
254fdc04195b372f8f2dc3cf2d332cb3
|
|
| BLAKE2b-256 |
99af66bd9385a4f4a908b0c24316b0f048cc4b21a77e87b81c99fb2013a62a7e
|
Provenance
The following attestation bundles were made for axio_tools_docker-0.3.2.tar.gz:
Publisher:
publish.yml on axio-agent/monorepo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axio_tools_docker-0.3.2.tar.gz -
Subject digest:
627155944ab70864e701cadb13e128013ec56f972ccf42638f8d2c2517552c46 - Sigstore transparency entry: 1208231974
- Sigstore integration time:
-
Permalink:
axio-agent/monorepo@2ed10ea59d101b7c0f8880faa4b2f73eb34870b5 -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/axio-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ed10ea59d101b7c0f8880faa4b2f73eb34870b5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file axio_tools_docker-0.3.2-py3-none-any.whl.
File metadata
- Download URL: axio_tools_docker-0.3.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367fce75d70b1230b2b276606c47b34328763ccf0bbbab3e9940573ff8968af2
|
|
| MD5 |
9185b10f1753882caf9008974ddc8989
|
|
| BLAKE2b-256 |
0db53681c8af5965404bf0340e5d8a4811f43d52ad28d9648846db0b897bb595
|
Provenance
The following attestation bundles were made for axio_tools_docker-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on axio-agent/monorepo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axio_tools_docker-0.3.2-py3-none-any.whl -
Subject digest:
367fce75d70b1230b2b276606c47b34328763ccf0bbbab3e9940573ff8968af2 - Sigstore transparency entry: 1208232047
- Sigstore integration time:
-
Permalink:
axio-agent/monorepo@2ed10ea59d101b7c0f8880faa4b2f73eb34870b5 -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/axio-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ed10ea59d101b7c0f8880faa4b2f73eb34870b5 -
Trigger Event:
release
-
Statement type: