Skip to content

agents / Exports / UsagePluginOptions

Interface: UsagePluginOptions

Configuration options for usage plugin

Hierarchy

Table of contents

Properties

Properties

enabled

Optional enabled: boolean

Whether the plugin is enabled

Inherited from

BasePluginOptions.enabled

Defined in

packages/agents/src/abstracts/base-plugin.ts:125


category

Optional category: PluginCategory

Plugin category for classification

Inherited from

BasePluginOptions.category

Defined in

packages/agents/src/abstracts/base-plugin.ts:127


priority

Optional priority: number

Plugin priority for execution order

Inherited from

BasePluginOptions.priority

Defined in

packages/agents/src/abstracts/base-plugin.ts:129


moduleEvents

Optional moduleEvents: EventType[]

Events to subscribe to from modules

Inherited from

BasePluginOptions.moduleEvents

Defined in

packages/agents/src/abstracts/base-plugin.ts:131


subscribeToAllModuleEvents

Optional subscribeToAllModuleEvents: boolean

Whether to subscribe to all module events

Inherited from

BasePluginOptions.subscribeToAllModuleEvents

Defined in

packages/agents/src/abstracts/base-plugin.ts:133


strategy

strategy: UsageTrackingStrategy

Usage tracking strategy to use

Defined in

packages/agents/src/plugins/usage/types.ts:72


filePath

Optional filePath: string

File path for file strategy

Defined in

packages/agents/src/plugins/usage/types.ts:74


remoteEndpoint

Optional remoteEndpoint: string

Remote endpoint for remote strategy

Defined in

packages/agents/src/plugins/usage/types.ts:76


remoteHeaders

Optional remoteHeaders: Record<string, string>

Headers for remote logging

Defined in

packages/agents/src/plugins/usage/types.ts:78


maxEntries

Optional maxEntries: number

Maximum number of usage entries to keep in memory

Defined in

packages/agents/src/plugins/usage/types.ts:80


trackCosts

Optional trackCosts: boolean

Whether to track token costs

Defined in

packages/agents/src/plugins/usage/types.ts:82


costRates

Optional costRates: Record<string, { input: number ; output: number }>

Cost per token rates for different models

Defined in

packages/agents/src/plugins/usage/types.ts:84


batchSize

Optional batchSize: number

Batch size for remote reporting

Defined in

packages/agents/src/plugins/usage/types.ts:86


flushInterval

Optional flushInterval: number

Flush interval for batched reporting in milliseconds

Defined in

packages/agents/src/plugins/usage/types.ts:88


aggregateStats

Optional aggregateStats: boolean

Whether to aggregate statistics

Defined in

packages/agents/src/plugins/usage/types.ts:90


aggregationInterval

Optional aggregationInterval: number

Aggregation interval in milliseconds

Defined in

packages/agents/src/plugins/usage/types.ts:92

Released under the MIT License.