Skip to content

SessionRecord

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

A stored session.

public sealed record SessionRecord : IEquatable<SessionRecord>

objectSessionRecord

IEquatable<SessionRecord>

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

public SessionRecord()

The agent the session belongs to.

public required string AgentName { get; init; }

string

The creation time (UTC).

public required DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

The session identifier.

public required string Id { get; init; }

string

The serialized session state. Microsoft Agent Framework’s SerializeSessionAsync output, treated as opaque.

public required JsonElement State { get; init; }

JsonElement

The tenant identifier.

public string? TenantId { get; init; }

string?

The last-updated time (UTC).

public required DateTimeOffset UpdatedAt { get; init; }

DateTimeOffset

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(SessionRecord? other)

other SessionRecord?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(SessionRecord?, SessionRecord?)

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

left SessionRecord?

right SessionRecord?

bool

operator !=(SessionRecord?, SessionRecord?)

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

left SessionRecord?

right SessionRecord?

bool