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
- Install the app — requirements, the privileges to approve, and how to open the dashboard.
- Grant Cortex Code trace access — the one
GRANTthat lets the app read Cortex Code sessions. - Give auditors access — a dedicated role for finance and compliance, without ACCOUNTADMIN.
- Connect developer machines — branch and commit attribution for Cortex Code, plus the CLI for Claude Code, Cursor and Gemini CLI.
- Sync pull requests, Jira and Linear — bind your git host and issue tracker, or push pull requests from CI.
- How cost is calculated — model pricing, agent SQL, the efficiency score, work types and data freshness.
- Query it in SQL — report cost per developer, per branch and per pull request yourself.
- Privacy and access — exactly what the app reads, stores and never sees.
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.