Skip to content

Add agent budget controls#33

Merged
baraajack merged 1 commit into
mainfrom
pr-33-budget-controls
Jun 8, 2026
Merged

Add agent budget controls#33
baraajack merged 1 commit into
mainfrom
pr-33-budget-controls

Conversation

@baraajack

Copy link
Copy Markdown
Owner

Summary

Adds tenant-isolated, agent-specific budget controls.

Included

  • budget_controls table with RLS enforcement
  • Agent-scoped budget configuration
  • BudgetRepository for configuration lookup and spend evaluation
  • Authorization deny path when budget threshold is reached
  • New decision reason: "denied: budget exceeded"
  • Budget configuration API endpoint
  • Kill switch precedence preserved over budget decisions
  • Decision logging preserved before response
  • Idempotency preserved via existing decision log path
  • Spend derived from existing agent_runs cost records

Not Included

  • Tenant-wide budgets
  • Per-tool budgets
  • Separate spend ledger
  • Alerts or notifications
  • Dashboards
  • Auto-remediation
  • Changes to ingestion or observability paths

Validation

  • Authorization service tests
  • Authorization endpoint tests
  • Full test suite passes
  • Tenant isolation preserved
  • Kill switch override verified

@baraajack baraajack merged commit d229363 into main Jun 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant