Table of Contents

Class SuspendedRun

Namespace
Emissary
Assembly
Emissary.dll

A durably suspended agent run, paused at a human-in-the-loop gate. Serialize with ToJson(), persist (e.g. via IAgentStateStore), and resume later — minutes or days — with ResumeAsync(SuspendedRun, bool, CancellationToken).

public sealed record SuspendedRun : IEquatable<SuspendedRun>
Inheritance
SuspendedRun
Implements
Inherited Members

Constructors

SuspendedRun(Guid, IReadOnlyList<Message>, AgentUsage, IReadOnlyList<ToolResultBlock>, IReadOnlyList<PlannedEffect>, GuardSnapshot, IReadOnlyList<PlannedEffect>)

A durably suspended agent run, paused at a human-in-the-loop gate. Serialize with ToJson(), persist (e.g. via IAgentStateStore), and resume later — minutes or days — with ResumeAsync(SuspendedRun, bool, CancellationToken).

public SuspendedRun(Guid ConversationId, IReadOnlyList<Message> Messages, AgentUsage Usage, IReadOnlyList<ToolResultBlock> CompletedResults, IReadOnlyList<PlannedEffect> PendingApprovals, GuardSnapshot Guard, IReadOnlyList<PlannedEffect> PlannedEffects)

Parameters

ConversationId Guid

The conversation's id.

Messages IReadOnlyList<Message>

The conversation so far, ending with the assistant's tool-use turn.

Usage AgentUsage

Usage accumulated before suspension.

CompletedResults IReadOnlyList<ToolResultBlock>

Results of the batch's non-gated calls, already executed.

PendingApprovals IReadOnlyList<PlannedEffect>

The gated calls awaiting a decision.

Guard GuardSnapshot

The tool-call guard state.

PlannedEffects IReadOnlyList<PlannedEffect>

Shadow-planned effects accumulated before suspension.

Properties

CompletedResults

Results of the batch's non-gated calls, already executed.

public IReadOnlyList<ToolResultBlock> CompletedResults { get; init; }

Property Value

IReadOnlyList<ToolResultBlock>

ConversationId

The conversation's id.

public Guid ConversationId { get; init; }

Property Value

Guid

Guard

The tool-call guard state.

public GuardSnapshot Guard { get; init; }

Property Value

GuardSnapshot

Messages

The conversation so far, ending with the assistant's tool-use turn.

public IReadOnlyList<Message> Messages { get; init; }

Property Value

IReadOnlyList<Message>

PendingApprovals

The gated calls awaiting a decision.

public IReadOnlyList<PlannedEffect> PendingApprovals { get; init; }

Property Value

IReadOnlyList<PlannedEffect>

PlannedEffects

Shadow-planned effects accumulated before suspension.

public IReadOnlyList<PlannedEffect> PlannedEffects { get; init; }

Property Value

IReadOnlyList<PlannedEffect>

Usage

Usage accumulated before suspension.

public AgentUsage Usage { get; init; }

Property Value

AgentUsage

Methods

FromJson(string)

Deserializes a suspended run from JSON.

public static SuspendedRun FromJson(string json)

Parameters

json string

The suspended-run JSON.

Returns

SuspendedRun

Exceptions

InvalidOperationException

The JSON is the null literal.

ToJson()

Serializes the suspended run as indented JSON.

public string ToJson()

Returns

string