Skip to content

VoiceSessionRecord

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The summary record of a real-time voice connection.

public sealed record VoiceSessionRecord : IEquatable<VoiceSessionRecord>

objectVoiceSessionRecord

IEquatable<VoiceSessionRecord>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The audio content does not sit in this record. The record is only for measurement and observability: who, when, how many turns, how much audio. If audio is stored (default no), the bytes are in the attachments table.

Each conversation turn also produces a normal runs row. Voice does not change the run path; it only changes the input and output format.

public VoiceSessionRecord()

The name of the agent being talked to.

public required string AgentName { get; init; }

string

The actor who opened the connection.

public string? CreatedBy { get; init; }

string?

Why the connection closed.

public VoiceSessionEndReason? EndReason { get; init; }

VoiceSessionEndReason?

The moment the connection closed; null while still open.

public DateTimeOffset? EndedAt { get; init; }

DateTimeOffset?

The connection’s identifier.

public required Guid Id { get; init; }

Guid

The total resolved audio duration (seconds). Stays null if the provider does not report duration — AgentPrism does not fabricate a duration.

public decimal? InputSeconds { get; init; }

decimal?

The total characters synthesized to speech.

public long? OutputChars { get; init; }

long?

The identifier of the agent session the conversation runs in.

public required string SessionId { get; init; }

string

The moment the connection opened.

public required DateTimeOffset StartedAt { get; init; }

DateTimeOffset

The tenant. Resolved when the connection is established and fixed for the connection’s lifetime.

public required string TenantId { get; init; }

string

The number of completed conversation turns.

public int Turns { get; init; }

int

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(VoiceSessionRecord? other)

other VoiceSessionRecord?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(VoiceSessionRecord?, VoiceSessionRecord?)

Section titled “ operator ==(VoiceSessionRecord?, VoiceSessionRecord?)”
public static bool operator ==(VoiceSessionRecord? left, VoiceSessionRecord? right)

left VoiceSessionRecord?

right VoiceSessionRecord?

bool

operator !=(VoiceSessionRecord?, VoiceSessionRecord?)

Section titled “ operator !=(VoiceSessionRecord?, VoiceSessionRecord?)”
public static bool operator !=(VoiceSessionRecord? left, VoiceSessionRecord? right)

left VoiceSessionRecord?

right VoiceSessionRecord?

bool