{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "Context",
 "ref": "Context#c1b7",
 "hash": "sema:Context#mh:SHA-256:c1b72256dc4732033ee42cc07ff5d9fb60a7f1a3e5634449c343692a33340756",
 "stub": "c1b7",
 "layer": "Infrastructure",
 "type": "Data Structures",
 "summary": "Portable execution environment with inherited constraints",
 "mechanism": "The portable execution environment and state container for an agent. It encapsulates: (1) Inherited Constraints (Safety/Budget), (2) Available Tools/Capabilities, (3) Working Memory (History/Variables), and (4) Identity#b24a Claims. Context flows through delegation chains, acting as the 'Stack Frame' of the agentic system. It allows agents to be paused, moved, or cloned.",
 "invariants": [
  "Constraint#7013 Monotonicity: Child contexts can ADD constraints but never REMOVE inherited ones.",
  "Serializability: The entire context must be serializable to JSON/Storage for persistence.",
  "Provenance: Every item in the context must be traceable to its source (Observation, User Input, or Inference)."
 ],
 "parameters": {},
 "signature": [],
 "preconditions": [
  "Parent context exists (or Root is created)",
  "Schema is defined"
 ],
 "postconditions": [
  "Agent has a valid environment to execute."
 ],
 "failure_modes": [
  "Context Contamination/Leak: Private data from one context leaking into another (e.g., across tenant boundaries).",
  "Context Poisoning: malicious prompts or data injected into the context to hijack agent behavior.",
  "Stale Context: Acting on outdated information after a long pause.",
  "Context Explosion: Size grows beyond the window limit of the model."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "Context",
 "builds_on": [
  {
   "alias": "identity",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Identity",
   "ref": "Identity#b24a",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Identity"
  },
  {
   "alias": "constraint",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Constraint",
   "ref": "Constraint#7013",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Constraint"
  }
 ],
 "related": [
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "ContextCompress",
   "ref": "ContextCompress#0bf5",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ContextCompress"
  },
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "ContextSwitch",
   "ref": "ContextSwitch#aa92",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ContextSwitch"
  },
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "AnchorDrop",
   "ref": "AnchorDrop#27ad",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/AnchorDrop"
  },
  {
   "alias": null,
   "relation": "related",
   "library": "bootstrap",
   "slug": "Nestmap",
   "ref": "Nestmap#8b8f",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Nestmap"
  }
 ],
 "used_by": [
  {
   "slug": "Act",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Act"
  },
  {
   "slug": "AgentSandbox",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/AgentSandbox"
  },
  {
   "slug": "BreadthGovernor",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/BreadthGovernor"
  },
  {
   "slug": "ContextCompress",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ContextCompress"
  },
  {
   "slug": "ContextFirst",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ContextFirst"
  },
  {
   "slug": "ContextSwitch",
   "relation": "accepts",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ContextSwitch"
  },
  {
   "slug": "CreativeBlend",
   "relation": "accepts",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/CreativeBlend"
  },
  {
   "slug": "DataMinimization",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/DataMinimization"
  },
  {
   "slug": "Defer",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Defer"
  },
  {
   "slug": "DeliberativeAlign",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/DeliberativeAlign"
  },
  {
   "slug": "EmpathySim",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/EmpathySim"
  },
  {
   "slug": "EvaluatorOptimizer",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/EvaluatorOptimizer"
  },
  {
   "slug": "Handoff",
   "relation": "accepts",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Handoff"
  },
  {
   "slug": "HolographicShard",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/HolographicShard"
  },
  {
   "slug": "Nestmap",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Nestmap"
  },
  {
   "slug": "NoiseInjection",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/NoiseInjection"
  },
  {
   "slug": "OODA",
   "relation": "composes_with",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/OODA"
  },
  {
   "slug": "Observe",
   "relation": "yields",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Observe"
  },
  {
   "slug": "PerspectiveEnsemble",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/PerspectiveEnsemble"
  },
  {
   "slug": "Proprioception",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Proprioception"
  },
  {
   "slug": "Reason",
   "relation": "accepts",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Reason"
  },
  {
   "slug": "RequestFraming",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/RequestFraming"
  },
  {
   "slug": "RetrievalAugment",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/RetrievalAugment"
  },
  {
   "slug": "SelfReminder",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/SelfReminder"
  },
  {
   "slug": "StrategicReading",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/StrategicReading"
  },
  {
   "slug": "Task",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Task"
  },
  {
   "slug": "Think",
   "relation": "accepts",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Think"
  },
  {
   "slug": "ToolInvoke",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/ToolInvoke"
  },
  {
   "slug": "WorkerMode",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/WorkerMode"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/Context",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/Context.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
