Snowflake Gen AI Governance · Topic 8 of 15
Managing Cortex Costs and Cortex Agents Costs
Learn how Cortex Agents are billed, cap a run with an orchestration budget of seconds and tokens, and compare budgets, quotas and monitoring controls.
- 4 min
- Agent orchestration bills by tokens; custom tools bill warehouse time; search bills by index size and time.
- The
orchestration.budgethassecondsandtokens; either limit stops the run. - Quotas block per user; budgets observe and act on thresholds.
What it is
Every Cortex feature bills a different way, so cost governance starts with knowing the unit of each. Managing cost has three parts: understand what is billed, monitor it with usage views, and limit it with budgets, quotas and per-run caps.
Cortex Agents combine several billed parts in one request, which makes them the best example for the exam.
How it works
What an agent run costs
| Part | How it is billed |
|---|---|
| Orchestration (the planning model) | By tokens used |
| Cortex Analyst tool | By token when called through an agent. Called directly, Analyst bills per message |
| Cortex Search tool | Depends on the index size and how long the index persists |
| Custom tools (stored procedures, UDFs) | Warehouse costs by size and runtime |
| Analytical search | Warehouse compute plus the AI functions it calls, only when enabled and run |
| Web search, code execution, MCP connectors, agent skills | Can add cost beyond orchestration; rates are in the Snowflake Service Consumption Table |
Snowflake does not publish rates in the study material, and you do not need them for the exam. Know the unit and the driver.
Limiting tokens in a single run
To cap what one run can consume, set an orchestration budget in the agent specification. It has two fields.
orchestration:
budget:
seconds: 30
tokens: 16000
The agent stops generating a response when either limit is reached. Token limits apply to orchestration only. They do not cap tokens spent inside tools such as Cortex Analyst or Cortex Search. So a tool-heavy run can still cost more than the budget suggests.
The orchestration budget limits one run. It is not a monthly spending cap. For account or team spend use resource budgets or per-user quotas.
Controls that manage spend over time
| Control | Scope | Enforcement |
|---|---|---|
| Orchestration budget | One agent run | Stops the run at seconds or tokens |
| Resource budget | An object such as an agent, Snowflake Intelligence or a search service | Monitors spend; acts at thresholds with stored procedures |
| Shared resource budget | Users grouped by tag, across AI features | Tracks and can act when thresholds pass |
| Per-user quota | Each user separately | Can block further AI requests once enabled |
Budgets work on a monthly credit limit and thresholds are percentages of it. Evaluation is periodic, so action can lag by up to about 8 hours, or about 2 hours with the latency-optimized option. Quotas are evaluated within minutes, and usage can overshoot slightly before the block applies. Quotas have built-in blocking; budgets act only through your stored procedures.
CREATE SNOWFLAKE.CORE.BUDGET my_budget();
CALL my_budget!SET_SPENDING_LIMIT(500);
CALL my_budget!ADD_SHARED_RESOURCE('CORTEX AGENT');
Tags go on users, not on the agent, for shared budgets. Per-user limits are never pooled: a 100-credit quota across 10 users allows up to 1,000 credits in total.
Monitoring
Use the ACCOUNT_USAGE views, covered in later pages: CORTEX_AGENT_USAGE_HISTORY for agents, and CORTEX_AI_FUNCTIONS_USAGE_HISTORY, CORTEX_SEARCH_DAILY_USAGE_HISTORY, CORTEX_ANALYST_USAGE_HISTORY and others per feature. For total cost, join query_id, warehouse_id and user_id across views, because warehouse time is billed on top of tokens.
Optimizing
- Keep prompts and instructions short; tokens are the main driver.
- Set an orchestration budget so a runaway loop stops.
- Use a small warehouse for tool queries.
- Suspend search services you do not need.
- Use quotas for individual users and budgets for shared resources.
Which control for which requirement
| Requirement | Best fit |
|---|---|
| Stop one runaway agent response | Orchestration budget (seconds, tokens) |
| Stop one user from spending more than a set amount | Per-user quota with blocking enabled |
| Charge Cortex Agents spend to marketing and finance | Shared resource budget with a tag on users |
| Warn when a search service passes a spend level | Resource budget on the search service |
| Find who spent the most last week | Usage views, grouped by user |
Notice that only some features support each control. Cortex Search has resource budgets but is not a per-user quota domain, and the quota domains do not include Cortex Analyst.
Common mistakes
Believing the token budget caps the whole agent. It limits orchestration only.
Expecting budgets to block instantly. They evaluate periodically and can lag hours.
Forgetting warehouse cost. Custom tools and Analyst-generated SQL run on warehouses billed separately.
Putting the cost tag on the agent for shared budgets. The tag goes on users.
What to remember for the exam
- Agent orchestration bills by tokens; custom tools bill warehouse time; search bills by index size and time.
- The
orchestration.budgethassecondsandtokens; either limit stops the run. - Quotas block per user; budgets observe and act on thresholds.
- Budget limits are monthly credits.
Check yourself
Which agent setting stops a long-running response?
The orchestration budget in the agent spec, with seconds and tokens; either limit stops generation.
Does the token budget cover Cortex Analyst tokens inside the run?
No. It applies only to orchestration, not to tools.
Which AI cost control can block a user at their limit?
A per-user quota with block enforcement enabled.
Topic 8 of 15 in Snowflake Gen AI Governance
Test yourself on Snowflake Gen AI Governance
The full Snowflake GES-C02 question bank has 585 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.