Fly.ioProblem & solution
Building Agents that Don't Break Themselves
Summary
Agents that call shell commands can damage their host, so the post separates the agent’s durable home from the environment where untrusted code executes. It presents Sprites as disposable, isolated sandboxes, with one Sprite per session for the multi-user SpriteDoc and one persistent Sprite per task for Hermes Agent. SpriteDoc injects each user’s flyctl credential only for the command that needs it, avoiding token storage while preserving the user’s permissions; Hermes can omit approval prompts because the sandbox protects the host. The same separation applies when Hermes itself runs inside a Sprite: its commands are dispatched to another Sprite with a different identity and boot. Copy-on-write checkpoints provide an undo path, restoring deleted files and tools in about nine seconds.
Context
Agents need shell access to perform useful work, but model-generated commands can delete files, remove tools, or affect shared infrastructure. Running an agent and its commands in the same environment also creates risks for multi-user systems and the agent’s own host.
Approach / What changed
Use Sprites as separate execution sandboxes for untrusted commands while allowing the agent process to live in a durable environment. SpriteDoc creates a disposable Sprite per session, Hermes keeps one Sprite per task, credentials are injected only for individual commands, and copy-on-write checkpoints enable rapid restoration.
Takeaways
SpriteDoc gives each session its own Sprite, isolating commands from both the agent process and other users; idle Sprites become warm or cold and can later be torn down.
SpriteDoc injects a user’s flyctl token only for the duration of an authenticated command, so the credential is never stored at rest in the sandbox.
Hermes can checkpoint a Sprite before risky work and restore it in about nine seconds, recovering deleted files and executables through copy-on-write restoration.
Source and freshness
- Source
- fly.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.