Skip to content

ToolUsage

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

A tool’s usage summary. Shown by the UI’s Tools screen.

public sealed record ToolUsage : IEquatable<ToolUsage>

objectToolUsage

IEquatable<ToolUsage>

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

public ToolUsage()

The average duration (milliseconds). null if no call carries a duration.

public double? AverageDurationMs { get; init; }

double?

The error rate among settled calls (0–1). null if there is no call.

public double? ErrorRate { get; }

double?

The number of calls that errored.

public required long FailedCalls { get; init; }

long

The moment it was last called (UTC).

public DateTimeOffset? LastCalledAt { get; init; }

DateTimeOffset?

The tool name.

public required string ToolName { get; init; }

string

The total number of calls.

public required long TotalCalls { get; init; }

long

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(ToolUsage? other)

other ToolUsage?

bool

public override int GetHashCode()

int

public override string ToString()

string

public static bool operator ==(ToolUsage? left, ToolUsage? right)

left ToolUsage?

right ToolUsage?

bool

public static bool operator !=(ToolUsage? left, ToolUsage? right)

left ToolUsage?

right ToolUsage?

bool