chore: add agentic fraction & action minutes tracking#23074
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds COGS/efficiency visibility to the Agentic Observability Kit by tracking billable GitHub Actions minutes and introducing an “agentic fraction” signal with new optimization-oriented assessments.
Changes:
- Add
action_minutesper run andsummary.total_action_minutesin logs/audit outputs. - Add
behavior_fingerprint.agentic_fractionand new assessments:partially_reducibleandmodel_downgrade_available. - Extend workflow documentation and add tests for the new signals/assessment kinds.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/logs_report.go | Adds per-run and aggregate action-minutes fields to logs JSON/console output. |
| pkg/cli/logs_orchestrator.go | Computes ActionMinutes from run duration using a ceil-to-minutes heuristic. |
| pkg/cli/logs_models.go | Extends WorkflowRun model to store ActionMinutes. |
| pkg/cli/audit_report.go | Adds action_minutes to audit metrics output. |
| pkg/cli/audit_agentic_analysis.go | Adds agentic_fraction, new assessments, and agentic-fraction computation heuristic. |
| pkg/cli/audit_agentic_analysis_test.go | Adds tests covering agentic fraction, new assessments, and kind prettification. |
| .github/workflows/agentic-observability-kit.md | Documents new canonical signals and assessment kinds. |
Comments suppressed due to low confidence (2)
pkg/cli/audit_agentic_analysis.go:372
computeAgenticFraction’s doc comment says it classifies “tool sequences” and that data-gathering turns use only read-oriented tools, but the implementation currently only usesTurnsandSafeItemsCountand doesn’t look at tool usage at all. Update the comment to reflect the current heuristic, or pass in tool usage data and implement the described classification.
// computeAgenticFraction classifies tool sequences into reasoning vs. data-gathering
// turns and returns the ratio of reasoning turns to total turns.
// Reasoning turns are those where the agent makes decisions, writes output, or uses
// multiple tool types. Data-gathering turns use only read-oriented tools.
func computeAgenticFraction(processedRun ProcessedRun) float64 {
pkg/cli/audit_agentic_analysis.go:290
- The comment says the model-downgrade suggestion applies to a “heavy resource profile”, but the condition is
fingerprint.ResourceProfile != "lean", which includes bothmoderateandheavy. Either tighten the condition to== "heavy"or adjust the comment to match the actual behavior.
// Model downgrade suggestion: the run uses a heavy resource profile but
// the task domain is simple enough that a smaller model would likely suffice.
if fingerprint.ResourceProfile != "lean" &&
(domain.Name == "triage" || domain.Name == "repo_maintenance" || domain.Name == "issue_response") &&
fingerprint.ActuationStyle != "write_heavy" {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Contributor
…dence; rename Minutes → Action Minutes (#23075)
This was referenced Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Better COGS (Cost of Goods Sold) visibility for agentic workflow runs and updated canonical signals/assessment kinds in the Agentic Observability Kit workflow:
action_minutesfield on runs andtotal_action_minuteson the logs summary. Makes the runner-time component of COGS visible in JSON output. Estimates are at run level, not per-job, so this slightly underestimates for multi-job workflows since Actions bills each job rounded up independently.agentic_fractionfield (0.0–1.0) onBehaviorFingerprint. Measures what share of a workflow's turns are actual reasoning vs. data-gathering that could be shell scripts, etc. (Inspired by chemical engineering's conversion fraction: what proportion of input has been transformed into product). Uses write actions as the primary signal: turns producing output require reasoning, turns only fetching context are reduction candidates.partially_reducible: New assessment that fires whenagentic_fraction < 0.6on non-trivial runs. Recommends moving data-fetching turns tosteps:writing to/tmp/gh-aw/agent/. Selectively reduce some phases to deterministic while keeping the reasoning core agentic.model_downgrade_available: New assessment that fires for simple domains (triage, maintenance, issue response) with moderate resource usage. Suggestsgpt-4.1-miniorclaude-haiku-4-5.