Production-grade BYOK execution layer with a strict tool gateway. No raw shell — agents and bots get scoped Python/Node execution with policy gates before anything touches the runtime.
Security: ARF executes untrusted code and does not provide end-user authentication by itself. Bind it to a private interface, place it behind an authenticated control plane, and run it in a dedicated sandbox or host.
clone_repo— shallow clone into session workspacecheckout_ref— switch branch/tagdetect_stack— detect Node/Python/Dockerinstall_node_deps— npm install/ciinstall_python_deps— pip install -rwrite_env_file— generate .envstart_process— spawn and track background processstop_process— terminate tracked processcheck_port— TCP port probehttp_health_check— GET health checkstream_logs— tail process logscapture_preview_metadata— snapshot preview stateexport_artifacts— copy workspace dir to persistence
run_code— execute Python or Node snippets in temp sandboxinstall_package— record to manifest (ledgered)read_file/write_file— scoped to runtime zoneslist_directory— directory listingsearch_in_files— regex search across filesfunctions_mapping— AST-based function index (Python)bracket_tracker— bracket/brace balance checkerexport_artifact— copy single file to persistencesession_reset— wipe session state
No raw shell endpoint is exposed.
- Control Plane: FastAPI backend with session management, policy enforcement, tool ledger
- Frontend: Dark cockpit UI with tabbed navigation (Session, Terminal, Files, Deploy, Tools, Ledger)
- Execution Plane: Isolated runtime zones per session with path traversal protection
- Persistence Plane: Tool ledger (JSONL) + package manifests survive session resets
/runtime/workspaces/{session}— writable workspace/runtime/tmp— writable temp/runtime/output— writable logs/output/runtime/cache— writable cache/runtime/readonly-base— immutable base image
Per-session configurable:
session_ttl_seconds(default 3600)max_execution_seconds(default 30)max_output_bytes(default 200KB)max_memory_mb(default 1024)network_mode("deny" or "allowlisted")
cp .env.example .env
bash start.shRuns on port 3000 (configurable via ARF_PORT env var).
Runtime workspaces default to /tmp/runtime. The invocation ledger and package
manifests default to ./persistence; runtime ledger files are intentionally
gitignored because requests and outputs may contain sensitive content.
docker build -t agent-runtime .
docker run --rm -p 3000:3000 \
-v arf-runtime:/runtime \
-v arf-persistence:/persistence \
agent-runtimeThe image includes Python only. Extend it with Node.js or other toolchains required by the workloads you intend to run.
GET /health— status + available tools listPOST /sessions— create session with optional policyPOST /session_reset/{id}— wipe session statePOST /{tool_name}— execute tool (requires valid session_id)GET /logs?limit=N— read tool invocation ledgerGET /— serves frontend UI
MIT. See LICENSE.