Schema:

ACCOUNT_USAGE

SNOWFLAKE_INTELLIGENCE_USAGE_HISTORY view

The SNOWFLAKE_INTELLIGENCE_USAGE_HISTORY view can be used to query the usage history of Snowflake Intelligence.

Note

This view does not include requests originating from Cortex Agents. Requests originating from Cortex Agents are recorded in the CORTEX_AGENT_USAGE_HISTORY view.

The information in the view includes the number of credits consumed each time a user interacts with Snowflake Intelligence. A request results in one or more calls to underlying agents and any tools, for example, Cortex Analyst and Cortex Search. Each row in the view represents a call to the agent and provides detail on the aggregated tokens and credits in the call as well as granular detail. The view also includes relevant metadata, such as the user ID, request ID, Snowflake Intelligence ID, and the agent ID. For more information about Cortex billing, see Cost considerations.

Columns

Column nameData typeDescription
START_TIMETIMESTAMP_LTZStart time when the Snowflake Intelligence message request was received.
END_TIMETIMESTAMP_LTZEnd time when the Snowflake Intelligence message response was sent.
USER_IDNUMBERThe unique identifier of the user who made the request.
USER_NAMEVARCHARThe name of the user who made the request.
USER_TAGSARRAY

Tags associated with the user. Each object in the array contains the following value pairs:

  • level: The level at which the tag is applied (for example, “ACCOUNT” or “USER”).
  • tag_database: The database where the tag is defined.
  • tag_schema: The schema where the tag is defined.
  • tag_name: The name of the tag.
  • tag_value: The value of the tag.
REQUEST_IDVARCHARThe unique identifier for the request.
PARENT_REQUEST_IDVARCHARThe identifier of the parent request, if applicable.
SNOWFLAKE_INTELLIGENCE_IDNUMBERThe unique identifier of the Snowflake Intelligence instance.
SNOWFLAKE_INTELLIGENCE_NAMEVARCHARThe name of the Snowflake Intelligence instance.
SNOWFLAKE_INTELLIGENCE_TAGSARRAY

Tags associated with the Snowflake Intelligence instance. Each object in the array contains the following value pairs:

  • level: The level at which the tag is applied (for example, “ACCOUNT” or “SNOWFLAKE_INTELLIGENCE”).
  • tag_database: The database where the tag is defined.
  • tag_schema: The schema where the tag is defined.
  • tag_name: The name of the tag.
  • tag_value: The value of the tag.
AGENT_DATABASE_IDNUMBERThe unique identifier of the agent database.
AGENT_DATABASE_NAMEVARCHARThe name of the agent database.
AGENT_SCHEMA_IDNUMBERThe unique identifier of the agent schema.
AGENT_SCHEMA_NAMEVARCHARThe name of the agent schema.
AGENT_IDNUMBERThe unique identifier of the agent.
AGENT_NAMEVARCHARThe name of the agent.
AGENT_TAGSARRAY

Tags associated with the Agent. Each object in the array contains the following value pairs:

  • level: The level at which the tag is applied (for example, “SCHEMA” or “CORTEX_AGENT”).
  • tag_database: The database where the tag is defined.
  • tag_schema: The schema where the tag is defined.
  • tag_name: The name of the tag.
  • tag_value: The value of the tag.
TOKEN_CREDITSNUMBERThe number of token credits used for the request. Used for user-level budgeting.
TOKENSNUMBERSum of the tokens used by the Snowflake Intelligent agent.
TOKENS_GRANULARARRAY

Granular breakdown of token usage by request, service type (cortex_agents, cortex_analyst), and model. Includes input, cache_read_input, cache_write_input, and output token counts per model. The “unknown” model name is used when a model is not present in the pricing data. Each object in the array contains the following value pairs:

  • request_id: The unique identifier for the request.
  • service_type: The service type, such as “cortex_agents” or “cortex_analyst”.
  • model: The model name used for the request.
  • input: Number of input tokens.
  • cache_read_input: Number of cache read input tokens.
  • cache_write_input: Number of cache write input tokens.
  • output: Number of output tokens.
  • start_time: The start time of the request.
CREDITS_GRANULARARRAY

Granular breakdown of credit usage by request, service type (cortex_agents, cortex_analyst), and model. Includes input, cache_read_input, cache_write_input, and output credit values per model. The “unknown” model name is used when a model is not present in the pricing data. Each object in the array contains the following value pairs:

  • request_id: The unique identifier for the request.
  • service_type: The service type, such as “cortex_agents” or “cortex_analyst”.
  • model: The model name used for the request.
  • input: Credit value for input tokens.
  • cache_read_input: Credit value for cache read input tokens.
  • cache_write_input: Credit value for cache write input tokens.
  • output: Credit value for output tokens.
  • start_time: The start time of the request.
