A sandboxed code execution tool for AI/LLM agents with AgentFS-backed filesystem.
- Sandboxed execution using Monty (AST-based security)
- AgentFS integration for filesystem operations with provenance tracking
- Multi-agent coordination via file locks, watches, and shared directories
- Framework-agnostic - use with Claude, LangChain, or any agent framework
┌─────────────────────────────────────────┐
│ Agent/LLM │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Code Execution Tool │
│ • execute(code, timeout, files) │
│ • Multi-agent coordination │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ Monty (secure execution) │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ AgentFS (filesystem + provenance) │
└─────────────────────────────────────────┘
pip install code-execution-toolfrom code_execution_tool import Executor
# Create executor
executor = Executor()
# Execute code
result = executor.execute("""
import json
data = fs.read('/input/data.json')
result = process(data)
fs.write('/output/result.json', result)
""")
print(result.output)
print(result.files_created)# Install dependencies
poetry install
# Run tests
pytestMIT