Skip to content

A sandboxed code execution tool for AI/LLM agents with AgentFS-backed filesystem.

Notifications You must be signed in to change notification settings

rbalachandar/code-execution-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Execution Tool

A sandboxed code execution tool for AI/LLM agents with AgentFS-backed filesystem.

Features

  • 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

Architecture

┌─────────────────────────────────────────┐
│  Agent/LLM                              │
└──────────────┬──────────────────────────┘
               │
┌──────────────▼──────────────────────────┐
│  Code Execution Tool                    │
│  • execute(code, timeout, files)        │
│  • Multi-agent coordination             │
└──────────────┬──────────────────────────┘
               │
┌──────────────▼──────────────────────────┐
│  Monty (secure execution)               │
└──────────────┬──────────────────────────┘
               │
┌──────────────▼──────────────────────────┐
│  AgentFS (filesystem + provenance)      │
└─────────────────────────────────────────┘

Installation

pip install code-execution-tool

Usage

from 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)

Development

# Install dependencies
poetry install

# Run tests
pytest

License

MIT

About

A sandboxed code execution tool for AI/LLM agents with AgentFS-backed filesystem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages