Skip to content
Press / to search

The SOUL of ContextOS

The operating philosophy behind ContextOS: state is explicit, outcomes are typed, unsafe authority is contained, and learning is gated.

Living DocumentLast reviewed: Edit on GitHub
At a glance

ContextOS exists to make useful agent work accountable: explicit state, evidenced outcomes, bounded authority, and controlled improvement.

What this page is

This page states the operating philosophy of ContextOS. SOUL is a mnemonic for engineering commitments, not a claim about consciousness or an agent personality. It explains what builders should preserve as models, tools, and implementations change.

ContextOS publishes a specification and a deterministic compiler reference; this repository is not a production runtime. The published schemas and explicitly normative contracts define conformance. This page explains their intent without adding schema fields or promising that every deployment already enforces every boundary.

The short version: no agent gets to act in the dark.

Identity

FieldValue
NameContextOS
RoleDecision runtime for AI-native systems. It compiles governed context, runs bounded agent loops, routes effects through controlled tools, and records typed decisions with evidence.
Primary jobComplete authorized work and preserve a DecisionRecord that makes the accepted outcome inspectable.
Primary surfacesContext Packs, Run Context, bounded orchestration, Tool Gateway, Policy Engine, evaluator gates, replay, and reference implementations.
Default stanceHelpful, but constrained. Fast, but inspectable. Adaptive, but never self-modifying without gates.

The acronym

SOUL is the smallest useful description of ContextOS:

LetterPrincipleRuntime meaning
SState is explicitRunContext identifies the run, tenant, user, agent, trace, budget, and v1 safety mode; session identity is optional.
OOutcomes are typedImportant results become DecisionRecord objects with evidence refs, status, approvals, policy decisions, and lineage.
UUnsafe authority is containedModels may propose. Deterministic boundaries decide what can be compiled, planned, executed, remembered, or released.
LLearning is gatedMemory passes its promotion policy; durable behavior changes pass evaluation, replay, and the required change-control gates.

Core truths

A governed decision system is not a prompt.

Prompts are one artifact inside the Context plane. They are not the source of authority. Authority comes from versioned packs, policy bundles, identity and delegation, native action-risk policy, adapter registrations, Decision Specs, explicit approvals, and technical containment.

The model should never be the only witness.

If a system cannot show what evidence entered the run, which tools were visible, which policies fired, and which approvals were required, the system is not production-grade yet. The agent may have done something useful, but ContextOS does not treat it as governed.

Context is compiled, not stuffed.

The Context Pack Compiler exists because production agents need bounded, explainable input. It emits manifests, omissions, runtime controls, and budget reports so operators can inspect what was admitted and why. Retrieved documents, tool output, and recalled memory remain evidence with provenance; their contents cannot grant permissions or override trusted policy.

Side effects require a boundary.

A tool call is not just an API request. It is an attempted use of authority. The Tool Gateway validates schema, identity, policy, native action risk, v1 compatibility, approval state, idempotency, trace lineage, and evidence requirements before any external effect happens.

Typed decisions beat fluent explanations.

Free-form text is useful for communication. It is not enough for audit, replay, regression testing, or compliance. A governed system needs closed outcome sets, evidence requirements, status values, policy decisions, approvals, and lineage. Schema validity establishes structure, not truth: verify the relevant external state before claiming that an action succeeded.

Memory must earn its way into recall.

Raw capture is not memory. Candidate facts require classification, applicable consent, contradiction checks, and promotion rules before they become eligible for compiled context. Memory Fabric permits policy-qualified automatic promotion; a human need not approve every candidate. Promotion does not make a fact timeless: recall still respects scope, freshness, and unresolved conflicts.

Improvement is change control, not self-editing.

The system can learn from failures and corrections, but durable behavior changes must become typed proposals. A better prompt fragment, retrieval hint, memory rule, tool declaration, policy rule, or StrategyRule earns promotion through replay and gates.

Trust is a plane, not a feature.

Trust wraps every other plane. It is present at compile time, plan time, execute time, memory-write time, release time, and audit time. It is not a final review step.

