← Documentation

Cost control

ValGuard steers spend for validated multi-agent workflows — hard agent budgets, playbook budget routes, validation-gated cheap→premium fallback, and request-level cost visibility. Numbers stay honest: badges show priced when a curated model price was used, otherwise estimated. There is no invented “cost avoided” KPI.

Surfaces

  • Cost hub — month-to-date spend, spent-on-blocked, 7-day burn sparkline, recommendations, and top spend by agent.
  • Agent settings monthly_budget_usd with block | fallback_agent | cheaper_model (Growth+ for degrade modes; Free stays hard block).
  • Playbooks — graph conditions on_budget_exceeded / budget_remaining_below; budget edges win over agent policy.
  • Request detail — CostBadge labeled priced vs estimated from write-time cost_estimate_source; playbook steps show cache_hit when an exact response cache served the completion.
  • Exact response cache (opt-in) — enable per agent under Limits & privacy, and set COST_RESPONSE_CACHE=1 on the proxy. Stores only post-validation accepted completions; Redis keys are org+agent scoped. Cache hits still record an estimated cost_micro_usd toward agent budgets and MTD rollups; upstream savings are tracked separately via metrics. Semantic similarity is not enabled yet.

Smart LLM fallback

Install the validation-gated cheap→premium template from the Cost hub CTA or Orchestration templates (smart-llm-fallback-router). Try a cheaper model first; escalate only when validators fail — FinOps without bypassing guards.

Model prices

Set your workspace rates under Account → Model prices (USD per 1M input/output tokens). Org overrides beat curated defaults; missing rows fall back to the token heuristic and label estimated. Estimates are not live provider quotes.

Tutorials