Skip to content
Tracon

QuotaConsumption

Namespace Tracon · Assembly Tracon.Abstractions.dll

The consumption of a completed run to add to the quota counters.

public sealed record QuotaConsumption : IEquatable<QuotaConsumption>
Inheritance
object ← QuotaConsumption
Implements
IEquatable<QuotaConsumption>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
public QuotaConsumption()

The name of the agent that ran.

public required string AgentName { get; init; }

string

The amount to add. null if pricing is undefined — not zero: Tracon does not invent a price.

public decimal? Cost { get; init; }

decimal?

The moment the consumption occurred (UTC). The period is computed from this.

public required DateTimeOffset OccurredAt { get; init; }

DateTimeOffset

The identifier of the run that spent this consumption: the root run, a child run of its call tree, or the run whose tool reported the amount. null when consumption is recorded outside a run (there is no such caller today, but the field stays optional rather than assume one always exists).

public string? RunId { get; init; }

string?

The number of runs to add. 1 for a root run; 0 for an entry that adds only the tokens and cost of a run that belongs to a call tree already counted as one run (a child agent run, a tool amount that arrived after its run closed).

public long Runs { get; init; }

long

A store adds it as it is: an entry with 0 still creates a counter that does not exist yet.

The tenant identifier.

public required string TenantId { get; init; }

string

The total tokens to add.

public long Tokens { get; init; }

long

The user the run belongs to. null when the run carries no attribution — a run’s correlation is not guessed from another active user.

public string? UserId { get; init; }

string?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(QuotaConsumption? other)

other QuotaConsumption?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(QuotaConsumption?, QuotaConsumption?)

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

left QuotaConsumption?

right QuotaConsumption?

bool

operator !=(QuotaConsumption?, QuotaConsumption?)

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

left QuotaConsumption?

right QuotaConsumption?

bool