agentmeter/AgentMeter Action

Track token usage and cost for AI agent runs in GitHub Actions

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
api_keyYour AgentMeter API key (from agentmeter.app/dashboard/settings/general)yes
actorGitHub login of the person who triggered the run. Defaults to github.actor.no${{ github.actor }}
github_tokenGitHub token for API access (comment posting, artifact download, job listing). Defaults to the built-in GITHUB_TOKEN.no${{ github.token }}
modelThe AI model used (e.g. claude-sonnet-4-5, claude-opus-4-6)no""
engineThe AI engine used (claude, copilot, codex). Defaults to claude.noclaude
agent_outputStdout from the agent step (for JSON token extraction). Pass the output of your agent step here.no""
input_tokensInput token count (if known; overrides extraction from agent_output)no""
output_tokensOutput token count (if known; overrides extraction from agent_output)no""
cache_read_tokensCache read token countno""
cache_write_tokensCache write token countno""
turnsNumber of agent turns/iterations (if known)no""
statusRun status: success, failed, timed_out, cancelled, needs_human. Defaults to success.nosuccess
pr_numberPR number created by this run (if any)no""
api_urlAgentMeter API base URL (override for self-hosted or testing)nohttps://agentmeter.app
post_commentWhether to post a cost comment on the PR/issue. Set to false to disable.notrue
trigger_numberIssue or PR number to comment on. Use when running via workflow_run where GitHub context does not carry the original trigger number.no""
trigger_eventOriginal event name that triggered the agent workflow (issues, pull_request, etc.). Used with trigger_number to format the correct trigger ref.no""
workflow_run_idThe run ID of the triggering agent workflow (github.event.workflow_run.id). When set, the action automatically fetches the agent-tokens artifact, resolves the trigger PR/issue number, and reads run timestamps — eliminating the need for manual pre-steps in your companion workflow.no""
started_atISO 8601 timestamp for when the agent run started. Overrides the action self-measured start time. Use github.event.workflow_run.run_started_at when calling from a workflow_run trigger.no""
completed_atISO 8601 timestamp for when the agent run completed. Overrides the action self-measured end time. Use github.event.workflow_run.updated_at when calling from a workflow_run trigger.no""
namedescription
run_idThe AgentMeter run ID (UUID)
total_cost_usdTotal cost in USD as a decimal string (e.g. "4.52")
dashboard_urlLink to the run detail page in AgentMeter dashboard