Skip to content

How it works

Three things, in the order a job meets them: the path of a request, the sandbox and its way out, and the trace.

The request path

Request paths of the Cloud design: phones, the gateway's three listeners, the demo application and the harness, inference, execution, context, and what sits beside the paths

The request paths of the Cloud option as designed. It is not deployed yet. In Local the gateway reaches llama.cpp on the Mac directly, and there is no vLLM or HAMi.

There is one gateway, Agentgateway, with three listeners:

  • Public. Phones and the big screen reach the demo application's pages here. This is where the rate limit sits.
  • Internal. The agent's model calls and its tool calls. Tools are offered at one MCP endpoint, /mcp, behind a key, with a rule for each tool. This listener is not published.
  • Egress. The sandboxes' HTTP proxy, described below.

The demo application hands each job to the agent loop, DeepSeek Harness. From there:

  • Inference: harness, gateway, model. In Local the model is Qwen3-4B on llama.cpp. In the Cloud design the gateway asks llm-d which vLLM replica should answer, and the replicas share one GPU through HAMi.
  • Execution: harness, gateway, OpenSandbox, a sandbox pod.
  • Context: harness, PowerContext, seekdb. This path does not go through the gateway, and it is not deployed yet.

The sandbox and its way out

The agent's tool call through Agentgateway and OpenSandbox to a sandbox pod; the three runtimes a pod can have, runc, gVisor and Kata Containers; and the two ways out of a sandbox

From the agent's tool call to a sandbox pod, the three runtimes, and the two ways out.

OpenSandbox creates a pod for each job. The runtime under it is a setting:

Runtime Isolation Needs
gVisor (default) A user-space kernel for each sandbox. Strong, but not a virtual machine Nothing special. It runs in OrbStack and on any node
Kata Containers (opt-in) A virtual machine for each sandbox, with its own kernel KVM: bare metal, or a Lima VM on the Mac
runc Namespaces and cgroups, on the node's kernel. The baseline for comparison Nothing

The way out is the same under all three:

  • A sandbox gets the gateway's egress listener as its HTTP proxy. The gateway answers 403 unless a route names the destination. The demo allows none. Each refusal has a status, a counter, a log line and a span, so it can be shown.
  • A Kubernetes NetworkPolicy rejects everything that does not go through the proxy. That part is silent: it leaves no event and no counter.

This was tried from a gVisor sandbox on an Apple-silicon Mac. It was not tried under Kata or runc, or on x86_64.

The trace

What one job's trace contains: the job, the sandbox, the agent run with its model turns and tool calls, the image edit, and a refused egress request

What one job's trace contains, and what it does not.

Jaeger runs as one pod. It receives spans directly, without a collector, and keeps them in memory. In Local it is off by default and TRACING=on adds it.

One job is one trace:

  1. Each job has one trace id. The demo application sends its own spans under it: the job, its stages, the image edit.
  2. The agent runs with the same trace id. The harness sends it with every model call and every tool call.
  3. The gateway emits a span for each of those calls, in the same trace.

What the trace cannot show: the inside of the sandbox, the inside of the image model, and the harness's own turns. None of the three emits spans. In the Cloud design the model's bar gains spans from llm-d and vLLM. That is planned and has not run.

Next: what is done and what comes next.