agent: add Usage type to backend package

This commit is contained in:
Levi Neely 2026-04-01 14:22:50 +02:00
parent 9fc32236e3
commit 08a81c3317
1 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,14 @@ type SessionOptions struct {
Model string // Optional model override (empty = backend default)
}
// Usage holds token accounting data for a single agent turn.
type Usage struct {
InputTokens int
OutputTokens int
CacheReadTokens int
CacheWriteTokens int
}
// Backend represents any chat backend (CLI tool via PTY, or direct API)
type Backend interface {
// Name returns the backend name