Skip to content

The demo

The lab is shown as a live demo in a meetup talk: an agent edits a photo of the room while the big screen shows what the infrastructure does. The design has three acts. Two are built and run, Act 1 and Act 3. Everything on this page runs in the Local option, on one Mac.

Act 1: the group photo

The presenter takes a photo of the room with a phone. The audience votes on a theme: flying, on the Moon, or ink painting. About 20 seconds later the edited photo is on the big screen.

Act 1 as built: the presenter's phone, Agentgateway, the demo application and the harness, the model on the Mac, the sandbox, the image provider with three requests at once and its fallback, the big screen

Act 1 as built, in the order of a job (1 to 5). The dashed boxes at the bottom are in the design and not built.

Behind each step:

  1. The photo arrives. The phone uploads it and starts a job with the winning theme. Both go through Agentgateway's public listener.
  2. A sandbox takes it. The demo application puts the photo into a gVisor sandbox that OpenSandbox started ahead of the job. One sandbox serves one job and is then deleted.
  3. The agent starts. DeepSeek Harness runs with Qwen3-4B. Its model calls and its tools all go through the gateway, and it has no other tools.
  4. Three tool calls, decided by the model. It normalises the photo in the sandbox, calls the image tool with a prompt it writes itself, and labels the result in the sandbox.
  5. The picture appears. The screen shows each step as it happens, with its time, then the photo and the result side by side.

Act 3: guardrails

Act 3 as built: the rate limit at the gateway, the blocked egress of a sandbox, and the trace of one job

Act 3 as built. What the big screen reads for each part is on the right.

  • The rate limit. Everyone taps a button as fast as they can. The gateway lets 20 requests a second through and answers the rest with HTTP 429. The screen shows the gateway's own counters, read through Prometheus. Rejected taps never reach the application.
  • The blocked upload. A command in a sandbox tries to send a picture to an outside host, as a tricked agent would. It goes to the gateway, which is the sandbox's proxy, and the gateway answers 403. A second attempt goes around the proxy and is stopped by a Kubernetes NetworkPolicy. The screen shows the command, the 403, the gateway's counter of refused requests, and that nothing arrived.
  • The trace. One job is one trace in Jaeger. The screen draws the hops that matter as a waterfall: the model turns, the tool calls, the image edit. In one run that was 13 rows out of 41 spans.

What is real

  • The agent loop. The model plans and makes the tool calls itself. The application does not trust the agent's own account: a job counts only if the image tool really produced a picture. If the agent stops before the last step, it is reminded once. If it still does not take it, the application runs that step and the screen says so.
  • The gateway on every call, the sandbox, and the refusals. They are the same manifests the lab installs.
  • The image edit. An external model edits the photo itself: Azure's gpt-image-2.5-flare. Each edit sends three identical requests at once and uses the first picture. Alibaba Model Studio steps in when all three are refused or fail.
  • The time. A job took 17.5 to 21 seconds in eight jobs, with a median of 18.4. That was measured on an idle Mac with a synthetic test picture, not with a photo of real people.

What is not

  • Act 2, in which the audience uploads its own photos to a gallery wall, is not built. Local runs one job at a time.
  • Memory. The design ends with "make it more dramatic", continuing from the first picture. PowerContext is not deployed, so that part does not exist.
  • The image model is not self-hosted, and the application calls the provider itself instead of going through the gateway. The self-hosted model belongs to the Cloud option.
  • No GPU is involved. GPU sharing with HAMi and routing between real replicas are in the Cloud design only.
  • The blocked upload is a drill. The application starts it, with a generated test card, so that it is the same every time. It is not the agent being tricked live.
  • Without credentials for an image provider, a local stub recolours the photo and writes on it that no image model was called.

Next: run it on your own Mac.