Code Executor Pack
★Trusted◇Sandbox optionalv1.0.0MIT✔Verified76by AgentNode · published 6 months ago · toolpack
Execute Python code in a secure sandboxed environment.
Provides safe code execution with timeout, memory limits, and output capture.
Quick Start
agentnode install code-executor-packRuns in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.
Usage
From packagefrom code_executor_pack.tool import run
result = run(
capability="execute_code",
params={
"code": """
import statistics
sales = [1200, 1850, 2100, 1675, 2300, 1950, 2450, 2100, 1800, 2600, 2150, 2800]
months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
mean_sales = statistics.mean(sales)
median_sales = statistics.median(sales)
std_dev = statistics.stdev(sales)
best_month = months[sales.index(max(sales))]
print(f"Annual Sales Summary")
print(f" Mean: ${mean_sales:,.0f}")
print(f" Median: ${median_sales:,.0f}")
print(f" Std Dev: ${std_dev:,.0f}")
print(f" Best Month: {best_month} (${max(sales):,})")
""",
"timeout_seconds": 10
}
)
print(f"Exit code: {result['exit_code']}")
print(f"Output:\n{result['stdout']}")Runs locally on your machine. No execution data is sent to AgentNode. Permissions are checked before execution. Learn how this works
Verification
Package installs and imports correctly. runtime checks passed.
This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.
Verified in real_auto mode
Last verified 16d ago· Runner v2.0.0
Use this when you need to...
- ›Run Python data analysis scripts on the fly
- ›Execute code snippets to validate logic
- ›Test regular expressions against sample inputs
- ›Run mathematical computations and simulations
- ›Prototype algorithms before committing to a codebase
README
Version History
Capabilities
Permissions
Declared by the publisher. Checked before execution by the policy gate.
Permissions are policy-checked before execution. For trusted and curated packages that run on the host, network and filesystem access are policy-checked but not OS-sandboxed. When runtime isolation is required for untrusted/community code, AgentNode uses sandbox-or-fail-closed if the required container runtime and pinned image are available. Learn more
Privacy
All tool execution happens locally on your machine. AgentNode never receives:
- • Tool inputs or outputs
- • Execution logs
- • Data your agent processes
Only install events and search queries are sent to the registry.
agentnode install code-executor-packFiles (3)
License
MITStats
Compatibility
Frameworks
Runtime
pythonPython Version
>=3.10Trust & Security
Publisher
AgentNode
@agentnode