Set Budget
metrx_set_budgetCreate or update a budget for an agent or organization. Define period (daily/monthly), dollar limit, warning threshold, and enforcement mode (alert_only, soft_block, hard_block) to control spending.
Instructions
Create or update a budget configuration for an agent or the entire organization. Budgets enforce spending limits with configurable enforcement modes: "alert_only" (notify but don't block), "soft_block" (block with override), or "hard_block" (strict enforcement). Specify limits in dollars. Do NOT use just to change enforcement mode — use update_budget_mode for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | No | Agent to set budget for. Omit for org-wide budget. | |
| period | Yes | Budget period | |
| limit_dollars | Yes | Spending limit in dollars (e.g., 100 for $100/month) | |
| warning_pct | No | Percentage of limit that triggers a warning (default: 80) | |
| enforcement_mode | No | How to enforce the budget when exceeded | alert_only |