Lean-verified multi-agent sandboxing for OpenClaw and NemoClaw
Project description
BoxClaw SDK
Zero-Trust Runtime Execution Sandboxing for AI Agents
The boxclaw SDK acts as the execution-environment boundary for LLMs operating inside agent frameworks (like OpenClaw, LangChain, or custom OpenAI scripts). By wrapping standard Python operations in our native OS-Hooks (sys.addaudithook), any AI acting through the functions decorated with our @boxclaw_guardrail must provide mathematical or deterministic proof that its intended behavior adheres to local security invariants.
This is fundamentally different from semantic guardrails (which scan text output for bad words). BoxClaw catches real OS system calls, FFI loads (like ctypes), network requests, and filesystem writes at the CPython Virtual Machine level.
Installation
pip install boxclaw
Usage
Agent frameworks often grant LLMs unrestricted access to local system resources (e.g., executing arbitrary Bash commands or running generated Python scripts). BoxClaw allows you to restrict the AI to authorized capabilities only.
To set it up, simply wrap the function your Agent uses with the @boxclaw_guardrail and declare exactly what operations it is allowed to perform.
Example: Securing a File Agent
from boxclaw import boxclaw_guardrail
import subprocess
import os
# Limit the agent strictly to Network requests.
# It is completely blocked from modifying the File System or running Bash Commands.
@boxclaw_guardrail(agent_id="web-crawler-bot", required_capabilities=["network_send"])
def agent_execute(llm_generated_code: str):
# DANGEROUS! If the LLM generates malicious code here (e.g. `import os; os.system('rm -rf /')`),
# BoxClaw will instantly catch the deep OS call and throw a PermissionError Exception.
exec(llm_generated_code)
try:
# ❌ This will trigger the Sandbox Security Guard and throw an exception
# because the agent ONLY has network_send capabilities.
malicious_ai_action = "with open('stolen_data.txt', 'w') as f: f.write('secret')"
agent_execute(malicious_ai_action)
except Exception as e:
print(f"Blocked by BoxClaw: {e}")
Security Capabilities
You can specify specific scopes to limit your LLMs strictly to the tasks you hired them to do:
system_execute: Blocks arbitrary subprocess commandsnetwork_send: Blocks unauthorized HTTP/socket connectionswrite_fs: Prevents the agent from modifying the filesystemffi_load: Mathematically blocks C-Extensions /ctypessandbox escapes
Links
- PyPI Package: https://pypi.org/project/boxclaw/
- GitHub Repository: https://github.com/paulinebourigault/boxclaw
Project details
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 boxclaw-0.1.2.tar.gz.
File metadata
- Download URL: boxclaw-0.1.2.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e2ef4faed888bb67249834f24f7f7311c646612bf86063234558f2e572baf66
|
|
| MD5 |
46e669a83041fe11e9d3b377645b4631
|
|
| BLAKE2b-256 |
d5e8f05abbdaaa14fcb80d2d7ed9a5b69f052e424e90ec892d142491d566c9c3
|
File details
Details for the file boxclaw-0.1.2-py3-none-any.whl.
File metadata
- Download URL: boxclaw-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ea5a7228ba5ea48f5483f1fdec400af3619c772816727274760e9b6ce9c2d40
|
|
| MD5 |
8003a2c6dd4e9c8397434be1dce17f48
|
|
| BLAKE2b-256 |
09646fdc234ab067dbba7ed359177539a32aaa414736cc8584da04aaadd600a0
|