Articles

Cap what an AI agent adds to your hosting bill

Each AI agent on Gregale has a monthly budget for the always-on capacity it adds. Gregale prices every change before it is made; a change past the budget waits for your approval, with its added monthly cost on the review page.

Updated

On Gregale, every AI agent has a monthly budget for the always-on capacity it adds to your bill. An agent can raise what you pay without any traffic, for example by keeping instances warm, adding workers or giving warm instances more RAM. Gregale prices each such change before it is made. Within the budget it goes through; past it, the change waits for your approval, and the review page shows what it adds per month.

What the budget counts

The always-on cost the agent's changes keep running:

  • warm instances (min_instances, a scaling policy's floor or schedule),
  • services and workers, whose replicas run whatever the traffic,
  • more RAM on warm instances,
  • prewarming.

Each change is priced by how much it adds at the overage rate, before it is made. Traffic-driven usage is not counted: your account's spend cap still bounds that. Lowering cost never asks, and gives the budget back.

The default is half your plan's default spend cap. Set one per agent:

sh
gregale mcp connection budget <id>             # budget and the always-on cost in use
gregale mcp connection budget <id> --set 40    # $40 a month
gregale mcp connection budget <id> --unlimited
gregale mcp connection budget <id> --default

An organization can cap every agent acting in it; the lower of the agent's budget and the ceiling applies:

sh
gregale org agent policy set --org acme --agents allow --max-budget 100

The agent can check the cost first

An agent reads its own budget with gregale mcp connection budget --self (MCP: gregale_agent_budget) and can price a change before it makes it: gregale app <slug> scale --plan or the MCP tool gregale_plan_scale shows the added cost, the budget left and whether a person would be asked. The header Gregale-Agent-Preview: budget does the same for any client; Gregale prices it as the real request and changes nothing.

How other setups compare

Cloud spend caps and budget alerts work on a whole account or project. They tell you after the money is spent, or stop everything when the cap is hit, and they don't say which agent added the cost. Gregale prices each agent's change before it happens and stops only that change.

Questions

What does the agent budget count?

The always-on cost the agent's changes keep running: warm instances, services and workers, more RAM on warm instances, and prewarming. Traffic-driven usage is not counted; your account's spend cap still bounds it.

What is the default budget?

Half of your plan's default spend cap. You can set a budget per agent, make it unlimited, or go back to the default with gregale mcp connection budget.

Does the budget reset every month?

No. It holds the total always-on cost the agent's changes keep running, so capacity it added last month still counts. Lowering cost never asks and gives the budget back.

Can the agent check the cost before it asks?

Yes. gregale app <slug> scale --plan, the MCP tool gregale_plan_scale, or the header Gregale-Agent-Preview: budget prices a change, shows the budget left and whether a person would be asked, and changes nothing.

Can an organization cap every agent?

Yes. gregale org agent policy set --max-budget sets a ceiling; the lower of the agent's budget and the ceiling applies.