RunContext
Properties
Section titled “Properties”abortSignal?
Section titled “abortSignal?”optional abortSignal?: AbortSignal;autoRetrieve?
Section titled “autoRetrieve?”optional autoRetrieve?: AutoRetrieveProvider;bargeIn?
Section titled “bargeIn?”optional bargeIn?: AbortSignal;baseInstructions?
Section titled “baseInstructions?”optional baseInstructions?: Instructions;Agent base layer (ADR 0001), set when entering a flow. baseInstructions
is composed as a prefix into every node turn’s system prompt (persona /
safety / grounding floor); globalTools are safe tools made model-visible
in every speaking turn.
controlModel
Section titled “controlModel”controlModel: LanguageModel;Control-path model (routing, decide, extraction) at temperature 0.
emit: (part) => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”void
optional fs?: FileSystem;Agent workspace filesystem (same instance as AgentConfig.workspace).
globalTools?
Section titled “globalTools?”optional globalTools?: Record<string, AnyTool>;hookRunner
Section titled “hookRunner”hookRunner: HookRunner;inputProcessors
Section titled “inputProcessors”inputProcessors: InputProcessor[];lastRetrievalCitations?
Section titled “lastRetrievalCitations?”optional lastRetrievalCitations?: SourceRef[];Citations from the latest gather-phase retrieval on this turn.
limits?
Section titled “limits?”optional limits?: Limits;memoryService?
Section titled “memoryService?”optional memoryService?: MemoryService;model: LanguageModel;outOfBandControl
Section titled “outOfBandControl”outOfBandControl: boolean;When true, flow reply nodes use the out-of-band control evaluator (ADR 0003 H1).
outputProcessors
Section titled “outputProcessors”outputProcessors: OutputProcessor[];refinementPolicies
Section titled “refinementPolicies”refinementPolicies: RefinementCapability[];runState
Section titled “runState”runState: RunState;runStore
Section titled “runStore”runStore: RunStore;session
Section titled “session”session: Session;skillPrompt?
Section titled “skillPrompt?”optional skillPrompt?: string;Level-1 skill metadata injected by SkillsCapability when AgentConfig.skills is set.
telemetry?
Section titled “telemetry?”optional telemetry?: TelemetrySettings;toolExecutor
Section titled “toolExecutor”toolExecutor: EffectToolExecutor;turnInputConsumed?
Section titled “turnInputConsumed?”optional turnInputConsumed?: boolean;Ephemeral, per-run-invocation flag: has the current turn’s user input been
consumed yet by an input-node (collect/decide)? Input-nodes extract/decide
from the turn’s fresh input; once it is consumed, later nodes in the same
turn pause (present prompt, await next turn) instead of acting on stale
context. Reset to false on every createRunContext (i.e. every turn).
validationPolicies
Section titled “validationPolicies”validationPolicies: ValidationCapability[];workingMemoryPrompt?
Section titled “workingMemoryPrompt?”optional workingMemoryPrompt?: string;Frozen persistent memory blocks loaded at session start (AgentMemory.workingMemory).
workingMemoryTools?
Section titled “workingMemoryTools?”optional workingMemoryTools?: Record<string, AnyTool>;Model-visible tools from working memory wiring (not in globalTools — mutating but scoped).
Methods
Section titled “Methods”approve()
Section titled “approve()”approve(req): Promise<{ approved: boolean; by?: string;}>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
{ |
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<{
approved: boolean;
by?: string;
}>
now(): Promise<number>;Returns
Section titled “Returns”Promise<number>
resetCallsites()
Section titled “resetCallsites()”resetCallsites(): void;Rebase durable effect callsites to 0. The runtime calls this at flow entry so a flow’s durable callsites are anchored to the flow — identical on fresh entry (after an answering turn) and on resume (where that turn does not re-run).
Returns
Section titled “Returns”void
signal()
Section titled “signal()”signal(name, opts?): Promise<unknown>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
{ |
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<unknown>
tool()
Section titled “tool()”tool( name, args,options?): Promise<unknown>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<unknown>
uuid()
Section titled “uuid()”uuid(): Promise<string>;Returns
Section titled “Returns”Promise<string>