Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Updates the portfolio-analyst agentic workflow to generate Portfolio Analysis Reports based on real workflow execution data instead of estimates.

Changes Made

  • Data Source: Changed from gh run list and gh run view to gh aw logs --json for accessing actual cost and execution data
  • Phase 1 (Data Collection): Updated to extract real metrics from gh aw logs including actual costs, token usage, duration, and failure rates
  • Phase 5 (Savings Calculation): Added bash/jq examples for parsing JSON output and calculating savings from actual workflow run data
  • Cost Analysis: All cost calculations now sum estimated_cost values from actual workflow runs in the last 30 days
  • Guidelines: Added new "Use Real Data, Not Guesswork" section emphasizing the use of actual execution data
  • Success Criteria: Updated to require all dollar amounts be derived from real workflow execution data

The workflow now provides accurate portfolio analysis based on actual workflow costs, token consumption, and execution metrics rather than estimates.

Testing

  • ✅ Workflow compiles successfully with gh-aw compile
  • ✅ All bash tool commands use gh aw logs for data access
  • ✅ JSON parsing examples use simplified jq commands
  • ✅ Documentation clarifies that estimated_cost field contains calculated costs from actual token usage
Original prompt

Consider results from the following run:
https://github.com/githubnext/gh-aw/actions/runs/20090737240/workflow
These are still cost estimates, but we would like to obtain


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@mnkiefer
Copy link
Contributor

@copilot The results are based on estimates only, while we can get the actual data from gh aw logs. Update the agentic workflow to generate a Portfolio Analysis Report based on real data.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 10, 2025

@copilot The results are based on estimates only, while we can get the actual data from gh aw logs. Update the agentic workflow to generate a Portfolio Analysis Report based on real data.

Updated the portfolio-analyst workflow to use real data from gh aw logs instead of estimates. The workflow now:

  • Uses gh aw logs --json to extract actual cost data, token usage, duration, and failure rates
  • Calculates monthly costs by summing estimated_cost from actual workflow runs
  • Provides bash examples using jq to parse the JSON output
  • Emphasizes using real data throughout all analysis phases and calculations

All cost analysis is now based on actual workflow execution data from the last 30 days rather than estimates.

Commit: bb27aba

…fy jq

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Update cost estimates based on workflow run Update portfolio-analyst workflow to use real data from gh aw logs Dec 10, 2025
@mnkiefer mnkiefer marked this pull request as ready for review December 10, 2025 10:32
@mnkiefer mnkiefer merged commit d6f3921 into main Dec 10, 2025
5 checks passed
@mnkiefer mnkiefer deleted the copilot/update-cost-estimates branch December 10, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants