Set Budget
metrx_set_budgetSet a daily or monthly spending limit for an agent or organization, with configurable enforcement modes (alert, soft block, hard block) to control costs.
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 |