Strip every credential out of the agent sandbox and control tools through a single MCP gateway: if something goes wrong, the damage stays inside that one task
How Many Credentials Should Your AI Agent Have? Zero. — Jim Clark, Docker — AI Engineer · Read the original ↗
This page is a translation of the Korean original. Read the Korean original →
What you get
- Unfiltered external input and dangerous tools never meet in the same sandbox
- Each sandbox gets only the MCPs it needs, which keeps context size low
- You can swap harnesses without rebuilding your MCP configuration
When to use it
Apply it when you split one workflow by role, such as web research, fact-checking and publishing (the newsroom example), and when you grant permissions to match the task's intent, such as a one-hour coding task that needs a Git signing key only for the two minutes it takes to commit.
How to do it
- Before starting a task, work out what information and tools it needs to get done.
- Split one workflow into role-based sandboxes, such as researcher, fact-checker and publisher, so unfiltered context and dangerous tools never meet in one place.
- Put one gateway endpoint in each sandbox and route all MCP traffic and tool calls through that single point.
- Plug the harness in as a parameter of the sandbox, and specify only the MCPs and network rules it needs alongside it.
- Keep no credentials inside the sandbox; instead, use XAA to exchange identity claims for an authorization grant (ID jag) that gives access to your existing authorization server.
Try it now
Pick one agent you run today, keep only the tools that fit the task's intent, move its credentials out of the sandbox, and check whether it still finishes the job. The first things to check are whether you can split permissions so the agent gets a key only at the moment it needs one, such as a commit, and whether the MCP configuration stays intact when you swap the harness.
brew install sbxLinks
Background — what the original covers
This is a talk on agent safety that Docker's Jim Clark gave at AI Engineer. Now that agents run unsupervised for long periods, he argues, safety does not come from fixing the harness; it comes from deciding how much context and how many tools to let into it. He explains sandbox design through two cases, newsroom role separation and a signing key for commits, and introduces Cross App Access with Okta as a way to connect existing SSO to agents.