optimize-agentic-workflow

Solid

Analyze and reduce token consumption in agentic workflows — guardrail-specific entry points, measurement, and optimization techniques.

AI & Automation 4,819 stars 466 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Agentic Workflow Token Optimizer Help users reduce the AI token usage and cost of GitHub Agentic Workflows in this repository. ## Load These References First Load these files from `github/gh-aw` (they are not available locally). - `.github/aw/github-agentic-workflows.md` - `.github/aw/token-optimization.md` - `.github/aw/workflow-editing.md` - `.github/aw/syntax.md` Load these only when relevant: - `.github/aw/experiments.md` - `.github/aw/safe-outputs.md` ## Available Commands ```bash gh aw audit <run-id> --json gh aw audit <base-run-id> <optimized-run-id> gh aw logs <workflow-name> --json gh aw compile <workflow-name> gh aw status ``` ## Start the Conversation Ask for one of these inputs: - a workflow run URL (or run ID) to analyze - a workflow name to review the source - the guardrail that was exceeded (max-ai-credits, max-daily-ai-credits, max-tool-denials, max-turns / timeout) ## Fast Path: Run URL Provided If the user gives a GitHub Actions run URL: 1. Extract the run ID 2. Run `gh aw audit <run-id> --json` 3. Inspect `agent_usage.aic`, `agent_usage.input_tokens`, `agent_usage.output_tokens`, `agent_usage.cache_read_tokens` 4. Identify the most expensive phases before asking additional questions ## Guardrail-Specific Entry Points ### `max-ai-credits` exceeded The workflow was stopped because it consumed more AI Credits than the configured per-run budget. Priority checks: 1. Which tool calls dominated token usage? (`token-usage.jsonl`) 2. Is the promp...

Details

Author
github
Repository
github/gh-aw
Created
11 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category