Runtime Contract
10-Second Overview
The Runtime Contract defines the behavioral guarantees provided by the Context Layer runtime during execution. These guarantees describe how execution is validated, enforced, and verified.
Why the Runtime Contract Exists
Without a formal contract, execution guarantees are implicit and inconsistent. Rules differ across deployments. Workflow ordering can be violated. Provider misconfiguration can go undetected. Runtime traces can be missing. Context construction can vary.
The Runtime Contract centralizes these guarantees. Developers receive consistent enforcement behavior regardless of deployment. The contract version binds execution semantics.
Scope
The contract applies to both execution modes: Flow Mode and Pulse Mode. See Execution Authority for execution mode definitions.
Runtime Guarantees
The following guarantees are defined by the runtime.
Execution Mode Enforcement
Execution mode (Flow or Pulse) is bound to the API key at creation and enforced throughout execution.
Session Ownership Enforcement
The runtime enforces session lifecycle. Flow sessions require atomic termination. Pulse sessions follow conversational lifecycle rules. Cross-project state access is not permitted.
Consistent Flow Execution
Repeated execution of the same workflow step returns the same runtime response for identical inputs and runtime state.
Sequential Flow Execution
Flow workflows enforce strict step ordering. Only one step executes at a time for a workflow session. Concurrent requests for the same session are rejected.
Session-Level Enforcement
Constraints accumulate across workflow steps within a session. The runtime maintains awareness of these constraints throughout execution. Constraints established at any point in the workflow apply to the final output.
Context Construction
Context Layer constructs invocation context from declared inputs, session state, and active constraints. Context assembly is version-bound and reproducible given identical inputs.
Byte-stable serialization
Context assembly produces byte-identical output for identical inputs. Chunk ordering follows a fixed priority sequence. Constraints are sorted deterministically before rendering. This guarantee ensures that identical session state and inputs produce identical prompts across executions.
Decision Traceability
Runtime decisions that affect execution are recorded and exposed within the execution scope.
Invocation Idempotency
The runtime enforces idempotent execution behavior for repeated invocation requests.
Provider Retry Reliability
The runtime enforces consistent retry behavior for provider invocation failures according to configured retry policy.
Provider Invocation Boundary Enforcement
All model provider invocations occur through the Context Layer runtime. Applications do not call model providers directly when operating under the runtime contract.
Verifiable Workflow Completion
Flow workflows produce an Authority Report upon session termination. Reports are retrievable via the runtime API and provide evidence of execution behavior under the runtime contract.
Determinism Clarification
Context Layer v1.0 guarantees consistent execution behavior, not deterministic model output. Workflow ordering is enforced. Runtime enforcement rules are applied consistently. Model generation itself remains nondeterministic.
Flow and Pulse Mode Differences
Flow mode
Sequential workflow step execution. Authority Report generation on session termination.
Pulse mode
Conversational session lifecycle. No Authority Report generation.
Non-Claims
The Runtime Contract does not guarantee model correctness, semantic accuracy, provider-level guarantees beyond enforcement boundaries, or model reasoning quality. The runtime governs execution behavior, not how models generate responses.
Versioning
The Runtime Contract is versioned. Execution behavior is bound to the contract version active at session creation.
Related Runtime Documentation
Defines system-level component boundaries and the Context Layer runtime structure.
Explains the separation of responsibilities between applications, Context Layer, and LLM providers. Describes what Context Layer controls and what lies outside its authority.