← Table of Contents · Page 132 of 868
RUNTIME EXECUTION ENVIRONMENTS
Part 7 of 10
EXAMPLES
Example 1: A sandbox in action.
A user tells a data-analysis agent, "Run this Python script I found online."
The harness does not run it on the real server.
It starts a disposable container, copies in only the one data file the script needs, turns off the network, and sets limits of 60 seconds and 512 megabytes of memory.
The script, which secretly tries to read the server's password file and send it to a remote address, fails on both attempts: the password file does not exist inside the container, and there is no network to send anything over.
The container is destroyed when the run ends, and the harness reports the script's output to the agent.
The bad script did no lasting harm, because the sandbox made the harm impossible.
Example 2: A snapshot restored before each task.
A company runs a customer-service agent that sometimes creates temporary files and installs small helper programs.
To stop any leftover from one customer's session appearing in the next, the harness restores a virtual machine snapshot to a clean state before every task.
Customer A's documents are never visible to customer B, because the machine they ran on was reset in between.
Example 3: Parallel execution.
An agent is asked to research five competitor companies.
Each research job is independent: search for the company, read two pages, and write a short summary.
The harness dispatches all five searches at once and waits for all five results.
Where doing the jobs one by one would take about five minutes, running them together takes just over one minute, roughly a fivefold saving in wall-clock time.
Before doing this the engineer verified that the search provider allows at least five requests at a time without refusing.
Example 4: Graceful failure.
A coding agent runs a test suite, which is a collection of automatic checks for a program, and the run exceeds its 60-second limit.
A poor harness would crash or let the agent retry forever.
A graceful harness stops the test process, collects the partial output, and returns a report: "I attempted to run the test suite, but it timed out after 60 seconds. Forty-two of the 180 tests finished and all passed. Here is the partial output. I recommend running the remaining tests in smaller groups, and I can start with the tests in the payments folder."
The user is informed, no work was lost, and the next step is clear.
Advertisement
Read Aloud:
0:00 / 0:00