cost

package
v0.14.21 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package cost aggregates per-node + per-workflow LLM usage. Populated during a run by classify/agent executors (which receive Usage from the provider) and surfaced via `workflow_get_run`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

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

Tracker is the in-memory aggregator. One per Manager instance.

func New

func New() *Tracker

New builds an empty tracker.

func (*Tracker) PerDay

func (c *Tracker) PerDay(day string) provider.Usage

PerDay returns totals for a date.

func (*Tracker) PerNode

func (c *Tracker) PerNode(runID, nodeID string) provider.Usage

PerNode returns usage for a specific run+node.

func (*Tracker) PerRun

func (c *Tracker) PerRun(runID string) provider.Usage

PerRun returns totals for a run_id.

func (*Tracker) Record

func (c *Tracker) Record(runID, nodeID, day string, u provider.Usage)

Record adds usage from one node execution.

Jump to

Keyboard shortcuts

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