Documentation

Run AgentLedger in your Snowflake account

AgentLedger shows what Cortex Code, Claude Code, Cursor and Gemini CLI cost and what that spend produced, inside your own Snowflake account. This guide covers installing the app, connecting your agents and tools, and how every number is calculated.

What AgentLedger does

AgentLedger is a Snowflake Native App for auditing AI coding agents. It attributes token spend to developers, branches and pull requests, and keeps a trace of what each agent did: the model calls, file reads and edits, shell commands and SQL.

  • Cost per developer, branch and pull request, including a median cost per merged pull request.
  • Every session, recreated from the trace, with prompts readable only by the app's admin role.
  • Nothing leaves your account. The app runs on your warehouses, under your governance, and sends no data to us.

Start here

Quick start

Install AgentLedger from Snowflake Marketplace as ACCOUNTADMIN, then let it read Cortex Code telemetry:

GRANT APPLICATION ROLE SNOWFLAKE.AI_OBSERVABILITY_READER TO APPLICATION AGENTLEDGER;

Give auditors the dashboard through a named role:

CREATE ROLE IF NOT EXISTS AI_USAGE_AUDITOR;
GRANT APPLICATION ROLE AGENTLEDGER.APP_ADMIN TO ROLE AI_USAGE_AUDITOR;
GRANT ROLE AI_USAGE_AUDITOR TO USER <auditor>;

And give developers branch attribution:

GRANT APPLICATION ROLE AGENTLEDGER.APP_REPORTER TO ROLE <developer_role>;
cortex plugin install AGENTLEDGER.PLUGINS.AGENTLEDGER -c <snowflake_connection>

Full steps, including the git host and the optional CLI for Claude Code, Cursor and Gemini CLI, are in the pages above.

Where to go next

If numbers look wrong, Support lists the common causes: traces that haven't arrived yet, a missing plugin, an unbound git host, or a model with no price. Questions are always welcome at support@aiagentledger.dev.