sandbox-as-tool
A multi-agent sandbox architecture pattern in which agents run outside the sandbox and invoke the sandbox as a tool on demand to perform specific operations. Agent state remains isomorphic with orchestration framework state, and each invocation incurs a boundary round-trip cost.
Timeline (last 90 days)
The main advantage of the sandbox-as-tool pattern is lower per-step overhead: no need to start a VM on every call, a shorter debugging chain, and agent state naturally co-located with LangGraph's graph state.
Under the sandbox-as-tool pattern, every call is a boundary round trip; if a sub-agent needs to run several pieces of code in a row to complete a subtask, that round-trip cost is paid repeatedly.
When the agent runs outside the sandbox, LangSmith can automatically capture the latency and parameters of each sandbox round trip; when the entire agent tree runs inside the sandbox, these internal events are invisible to LangSmith, and manual instrumentation or a logging pipeline must be built to get the data out of the sandbox.
Under the sandbox-as-tool pattern, if sub-agent A writes a file and sub-agent B needs to read it in the next step, there are only two options: keep the sandbox warm for the entire sub-agent run (approximately full-in-sandbox), or materialize the state back to the agent filesystem between each call.
In multi-sub-agent scenarios, keeping the sandbox warm effectively blurs the line between sandbox-as-tool and full-agent-in-sandbox, and the engineering complexity is already very close.
All Facts (5)
The main advantage of the sandbox-as-tool pattern is lower per-step overhead: no need to start a VM on every call, a shorter debugging chain, and agent state naturally co-located with LangGraph's graph state.
50%UnverifiedUnder the sandbox-as-tool pattern, every call is a boundary round trip; if a sub-agent needs to run several pieces of code in a row to complete a subtask, that round-trip cost is paid repeatedly.
50%UnverifiedWhen the agent runs outside the sandbox, LangSmith can automatically capture the latency and parameters of each sandbox round trip; when the entire agent tree runs inside the sandbox, these internal events are invisible to LangSmith, and manual instrumentation or a logging pipeline must be built to get the data out of the sandbox.
50%UnverifiedUnder the sandbox-as-tool pattern, if sub-agent A writes a file and sub-agent B needs to read it in the next step, there are only two options: keep the sandbox warm for the entire sub-agent run (approximately full-in-sandbox), or materialize the state back to the agent filesystem between each call.
50%UnverifiedIn multi-sub-agent scenarios, keeping the sandbox warm effectively blurs the line between sandbox-as-tool and full-agent-in-sandbox, and the engineering complexity is already very close.
50%