METADATAOBJECT

Additional metadata, including:

  • role_id: ID of the primary role used for the request.
  • role_name: Name of the primary role used for the request.
  • ai_functions_credits: Credits consumed by AI functions invoked during the request. Contains NULL if no AI functions were used.

Examples

Retrieve Snowflake Intelligence usage history:

SELECT *
  FROM SNOWFLAKE.ACCOUNT_USAGE.SNOWFLAKE_INTELLIGENCE_USAGE_HISTORY;
+-------------------------------+-------------------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------+---------------------------+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------------+-----------------+-------------------+----------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+
| START_TIME                    | END_TIME                      | USER_ID | USER_NAME | USER_TAGS                                                                                                                                                                                                                                                | REQUEST_ID                           | PARENT_REQUEST_ID | SNOWFLAKE_INTELLIGENCE_ID | SNOWFLAKE_INTELLIGENCE_NAME | SNOWFLAKE_INTELLIGENCE_TAGS                                                                                                                                                                                                                                        | AGENT_DATABASE_ID | AGENT_DATABASE_NAME | AGENT_SCHEMA_ID | AGENT_SCHEMA_NAME | AGENT_ID | AGENT_NAME | AGENT_TAGS                                                                                                                                                                                                                                              | TOKEN_CREDITS | TOKENS | TOKENS_GRANULAR                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | CREDITS_GRANULAR                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | METADATA                                                                 |
+-------------------------------+-------------------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------+---------------------------+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------------+-----------------+-------------------+----------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+
| 2026-02-06 10:11:51.642 +0000 | 2026-02-06 10:11:55.932 +0000 | 42563   | JKOWAL    | [{"level": "ACCOUNT", "tag_database": "SI", "tag_schema": "AGENTS", "tag_name": "cost-center", "tag_value": "engineering"}, {"level": "USER", "tag_database": "FINANCE", "tag_schema": "AGENTS", "tag_name": "cost-center", "tag_value": "engineering"}] | 9a5bbdce-7427-4166-b839-de8adc81e5cf | NULL              | 123456                    | finance_analytics_si        | [{"level": "ACCOUNT", "tag_database": "SI", "tag_schema": "AGENTS", "tag_name": "cost-center", "tag_value": "finance"}, {"level": "SNOWFLAKE_INTELLIGENCE", "tag_database": "FINANCE", "tag_schema": "AGENTS", "tag_name": "cost-center", "tag_value": "finance"}] | 234               | finance             | 4231            | analytics         | 9234     | agent1     | [{"level": "SCHEMA", "tag_database": "SI", "tag_schema": "AGENTS", "tag_name": "cost-center", "tag_value": "finance"}, {"level": "CORTEX_AGENT", "tag_database": "FINANCE", "tag_schema": "AGENTS", "tag_name": "cost-center", "tag_value": "finance"}] | 20.000000000  | 1900   | [{"9a5bbdce-7427-4166-b839-de8adc81e5cf": {"cortex_agents": {"modelX": {"input": 100, "cache_read_input": 300, "cache_write_input": 400, "output": 200}}, "start_time": "2026-02-06 10:11:51.642 +0000"}}, {"28adaa9a-cbde-4293-bce2-157c807e0dd7": {"cortex_analyst": {"modelY": {"input": 100, "output": 200}, "modelZ": {"input": 100, "output": 200}}, "start_time": "2026-02-06 10:11:52.642 +0000"}}, {"1444950f-6f5b-493f-800c-f62bb307d21c": {"cortex_analyst": {"unknown": {"input": 100, "output": 200}}, "start_time": "2026-02-06 10:11:53.331 +0000"}}] | [{"9a5bbdce-7427-4166-b839-de8adc81e5cf": {"cortex_agents": {"modelX": {"input": 1, "cache_read_input": 2, "cache_write_input": 3, "output": 4}}, "start_time": "2026-02-06 10:11:51.642 +0000"}}, {"28adaa9a-cbde-4293-bce2-157c807e0dd7": {"cortex_agent": {"modelY": {"input": 1, "output": 4}, "modelZ": {"input": 1, "output": 4}}, "start_time": "2026-02-06 10:11:52.642 +0000"}}, {"1444950f-6f5b-493f-800c-f62bb307d21c": {"cortex_analyst": {"unknown": {"input": 0, "output": 0}}, "start_time": "2026-02-06 10:11:53.331 +0000"}}] | {"role_id": 12720, "role_name": "ENGINEER", "ai_functions_credits": 0.5} |
+-------------------------------+-------------------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------------+---------------------------+-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+---------------------+-----------------+-------------------+----------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------+