Skip to content

IRunInputStore

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Stores a run’s input messages. The source of replay.

public interface IRunInputStore

A separate interface; a member is not added to IRunStore. Adding a member to an existing interface is a breaking change after release (the same reason applies to IRetentionStore and IEvalStore).

The input was never persisted anywhere until now: RunRecord carries no input, and the RunEventType.RunStarted event only carries the text of the first user message, and that text can be truncated. Replay must be faithful; this is why messages are stored in a separate table together with their polymorphic content.

An error from this store does not stop the run. The write path (RunRecordingAgent) catches and logs the error; observability must not break functionality.

GetAsync(string, Guid, CancellationToken)

Section titled “ GetAsync(string, Guid, CancellationToken)”

Reads the stored input.

ValueTask<RunInputRecord?> GetAsync(string tenantId, Guid runId, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

runId Guid

The run identifier.

cancellationToken CancellationToken

The cancellation token.

ValueTask<RunInputRecord?>

The record; null if it does not exist or belongs to another tenant.

SaveAsync(RunInputRecord, CancellationToken)

Section titled “ SaveAsync(RunInputRecord, CancellationToken)”

Saves the input messages.

ValueTask SaveAsync(RunInputRecord record, CancellationToken cancellationToken = default)

record RunInputRecord

The input to save.

cancellationToken CancellationToken

The cancellation token.

ValueTask

The completion task.

A second write for the same run is ignored: a queued run can start twice with the same identifier, and the input must not change.