Table of Contents

Class AgentTaskRun

Namespace
Oscova.Agents.Tasks
Assembly
Oscova.Agents.dll

Captures the persisted and live state of one task execution.

public class AgentTaskRun

Inheritance

Inherited Members

Properties

CompletedAt

Gets or sets when execution completed or failed.

Error

Gets or sets the failure message when the run fails.

Id

Gets or sets the stable run identifier.

IsEncrypted

Gets or sets whether this run's content is stored encrypted.

LiveMessages

Accumulates chat messages during and after an active run. Populated by the observer middleware during execution. Persistence and rehydration of these messages is handled by the configured task store implementation, so they are available both for live runs and for completed runs loaded from storage. The store owns disk persistence via its own serialized messages element; this property is carried over the management API so the session inspector can read it.

LiveMessagesChanged

Invoked after captured request messages are appended and after each non-streaming response is observed.

ResultSummary

Gets or sets the final human-readable result summary.

SessionElement

Gets or sets serialized session state captured for persistent or handoff scenarios.

StartedAt

Gets or sets when execution started.

Status

Gets or sets the current run status.

SystemInstruction

Gets or sets the system instruction captured from the first model request for this run.

TaskId

Gets or sets the task definition identifier this run belongs to.

TokensUsed

Gets or sets the token usage recorded for the run when available.

TriggerParameters

Gets or sets validated webhook parameters captured for this run.

TriggerSource

Gets or sets how this run was started.

UserId

Gets the user who owned the task when this run started.

Methods

AddLiveMessage(ChatMessage)

Appends a single message to Oscova.Agents.Tasks.AgentTaskRun.LiveMessages under a lock.

AddLiveMessages(IEnumerable<ChatMessage>)

Appends multiple messages to Oscova.Agents.Tasks.AgentTaskRun.LiveMessages under a lock.

GetLiveMessagesSnapshot()

Returns a point-in-time snapshot of Oscova.Agents.Tasks.AgentTaskRun.LiveMessages as an array, or null if Oscova.Agents.Tasks.AgentTaskRun.LiveMessages has not been initialised. Safe to call from any thread.