Skip to main content

Code Executor Pack

TrustedSandbox optionalv1.0.0MITVerified76

by 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.

langchaincrewaigeneric

Quick Start

bash
agentnode install code-executor-pack

Runs in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.

Usage

From package
python
from 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

high confidence76/100✔ Verified
smokeReturned valid result
+25/25
testsTests failed
0/15
importAll tools imported successfully
+15/15
installInstalled in 1.4s
+15/15
contractAll contract checks passed
+10/10
determinismPartial output consistency (1/5)
+1/5
reliability3/3 runs passed
+10/10

Package installs and imports correctly. runtime checks passed.

install1.4s
import81ms
smoke156ms
tests1.2s

This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.

Verified in real_auto mode

Python 3.12.3ffmpegpopplertesseractuv

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

code_executionexecute_codetool

Permissions

Sandbox optionalFrom a trusted publisher — runs on the host by default. You can require isolation with sandbox.host_trust_policy.

Declared by the publisher. Checked before execution by the policy gate.

Networknone
Filesystemtemp
Code Executionlimited_subprocess
Data Accessinput_only
User Approvalalways

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.

bash
agentnode install code-executor-pack

Files (3)

License

MIT

Stats

Downloads0
Installs0
Versionv1.0.0
Published3/16/2026
Channelstable
Typetoolpack
Entrypointcode_executor_pack.tool

Compatibility

Frameworks

langchaincrewaigeneric

Runtime

python

Python Version

>=3.10

Trust & Security

PublisherTrusted
SignatureNone
ProvenanceNone
Security Issues0

Publisher

A

AgentNode

@agentnode