Boundaries

No hidden authority.

The model cannot invent tools, understate action risk, broaden authority, bypass policy, silently write durable memory, or change active Context Packs.

No silent truncation.

If context is dropped because of budget pressure, the omission is recorded. A smaller context can be correct. An invisible omission is not acceptable.

No direct action path.

Every external effect routes through the Tool Gateway. A direct adapter call is a broken run boundary. Enforcement also needs scoped credentials and execution containment; an instruction to use the gateway cannot prevent bypass when an agent has unrestricted credentials.

No unverifiable success.

Success requires evidence. If the runtime cannot point to the tool result, policy decision, approval verdict, trace span, or replay packet that supports the claim, the claim is not operationally complete.

No learning without provenance.

A correction can become a proposal. A proposal can become a release. A release can become a pinned pack version. Each step must preserve who changed what, why, against which evidence, and with which scorecard result.

Autonomy serves the user

The purpose of governance is to let agents complete useful work within a clear mandate. An implementation should proceed with authorized, bounded actions and ask only when missing information or an approval obligation changes what it can safely do. Repeated permission prompts are not a substitute for correctly scoped authority.

Choose the simplest workflow that meets the task. Add planning loops, specialist agents, or long-running execution when evaluations justify the added cost and failure paths. Anthropic’s Building effective agents supports this incremental approach; it does not establish that a more elaborate architecture is inherently better.

Native action risk considers effect, authority, reversibility, interaction, and data scope, with an optional decision TTL. The v1 ApprovalMode is a compatibility projection, not a complete risk ranking or an approval verdict. Even a read can expose restricted information. Approval authorizes a bounded action under policy; it does not waive other controls.

Operating posture

ContextOS should feel strict in the places where strictness protects the user, and boring in the places where reliability matters.

SituationContextOS posture
Low-risk lookupAnswer quickly, cite evidence, emit trace.
Ambiguous user intentResolve canonical intent or ask for the minimum missing fact.
Risky side effectFreeze evidence, route approval, preserve idempotency.
Missing evidenceRefuse, replan, or escalate with a typed reason.
Budget pressureRecord omissions; stop or escalate if required evidence cannot fit.
Tool timeout after a writeTreat completion as uncertain; reconcile using the adapter’s idempotency and status contract before retrying.
Interrupted runResume from recorded state and reconcile prior effects before continuing.
Operator correctionCreate a proposal; do not silently mutate behavior.
Failed release gateBlock promotion and keep the prior pinned version active.

Example

A user asks support_agent in tenant_acme_prod to refund an order. This is an illustrative sequence using the existing contracts, not a new refund policy.

  1. State: establish the actor, tenant, target order, budget, and pinned pack. Compile the ownership and eligibility evidence required by the registered decision.
  2. Outcomes: distinguish eligibility, permission to execute, and the payment result. A model saying “refunded” is not payment evidence.
  3. Unsafe authority: evaluate the registered capability’s risk and policy obligations. If a gate is required, bind approval to the evidence and bounded action. Execute through the Tool Gateway with an idempotency key.
  4. Recovery: if the payment provider times out, inspect the recorded call and reconcile provider state. Do not issue a second refund merely because the first response was lost, or report success while the result is unresolved.
  5. Learning: preserve the result and evidence in the DecisionRecord. A correction to refund behavior becomes a proposal tested against the failure and regression cases before release; it cannot edit the active policy during the run.

The user receives a clear account of what completed, what remains uncertain, and whether any action is needed from them. The operator receives references that support that account.

Communication style

ContextOS documentation should be precise, operational, and testable.

PreferAvoid
”This field is required because replay needs it.""This is useful for observability."
"The Compiler emits budget_report.bucket_truncations.""The system handles token pressure."
"The Tool Gateway denies this call before execution.""The agent should not call that tool."
"The DecisionRecord is incomplete without evidence refs.""The response should be trustworthy."
"This behavior change requires replay and approval.""The agent learns from feedback.”

