RADIANT.SECURE AGENT INFRASTRUCTURE
04 / CASE STUDYLive public demo

Let the agent write code. Never let it escape the boundary.

PROJECT

Agent Sandbox Runner

ROLE

Sole Engineer

A secure execution plane for model-written Python, with one policy path for API and agent callers, a fresh cloud microVM per run, explicit failure ownership, and a live audit console.

124Unit testsPlus live integration tests
~600msSandbox bootMeasured live run average
1Fresh microVM per runAlways destroyed in cleanup
6 / 6Sandboxes killedZero cleanup failures in the measured run

SYSTEM ARCHITECTURE

Generated code enters one controlled execution path.

EXECUTION LIFECYCLE

Cleanup is part of the result, not an afterthought.

The same lifecycle runs whether code came from a developer API request or the bounded AI agent.

01

Queue

Create a durable execution record and return 202 before the work begins.

02

Admit

Acquire a concurrency slot after policy and spend checks pass.

03

Create

Start one fresh E2B microVM with bounded retry and no network access.

04

Run

Upload code, execute with a hard timeout, and stream capped output events.

05

Destroy

Kill the sandbox in finally, including provider and user-code failure paths.

06

Classify

Separate user errors, timeouts, provider failures, and interruptions.

07

Persist

Store the result and cleanup evidence used by the API, agent, and console.

01 / TRUST BOUNDARY

One path from generated code to a sandbox.

The agent never talks to E2B directly. It is a bounded client of the same ExecutionService used by the API, so policy, concurrency, classification, persistence, and cleanup cannot be bypassed.

01

Fresh isolation

Each run creates a new cloud microVM. Sessions are never shared between users or agent runs.

02

Network denied

Sandbox internet access is off by default, and application secrets are never copied into the runtime.

03

Bounded resources

Wall-clock limits, capped output, concurrency control, and sandbox lifetime backstops constrain every execution.

04

Cleanup in finally

The service attempts destruction on every path and records the outcome instead of treating process exit as proof of cleanup.

02 / FAILURE OWNERSHIP

A timeout is not always the user's fault.

Provider exceptions overlap in ways that can mislabel an unavailable sandbox as slow user code. The service classifies the most specific infrastructure errors before generic timeouts.

01

User code error

A completed process with a failing exit belongs to the submitted program and is reported with bounded stderr.

02

Execution timeout

Only an active program that exceeds its allotted runtime is classified as a user-code timeout.

03

Sandbox unavailable

Creation, reachability, and provider failures remain infrastructure errors instead of being blamed on the code.

04

Stored evidence

Status, failure kind, timings, output metadata, and cleanup state are persisted for verification and debugging.

03 / BOUNDED AGENT

The model can propose and inspect. The service remains authoritative.

The agent gets one tool, execute_python, and a finite budget for steps, tool calls, tokens, and wall-clock time. Success comes from stored execution records, not the model's narration.

01

One typed tool

Invalid tool arguments return structured feedback so the model can repair a request without escaping the contract.

02

Pre-spend policy

Requests are validated before an LLM or sandbox provider is paid.

03

Bounded loop

Step, tool, time, and token ceilings prevent an open-ended autonomous run.

04

Verified completion

The final answer can reference only results produced by the shared execution path and stored by the application.

04 / PUBLIC OPERATIONS

A real demo with controlled cost and an honest trace.

The public console streams actual sandbox lifecycle events. Layered gates keep a no-sign-up demo available without turning provider credits into an unbounded public resource.

01

Live event stream

Sandbox creation, upload, stdout, stderr, exit, and destruction events arrive through SSE with replay for late connections.

02

Spend gates

Policy checks, Turnstile, visitor limits, a daily budget, recorded-run replay, and a provider credit limit contain cost.

03

Proxy-safe identity

Visitor limits trust Cloudflare's connecting IP and use the proxy-controlled end of forwarded chains.

04

Observable delivery

Structured logs, lifecycle metrics, CI checks, Docker builds, Render, Cloudflare, and uptime monitoring close the loop.

TECHNOLOGY

PythonFastAPIE2BReactTypeScriptSSESQLiteDocker

Generated code is untrusted input. The useful engineering begins at the boundary around it.

Live demo GitHub