Skip to content

feat(controller): expose AgentTeams metrics#991

Merged
shiyiyue1102 merged 1 commit into
agentscope-ai:mainfrom
shiyiyue1102:codex/controller-metrics-20260704
Jul 4, 2026
Merged

feat(controller): expose AgentTeams metrics#991
shiyiyue1102 merged 1 commit into
agentscope-ai:mainfrom
shiyiyue1102:codex/controller-metrics-20260704

Conversation

@shiyiyue1102

Copy link
Copy Markdown
Collaborator

Summary

  • expose controller-runtime metrics with low-cardinality agentteams_* controller metrics
  • add CR count collection and HTTP API route/status metrics
  • add Helm metrics port plus optional ServiceMonitor, configured by AGENTTEAMS_METRICS_BIND_ADDR

Scope

  • Controller metrics and Helm observability wiring only.
  • Does not include AppService identity changes, Sandbox runtime changes, QwenPaw runtime, TeamHarness plugin runtime, or broad controller/Helm environment rename.

Validation

  • go test ./internal/metrics ./internal/server ./internal/config ./internal/controller ./internal/app from hiclaw-controller
  • git diff --cached --check

Local helm lint was not run because helm is not installed in this environment.

Change-Id: I246f6cd1cd50474d9d4a1781146d36a02e5e4abc
@shiyiyue1102 shiyiyue1102 requested a review from maplefeng-a July 4, 2026 11:18
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📊 CI Metrics Report

Summary

Metric Current Baseline Change
LLM Calls 157 81 +76 ↑ +93.8%
Input Tokens 3988019 2803871 +1184148 ↑ +42.2%
Output Tokens 37289 16791 +20498 ↑ +122.1%
Total Tokens 4025308 2820662 +1204646 ↑ +42.7%

By Role

Role Metric Current Baseline Change
🧠 Manager LLM Calls 90 68 +22 ↑ +32.4%
Input Tokens 2353484 2502214 -148730 ↓ -5.9%
Output Tokens 17682 13725 +3957 ↑ +28.8%
Total Tokens 2371166 2515939 -144773 ↓ -5.8%
🔧 Workers LLM Calls 67 13 +54 ↑ +415.4%
Input Tokens 1634535 301657 +1332878 ↑ +441.9%
Output Tokens 19607 3066 +16541 ↑ +539.5%
Total Tokens 1654142 304723 +1349419 ↑ +442.8%

Per-Test Breakdown

Test Mgr Calls Wkr Calls Δ Calls Mgr In Wkr In Mgr Out Wkr Out Δ Tokens Trend
02-create-worker 4 0 -8 ↓ -66.7% 103977 0 458 0 -254187 ↓ -70.9% ✅ improved
03-assign-task 16 8 +9 ↑ +60.0% 427983 180786 2168 1786 +139067 ↑ +29.4% ⚠️ regressed
04-human-intervene 12 21 +20 ↑ +153.8% 279757 460123 1449 3053 +311384 ↑ +71.9% ⚠️ regressed
05-heartbeat 10 5 +8 ↑ +114.3% 234176 124781 3109 1199 +88013 ↑ +32.0% ⚠️ regressed
06-multi-worker 48 33 +47 ↑ +138.2% 1307591 868845 10498 13569 +920369 ↑ +71.9% ⚠️ regressed

Trends

1 test(s) improved (fewer LLM calls)
⚠️ 4 test(s) regressed (more LLM calls)


Generated by HiClaw CI on 2026-07-04 11:58:36 UTC


📦 Download debug logs & test artifacts

@shiyiyue1102

Copy link
Copy Markdown
Collaborator Author

@maplefeng-a The checks are passing now; could you help review this when you have time?

@maplefeng-a maplefeng-a left a comment

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.

Looks good to me. I reviewed the controller metrics implementation and the relevant tests; CI is green. Approving.

@shiyiyue1102 shiyiyue1102 merged commit 6b03ab0 into agentscope-ai:main Jul 4, 2026
23 checks passed
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