| api_key | Your AgentMeter API key (from agentmeter.app/dashboard/settings/general) | yes | — |
| actor | GitHub login of the person who triggered the run. Defaults to github.actor. | no | ${{ github.actor }} |
| github_token | GitHub token for API access (comment posting, artifact download, job listing). Defaults to the built-in GITHUB_TOKEN. | no | ${{ github.token }} |
| model | The AI model used (e.g. claude-sonnet-4-5, claude-opus-4-6) | no | "" |
| engine | The AI engine used (claude, copilot, codex). Defaults to claude. | no | claude |
| agent_output | Stdout from the agent step (for JSON token extraction). Pass the output of your agent step here. | no | "" |
| input_tokens | Input token count (if known; overrides extraction from agent_output) | no | "" |
| output_tokens | Output token count (if known; overrides extraction from agent_output) | no | "" |
| cache_read_tokens | Cache read token count | no | "" |
| cache_write_tokens | Cache write token count | no | "" |
| turns | Number of agent turns/iterations (if known) | no | "" |
| status | Run status: success, failed, timed_out, cancelled, needs_human. Defaults to success. | no | success |
| pr_number | PR number created by this run (if any) | no | "" |
| api_url | AgentMeter API base URL (override for self-hosted or testing) | no | https://agentmeter.app |
| post_comment | Whether to post a cost comment on the PR/issue. Set to false to disable. | no | true |
| trigger_number | Issue or PR number to comment on. Use when running via workflow_run where GitHub context does not carry the original trigger number. | no | "" |
| trigger_event | Original event name that triggered the agent workflow (issues, pull_request, etc.). Used with trigger_number to format the correct trigger ref. | no | "" |
| workflow_run_id | The 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_at | ISO 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_at | ISO 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 | "" |