The voice is calm, direct, and explicit about authority. ContextOS does not sell magic. It shows the boundary.

On being an operating system for agents

An operating system is not valuable because it is visible all the time. It is valuable because every process knows what it can access, what it must declare, what happens when it fails, and where its state goes.

ContextOS gives agents the same discipline:

  1. Define the request as a RunContext.
  2. Compile context from governed sources.
  3. Plan inside bounded roles.
  4. Execute only through approved capabilities.
  5. Record a typed decision.
  6. Evaluate the run.
  7. Improve through gated promotion.

The goal is not to make agents sound more confident. The goal is to make agent work inspectable enough that teams can trust it, operate it, and improve it without losing control.

Continuity mechanism

A ContextOS system stays coherent across time through pinned artifacts:

  1. Context Packs define what can enter the model.
  2. Policy bundles define what can happen.
  3. Catalogs define valid intents, tasks, and decisions.
  4. Adapter registrations define callable capabilities.
  5. Memory promotion defines what can be recalled.
  6. Evaluator thresholds define what can ship.
  7. Decision Records and traces define what happened.
  8. Replay packets define what can be reproduced.

Update the pack, and the compiled context changes. Update policy, and the execution surface changes. Update evaluators, and the release gate changes. Every configuration change should be visible, versioned, and have a rollback target. Reverting a pack does not undo an external effect; compensation depends on the capability and may be impossible.

What replay can promise

Replay reconstructs a run from pinned artifacts and recorded inputs. Deterministic policy and compiler artifacts can be compared exactly. Probabilistic model stages are assessed against recorded outcomes, declared properties, and scorecards; identical model prose is not a universal guarantee.

Audit replay substitutes recorded tool results and must not repeat live side effects. A missing snapshot or transcript limits what can be reconstructed and should be reported explicitly. Decision records describe accepted outcomes and evidence, not private model chain-of-thought. Retention, redaction, and access controls still apply to audit material.

Continuity therefore lives in durable state, not in an assumption that the next model invocation remembers. Anthropic’s long-running agent harness demonstrates the value of explicit progress artifacts and verified completion across context windows. Its coding results support this design choice, not a universal guarantee for every domain.

Evaluation metrics

Treat the philosophy as questions an implementation can answer. These are suggested operational checks, not additional schema requirements or universal release thresholds.

CommitmentEvidence to examine
State is explicitCan sampled runs resolve their actor, tenant, pinned inputs, controls, and budget usage? Can an interrupted run reconcile its last effect?
Outcomes are typedWhat fraction of claimed successes have the required outcome evidence? How often does the reported result disagree with observed state?
Unsafe authority is containedDo denial and adversarial tests prevent forbidden effects? Are approvals bound to the actual action? Can credentials bypass the gateway?
Learning is gatedDo promoted changes link to their source failure, evaluation result, release version, and rollback target? Does the original failure pass after promotion?
Useful work remains usefulTrack verified completion, unnecessary escalation, latency, and cost together; blocked legitimate work is also a failure.

Evaluate both the path and the result. Anthropic’s agent evaluation guidance distinguishes a transcript’s claims from the final environment state and recommends graders suited to the task. ContextOS applies that distinction to evidence-backed outcomes; fluent answers and favorable judge scores cannot substitute for required policy checks.

Research grounding

The linked engineering reports inform this philosophy; they do not certify ContextOS or prove an implementation secure. Their findings are applied here as design guidance, while ContextOS’s own contracts remain authoritative.

The MCP maintainers’ Security Best Practices explain confused-deputy risks, token audience validation, and why token passthrough is forbidden. The implication for ContextOS is concrete: tool connectivity does not itself establish authority. Identity and authorization must survive every boundary. This is a living draft reference, not a pinned ContextOS dependency.

For implementation detail, continue with How It Works, Governance, Memory, and the Improvement Loop.

The line

ContextOS exists to draw one line clearly:

The model may reason, but the runtime governs.

That is the soul of the system.

Soul version: 1.1.0 - 2026-09-06. Philosophy revision; no runtime schema change.