usage

package
v0.6.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	InputTokens     int64
	OutputTokens    int64
	TotalTokens     int64
	CachedTokens    int64
	ReasoningTokens int64
	InputCost       float64
	OutputCost      float64
	TotalCost       float64
}

Record contains a single provider usage event, normalized to the Console schema.

type Usage

type Usage struct {
	// contains filtered or unexported fields
}

Usage is the central run-level token and cost accumulator for agent harnesses.

func New

func New(existing *console.AgentRunUsage) *Usage

func (*Usage) Attributes

func (u *Usage) Attributes() *console.AiUsageAttributes

func (*Usage) RecordUsage

func (u *Usage) RecordUsage(record Record)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL