You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/agentic-token-audit.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: Daily audit of AI credit spend across all agentic workflows with historical trend tracking
2
+
description: Daily audit of AI Credit (AIC) usage across all agentic workflows with historical trend tracking
3
3
on:
4
4
schedule:
5
5
- cron: "daily around 12:00 on weekdays"
@@ -9,6 +9,10 @@ permissions:
9
9
actions: read
10
10
issues: read
11
11
pull-requests: read
12
+
network:
13
+
allowed:
14
+
- defaults
15
+
- python
12
16
tracker-id: agentic-token-audit
13
17
safe-outputs:
14
18
create-issue:
@@ -25,12 +29,12 @@ tools:
25
29
- "*"
26
30
repo-memory:
27
31
branch-name: "memory/token-audit"
28
-
description: "Historical daily workflow token usage snapshots (shared with agentic-token-optimizer)"
32
+
description: "Historical daily workflow AIC snapshots (shared with agentic-token-optimizer)"
29
33
file-glob: ["*.json", "*.jsonl", "*.csv", "*.md"]
30
34
max-file-size: 102400
31
35
max-patch-size: 51200
32
36
steps:
33
-
- name: Setup Python runtime
37
+
- name: Setup Python
34
38
uses: actions/setup-python@v6.2.0
35
39
with:
36
40
python-version: "3.12"
@@ -71,15 +75,15 @@ steps:
71
75
timeout-minutes: 25
72
76
---
73
77
74
-
# Daily Agentic Workflow AI Credit Spend Audit
78
+
# Daily Agentic Workflow AIC Usage Audit
75
79
76
-
You are the Agentic Workflow Auditor — a workflow that tracks daily AI credit spend and token consumption across all agentic workflows in this repository and maintains a historical record for trend analysis.
80
+
You are the Agentic Workflow Auditor — a workflow that tracks daily AI Credit (AIC) spend and token consumption across all agentic workflows in this repository and maintains a historical record for trend analysis.
77
81
78
82
## Mission
79
83
80
-
1. Parse the pre-downloaded agentic workflow logs and compute per-workflow AI credit spend and token usage metrics.
84
+
1. Parse the pre-downloaded agentic workflow logs and compute per-workflow AIC spend and token usage metrics.
81
85
2. Persist today's snapshot to repo-memory so the optimizer (and future runs of this audit) can read historical data.
82
-
3. Publish a concise audit issue summarizing today's AI credit spend and trend highlights.
86
+
3. Publish a concise audit issue summarizing today's AIC spend and trend highlights.
83
87
84
88
## Data Sources
85
89
@@ -103,9 +107,9 @@ Each element of `.runs` is a `RunData` object with (among others):
Copy file name to clipboardExpand all lines: .github/workflows/agentic-token-optimizer.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
description: Daily optimizer that identifies high-AI-credit-spend agentic workflows, audits their runs, and recommends efficiency improvements including inline sub-agent refactors when warranted
2
+
description: Daily optimizer that identifies a high-AIC agentic workflow, audits its runs, and recommends efficiency improvements including inline sub-agent refactors when warranted
3
3
on:
4
4
schedule:
5
5
- cron: "daily around 14:00 on weekdays"
@@ -18,7 +18,7 @@ tools:
18
18
- "*"
19
19
repo-memory:
20
20
branch-name: "memory/token-audit"
21
-
description: "Historical daily workflow token usage snapshots (shared with agentic-token-audit)"
21
+
description: "Historical daily workflow AIC snapshots (shared with agentic-token-audit)"
You are the Agentic Workflow Optimizer. Pick one high-AI-credit-spend workflow, audit recent runs, and create a conservative optimization issue with measurable improvements. Your recommendations may include prompt, tool, reliability, setup-prefix, and inline sub-agent improvements when the evidence supports them.
115
+
You are the Agentic Workflow Optimizer. Pick one high-AIC workflow, audit recent runs, and create a conservative optimization issue with measurable improvements. Your recommendations may include prompt, tool, reliability, setup-prefix, and inline sub-agent improvements when the evidence supports them.
116
116
117
117
## Objectives
118
118
119
119
1. Select one workflow using repo-memory and pre-aggregated data.
120
-
2. Analyze tokens, turns, errors, tool usage patterns, and prompt structure across multiple runs.
120
+
2. Analyze AIC, tokens, turns, errors, tool usage patterns, and prompt structure across multiple runs.
121
121
3. Propose safe, high-impact optimizations with evidence, including inline sub-agent refactors only when they are a clear fit.
122
122
4. Publish one issue and update optimization history.
123
123
@@ -151,11 +151,11 @@ Prefer `--jq` on `gh api` calls over a separate `| jq` step when the filter is s
151
151
## Data Inputs
152
152
153
153
-`/tmp/gh-aw/token-audit/all-runs.json`: full 7-day run data (`gh aw logs --json`).
154
-
-`/tmp/gh-aw/token-audit/top-workflows.json`: pre-aggregated top 10 workflows by total AI credits.
154
+
-`/tmp/gh-aw/token-audit/top-workflows.json`: pre-aggregated top 10 workflows by total AIC.
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ It is built for platform engineers, developer productivity teams, and repository
10
10
## Key Features
11
11
12
12
-**Clear operational visibility** with a daily audit that captures AI credit spend, usage trends, and workflow-level hotspots.
13
-
-**Actionable optimization guidance** that identifies high-AI-credit-spend workflows and proposes safe, conservative improvements.
13
+
-**Actionable optimization guidance** that identifies high-AIC workflows and proposes safe, conservative improvements.
14
14
-**Faster efficiency improvements** by helping teams find waste before it becomes recurring operational overhead.
15
15
-**Built for real GitHub workflows** using GitHub Agentic Workflows, so installation and adoption fit naturally into existing repositories.
16
16
-**Useful historical context** through shared snapshots that support trend analysis instead of one-off debugging.
@@ -50,8 +50,8 @@ Included workflows:
50
50
51
51
| Workflow | What it does |
52
52
| ----- | --- |
53
-
|[`Daily Agentic Workflow AI Credit Spend Audit`](https://github.com/githubnext/agentic-ops/blob/main/workflows/agentic-token-audit.md?plain=1)| Collects recent agentic workflow usage and creates a daily AI credit spend snapshot. |
54
-
|[`Agentic Workflow AI Credit Spend Optimizer`](https://github.com/githubnext/agentic-ops/blob/main/workflows/agentic-token-optimizer.md?plain=1)| Analyzes high-AI-credit-spend workflows and proposes conservative efficiency changes, including inline sub-agent opportunities when they are a strong fit. |
53
+
|[`Daily Agentic Workflow AIC Usage Audit`](https://github.com/githubnext/agentic-ops/blob/main/workflows/agentic-token-audit.md?plain=1)| Collects recent agentic workflow usage and creates a daily AIC spend snapshot. |
54
+
|[`Agentic Workflow AIC Usage Optimizer`](https://github.com/githubnext/agentic-ops/blob/main/workflows/agentic-token-optimizer.md?plain=1)| Analyzes high-AIC workflows and proposes conservative efficiency changes, including inline sub-agent opportunities when they are a strong fit. |
0 commit comments