Agent Sandbox Containment Workflow
Layer 1 of the agent containment stack: every tool call executes in an ephemeral container, and any path outside the workspace is denied and logged as a security event.
Layer 3 of the agent containment stack: dangerous tool calls are suspended and sent to a human reviewer, who approves or aborts the operation before anything executes.
Copy and paste the following FlowZap code into a project in your FlowZap account to see this template diagram.
agent { # Agent
n1: circle label:"Dangerous Tool Call"
n2: rectangle label:"Request Human Approval"
n5: diamond label:"Human Approved?"
n6: rectangle label:"Execute Tool Safely"
n7: rectangle label:"Abort Operation"
n8: circle label:"Done"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> human.n3.handle(top) [label="approval request"]
n5.handle(right) -> n6.handle(left) [label="approved"]
n6.handle(right) -> n8.handle(left)
n7.handle(right) -> n8.handle(left)
n5.handle(bottom) -> n7.handle(bottom) [label="Rejected"]
}
human { # Human Reviewer
n3: rectangle label:"Review Tool Call and Context"
n4: rectangle label:"Return Decision"
n3.handle(right) -> n4.handle(left)
n4.handle(top) -> agent.n5.handle(bottom) [label="decision"]
}
Install the MCP packagenpm install -g flowzap-mcpMCP documentation
Layer 1 of the agent containment stack: every tool call executes in an ephemeral container, and any path outside the workspace is denied and logged as a security event.
Layer 2 of the agent containment stack: a permission gate checks the whitelist and path scope before execution, and aborts the call with a logged denial when the scope does not match.
The full containment stack in one diagram: sandbox, permission gate, HITL approval and SIEM audit applied in sequence around a single dangerous tool call.
Layer 4 of the agent containment stack: arguments are sanitized, secrets stripped and the action trace written to the SIEM before execution continues.
Rule 3 in practice: the agent that acts emits the action trace, a separate verification lane confirms the effect, and only a human closes the case.
Closing-proof workflow across detection, remediation and assurance: measure the fix rather than the reaction, rate the outage risk and refuse closure without evidence.