Header menu logo Nao

ExecutionContext Type

Represents the execution context passed to an agent during its run

Record fields

Record Field Description

CancellationToken

Full Usage: CancellationToken

Field type: CancellationToken

Cancellation token for cooperative cancellation

Field type: CancellationToken

ExecutionId

Full Usage: ExecutionId

Field type: Guid

Unique identifier for this execution run

Field type: Guid

ParentContext

Full Usage: ParentContext

Field type: ExecutionContext option

Parent execution context (for delegated sub-agent calls)

Field type: ExecutionContext option

Sandbox

Full Usage: Sandbox

Field type: SandboxConfig

The sandbox configuration governing this execution

Field type: SandboxConfig

StartedAt

Full Usage: StartedAt

Field type: DateTimeOffset

When the execution started

Field type: DateTimeOffset

Usage

Full Usage: Usage

Field type: ResourceUsage
Modifiers: mutable

Current resource usage (mutable tracking)

Field type: ResourceUsage

Instance members

Instance member Description

this.CheckLimits

Full Usage: this.CheckLimits

Returns: LimitExceeded option
Returns: LimitExceeded option

this.CreateChild

Full Usage: this.CreateChild

Returns: ExecutionContext

this.RecordLlmCall

Full Usage: this.RecordLlmCall

Parameters:
    tokens : int
    costUsd : decimal

tokens : int
costUsd : decimal

this.RecordToolCall

Full Usage: this.RecordToolCall

Static members

Static member Description

ExecutionContext.Create(sandbox)

Full Usage: ExecutionContext.Create(sandbox)

Parameters:
Returns: ExecutionContext
sandbox : SandboxConfig
Returns: ExecutionContext

ExecutionContext.CreateWithCancellation(sandbox) (ct)

Full Usage: ExecutionContext.CreateWithCancellation(sandbox) (ct)

Parameters:
Returns: ExecutionContext

Type something to start searching.