Skip to content

Add daily AgentRx trace optimizer workflow#31785

Merged
pelikhan merged 10 commits into
mainfrom
copilot/add-daily-agentic-workflows
May 12, 2026
Merged

Add daily AgentRx trace optimizer workflow#31785
pelikhan merged 10 commits into
mainfrom
copilot/add-daily-agentic-workflows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

New Feature

Adds a new daily agentic workflow that uses Microsoft AgentRx to diagnose workflow traces and generate one high-signal optimization recommendation. The workflow is scheduled for weekdays and publishes a single rolling issue with evidence-backed guidance.

What does this feature do?

  • New daily workflow

    Introduces .github/workflows/daily-agentrx-trace-optimizer.md with strict-mode agentic config, weekday scheduling, and OTLP/telemetry imports.

  • AgentRx-driven diagnosis pipeline

    Adds run instructions to build a trajectory from recent traces, run AgentRx stages (ir, static, dynamic, check, judge, report), and derive one prioritized optimization.

  • Safe reporting output

    Uses safe-outputs.create-issue with a stable prefix, labels, close-older behavior, and expiration so only the latest actionable optimization stays open.

  • Compiled workflow artifact

    Adds .github/workflows/daily-agentrx-trace-optimizer.lock.yml generated from the markdown workflow definition.

Why is this feature needed?

Trace analysis and optimization guidance were manual/ad hoc. This automates recurring diagnosis and consistently surfaces one concrete fix with supporting evidence.

Implementation details

on:
  schedule: daily on weekdays
network:
  allowed: [defaults, python, github]
safe-outputs:
  create-issue:
    title-prefix: "[agentrx-optimizer] "
    close-older-issues: true
    expires: 7d

Copilot AI and others added 3 commits May 12, 2026 20:13
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot use tools.agentic-workflows to download traces from agentic workflows and analyze runs. Do not try to read local files initially.

Copilot AI and others added 2 commits May 12, 2026 20:26
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 12, 2026

@copilot use tools.agentic-workflows to download traces from agentic workflows and analyze runs. Do not try to read local files initially.

Updated in dd99991.

The workflow now explicitly enables tools.agentic-workflows, instructs the agent to start with status/logs/audit via that MCP tool to download and analyze runs, and only then use local telemetry files as a secondary source.

Copilot AI requested a review from pelikhan May 12, 2026 20:28
Comment on lines +58 to +60
2. Only after collecting run data with MCP tools, use local telemetry artifacts when available:
- `/tmp/gh-aw/otel.jsonl`
- `/tmp/gh-aw/copilot-otel.jsonl`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot do not use local telemertry, only downloaded data from logs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 235c7b0 to remove local telemetry fallback instructions and require MCP-downloaded run data/logs only for the AgentRx analysis flow.

Copilot AI and others added 2 commits May 12, 2026 20:33
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan May 12, 2026 20:40
@pelikhan pelikhan marked this pull request as ready for review May 12, 2026 20:42
Copilot AI review requested due to automatic review settings May 12, 2026 20:42
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new scheduled agentic workflow that uses Microsoft AgentRx to analyze recent workflow telemetry/logs and publish a single rolling “optimization recommendation” issue (weekday cadence), along with the compiled lockfile artifact.

Changes:

  • Added daily-agentrx-trace-optimizer.md defining the AgentRx-driven daily diagnosis + single-issue reporting behavior.
  • Added the compiled workflow artifact daily-agentrx-trace-optimizer.lock.yml.
  • Regenerated/updated generated workflow metadata in existing lock/commands files.
Show a summary per file
File Description
.github/workflows/daily-agentrx-trace-optimizer.md New markdown workflow definition (weekday schedule, strict mode, AgentRx procedure, safe-outputs issue publishing).
.github/workflows/daily-agentrx-trace-optimizer.lock.yml Compiled GitHub Actions workflow produced from the markdown definition.
.github/workflows/grumpy-reviewer.lock.yml Regenerated lockfile content (heredoc IDs/formatting; no functional logic changes observed in the shown hunk).
.github/workflows/agentic_commands.yml Updated generated gh-aw-commands header metadata (compiler version).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 0

Copilot AI and others added 2 commits May 12, 2026 20:48
…ntic-workflows

# Conflicts:
#	.github/workflows/agentic_commands.yml
#	.github/workflows/grumpy-reviewer.lock.yml

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 12, 2026

@copilot merge main and recompile

Done in 408b42b: merged origin/main and recompiled the workflow lockfile.

@pelikhan pelikhan merged commit 77237bd into main May 12, 2026
@pelikhan pelikhan deleted the copilot/add-daily-agentic-workflows branch May 12, 2026 20:50
Copilot AI restored the copilot/add-daily-agentic-workflows branch May 12, 2026 20:52
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.

3 participants