RunReplayService
AgentPrism.Core.dllMakes a recorded run re-runnable with the same input under modified conditions.
public sealed class RunReplayServiceInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The service does not start the run; it only prepares it. This lets the caller use the same plan on a streaming, non-streaming, or queued path, and every failure condition is known before the response starts.
Replay is sessionless. If the source run belongs to a
session, its input is only the messages from that turn; history
is injected by ChatHistoryProvider and is not part of the recorded
input. Running the replay in the same session would write into the
source’s conversation (append-only); that is why a replay is
always a new, sessionless run. To restart a multi-turn conversation from
the beginning, use branching (IConversationBranchStore).
Constructors
Section titled “Constructors”RunReplayService(IRunStore, IRunInputStore, IAgentDefinitionStore, IAgentCatalog, AgentDefinitionCompiler, IToolRegistry, IEnumerable<IAgentDecorator>, ITenantContext)
Section titled “ RunReplayService(IRunStore, IRunInputStore, IAgentDefinitionStore, IAgentCatalog, AgentDefinitionCompiler, IToolRegistry, IEnumerable<IAgentDecorator>, ITenantContext)”Creates a new replay service.
public RunReplayService(IRunStore runs, IRunInputStore inputs, IAgentDefinitionStore definitions, IAgentCatalog catalog, AgentDefinitionCompiler compiler, IToolRegistry tools, IEnumerable<IAgentDecorator> decorators, ITenantContext tenantContext)Parameters
Section titled “Parameters”runs IRunStore
The run store.
inputs IRunInputStore
The input store.
definitions IAgentDefinitionStore
The agent definition store.
catalog IAgentCatalog
The agent catalog.
compiler AgentDefinitionCompiler
The definition compiler.
tools IToolRegistry
The tool registry. The approval-required tool check is read from here.
decorators IEnumerable<IAgentDecorator>
The wrappers to apply to the resolved agent.
tenantContext ITenantContext
The tenant context.
Exceptions
Section titled “Exceptions”One of the dependencies is null.
Methods
Section titled “Methods”PrepareAsync(Guid, RunReplayRequest, CancellationToken)
Section titled “ PrepareAsync(Guid, RunReplayRequest, CancellationToken)”Prepares a replay.
public ValueTask<RunReplayPreparation> PrepareAsync(Guid runId, RunReplayRequest request, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”runId Guid
The identity of the source run.
request RunReplayRequest
The conditions to modify.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<RunReplayPreparation>
The preparation result.
Exceptions
Section titled “Exceptions”request is null.