Context Layer

Runtime API Reference

Context Layer exposes a minimal runtime interface for LLM execution. Developers interact with the runtime through the invokeCL function. Execution mode is bound to the API key and cannot change.

10-Second overview

Developers interact with Context Layer through the runtime function:

Flow mode: invokeCL(message, options)

Pulse mode: invokeCL(message)

  • In Flow mode each invokeCL() call represents one workflow step
  • In Pulse mode each invokeCL() call represents one conversational execution
  • Execution mode is bound to the API key and cannot change
  • The runtime enforces execution behavior and controls provider invocation.

Execution inputs

invokeCL() accepts the following inputs in Flow mode.

message

Required string input representing the developer message.

workflowEnd

Optional boolean. Terminates a Flow workflow session when true.

stateless

Optional boolean. Executes a single isolated invocation outside the workflow session.

These options modify runtime execution behavior.

stateless cannot be combined with workflowEnd.

Execution response fields

Flow mode returns:

  • output
    Model output text for the step.

  • terminated
    Boolean indicating whether the Flow workflow has completed.

  • authorityReport
    Present only when the workflow terminates. Contains execution evidence.

  • raw
    Full raw response from the runtime.

Pulse mode returns:

  • Raw response from the runtime.

Runtime execution rules

Sequential Execution

Flow workflow steps execute sequentially. Concurrent invokeCL() calls are rejected.

Workflow Termination

Flow workflows must terminate using workflowEnd. When a Flow workflow completes, invokeCL() returns terminated: true.

Stateless Execution

Stateless calls execute a single isolated invocation and do not participate in workflow state.

Direct Provider Access

Direct calls to model providers (OpenAI, Anthropic, etc.) are blocked.
All model invocation must go through invokeCL().

Model Routing

Context Layer determines the model from routing and API key configuration in the console. Developers cannot select models per step.

Flow mode requirements

  • Structured workflow execution
  • Each invokeCL() call represents one workflow step
  • workflowEnd terminates the workflow
  • Authority Report generated on termination

Pulse mode requirements

  • Conversational execution
  • Each invokeCL() call represents one message execution
  • No Authority Report generation

Authority Report

Context Layer generates Authority Reports when Flow workflow sessions terminate.

Reports provide traceable execution evidence.

Reports are accessible through the Context Layer console.

Related runtime documentation

Execution Authority

Explains how Context Layer admits, validates, and verifies runtime executions.

Runtime Contract

Defines the behavioral guarantees enforced during execution.

Architecture

Defines system-level component boundaries and runtime structure.

System Boundary

Explains what Context Layer controls and what exists outside its execution boundary.