{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "AgentSandbox",
 "ref": "AgentSandbox#1594",
 "hash": "sema:AgentSandbox#mh:SHA-256:1594a10a882956e4b8501764091e1d5025ba0b405cce34b7ef931bb17e5c634a",
 "stub": "1594",
 "layer": "Society",
 "type": "Protocols",
 "summary": "Isolate agent execution with resource limits and egress controls",
 "mechanism": "Execution isolation for AI Agent#e127s treating them as untrusted insiders. The Agent#e127 runs in a containerized environment (gVisor, Firecracker microVM) with: resource quotas (CPU, memory, time), network egress allowlists, filesystem restrictions, and comprehensive logging. Code generated by the Agent#e127 is executed in this Sandbox#7106, preventing impact on production systems even if the agent is compromised or generates malicious code. It wraps the execution Context#c1b7 with InputGuard#0ba7 to sanitize ingress data and OutputGuard#3618 to prevent exfiltration, effectively placing the Agent#e127 in a digital quarantine.",
 "invariants": [
  "Network egress is whitelist-only.",
  "The sandboxed process cannot reach the host filesystem.",
  "Declares resource quotas for CPU, memory and time.",
  "Every action inside the Sandbox#7106 is logged."
 ],
 "parameters": {},
 "signature": [
  "Sandbox(Agent)"
 ],
 "preconditions": [
  "Resource limits defined",
  "Untrusted code/agent"
 ],
 "postconditions": [
  "Execution completed or terminated by supervisor"
 ],
 "failure_modes": [
  "Sandbox#7106 Escape: Exploiting container vulnerabilities.",
  "Quota Starvation: Legitimate tasks failing due to overly restrictive limits.",
  "Log Blindness: Missing critical events in Audit#be97 logs."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "AgentSandbox",
 "builds_on": [
  {
   "alias": "agent",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Agent",
   "ref": "Agent#e127",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Agent"
  },
  {
   "alias": "audit",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Audit",
   "ref": "Audit#be97",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Audit"
  },
  {
   "alias": "sandbox",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Sandbox",
   "ref": "Sandbox#7106",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Sandbox"
  },
  {
   "alias": "context",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Context",
   "ref": "Context#c1b7",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Context"
  },
  {
   "alias": "output_guard",
   "relation": "composes_with",
   "library": "bootstrap",
   "slug": "OutputGuard",
   "ref": "OutputGuard#3618",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/OutputGuard"
  },
  {
   "alias": "input_guard",
   "relation": "composes_with",
   "library": "bootstrap",
   "slug": "InputGuard",
   "ref": "InputGuard#0ba7",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/InputGuard"
  }
 ],
 "related": [
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "Solution",
   "ref": "Solution#8d55",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Solution"
  },
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "Task",
   "ref": "Task#a850",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Task"
  }
 ],
 "used_by": [
  {
   "slug": "EmpathySim",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/EmpathySim"
  },
  {
   "slug": "MentalSim",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/MentalSim"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/AgentSandbox",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/AgentSandbox.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
