Interface CostGuardConfig

interface CostGuardConfig {
    maxSessionCostUsd: number;
    maxDailyCostUsd: number;
    maxSingleOperationCostUsd: number;
    onCapReached?: ((agentId, capType, currentCost, limit) => void);
}

Properties

maxSessionCostUsd: number

Maximum USD spend per agent session.

Default

1.00
maxDailyCostUsd: number

Maximum USD spend per agent per day.

Default

5.00
maxSingleOperationCostUsd: number

Maximum USD spend per single operation.

Default

0.50
onCapReached?: ((agentId, capType, currentCost, limit) => void)

Callback when a cap is hit.

Type declaration

    • (agentId, capType, currentCost, limit): void
    • Parameters

      • agentId: string
      • capType: CostCapType
      • currentCost: number
      • limit: number

      Returns void