Infrastructure · Data Structures

Context

Portable execution environment with inherited constraints

Definition

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 Claims. Context flows through delegation chains, acting as the 'Stack Frame' of the agentic system. It allows agents to be paused, moved, or cloned.

Preconditions

  1. Parent context exists (or Root is created)
  2. Schema is defined

Postconditions

  1. Agent has a valid environment to execute.

Invariants

  1. Constraint Monotonicity: Child contexts can ADD constraints but never REMOVE inherited ones.
  2. Serializability: The entire context must be serializable to JSON/Storage for persistence.
  3. Provenance: Every item in the context must be traceable to its source (Observation, User Input, or Inference).

Risks

Failure modes

  1. Context Contamination/Leak

    Private data from one context leaking into another (e.g., across tenant boundaries).

  2. Context Poisoning

    malicious prompts or data injected into the context to hijack agent behavior.

  3. Stale Context

    Acting on outdated information after a long pause.

  4. Context Explosion

    Size grows beyond the window limit of the model.

Relationships

Builds on

References

Used by

References

Act

Root primitive for state modification

Society

AgentSandbox

Isolate agent execution with resource limits and egress controls

Mind

Defer

Postponing decisions until more information available

Mind

EmpathySim

Predictive modeling of external agent states

Mind

Nestmap

Name the larger situations a moment sits inside, and what each one constrains

Mind

SelfReminder

Reinforce constraints in system prompt before each response

Task

The atomic unit of intent

ToolInvoke

Execute external tool and observe result

Society

WorkerMode

Claim tasks and become the assigned persona

Accepts

Society

ContextSwitch

Explicit, scoped protocol-mode toggle with enter/revert boundaries

Mind

CreativeBlend

Concept blending with novelty and value acceptance

Society

Handoff

Transfer control and context between agents

Mind

Reason

Execute a cognitive topology

Mind

Think

Atomic cognitive step

Yields

Composes with

Mind

OODA

Rapid decision cycle: Observe, Orient, Decide, Act

Reference

Data schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "constraints": {
      "type": "array"
    },
    "history": {
      "type": "array"
    },
    "variables": {
      "type": "object"
    }
  }
}

Identity

Ref
Context#c1b7
Sema ID
sema:Context#mh:SHA-256:c1b72256dc4732033ee42cc07ff5d9fb60a7f1a3e5634449c343692a33340756
Ring
0
Tier
1
Updated
2026-11-11
Supersedes
  • sema:Context#mh:SHA-256:510af8317d84bfff7dbba4ebbe2ae2a14d0e28ed8ed342a4e8dbc2e3294c1353
  • sema:Context#mh:SHA-256:d5f79a21faef9ef640ab687c90a25cdf457a066fb6da23d247115b267c539132