Skip to content

feat(agentx): aggregate full-response ITL and interactivity - #2504

Open
cquil11 wants to merge 5 commits into
mainfrom
agent/full-response-agentx-tps
Open

feat(agentx): aggregate full-response ITL and interactivity#2504
cquil11 wants to merge 5 commits into
mainfrom
agent/full-response-agentx-tps

Conversation

@cquil11

@cquil11 cquil11 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • pin the AIPerf submodule to agentx-v1.0.2 at the merged full-response implementation
  • aggregate full_response_inter_token_latency from AgentX per-request profile records
  • expose latency statistics at request_metrics.latency.full_response_itl
  • derive matching slow-tail interactivity at request_metrics.latency.full_response_intvty

Why

AgentX can receive a server-reported raw token count even when a structured-output parser stops emitting visible content before generation completes. The existing ITL then mixes the raw token count with a shorter parsed-content interval.

The full-response ITL uses the client-observed interval through HTTP response completion. InferenceX derives each interactivity statistic as the reciprocal of its matching ITL statistic, consistent with the existing itl and intvty fields. For example, full-response p75 interactivity is 1 / p75(full-response ITL), preserving slow-tail percentile semantics.

Validation

  • PYTHONPATH=. uv run pytest -q utils/agentic/aggregation: 43 passed
  • Python compile check: passed
  • git diff --check: passed
  • B300 Kimi AgentX sweep: running

Dependencies and merge order

  1. feat: add full-response ITL and output throughput aiperf#36 (merged and tagged agentx-v1.0.2)
  2. This PR
  3. fix(agentx): use full-response interactivity InferenceX-app#677

Signed-off-by: Cam Quilici <cjquilici@gmail.com>
@cquil11
cquil11 requested a review from a team August 5, 2026 18:30

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Beyond the inline finding, I checked two other candidate issues in the new aggregation and ruled both out: stats dropping when request start/end ns metadata is missing, and degenerate zero/non-positive values not being filtered — neither holds up against the actual aggregation logic.

Extended reasoning...

Two additional candidate issues around the new full_response_output_token_throughput_per_user aggregation were examined this run and ruled out: (1) concern that records missing request_start_ns/request_end_ns metadata would silently drop the new stat — this is not the case, extract_per_record_floats/stats_for operate independently of the start/end-ns filtering used for duration, so the new metric's per-record extraction is unaffected by that gate; (2) concern that degenerate zero/non-positive full_response_output_token_throughput_per_user values would skew mean/percentiles unfiltered — to_float only excludes None/non-numeric values, but this mirrors how input_tokens/output_tokens and other existing throughput stats in this same file are handled (no zero-filtering there either), so this is consistent with existing conventions rather than a new defect.

Comment thread utils/agentic/aggregation/request_metrics.py
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
@cquil11 cquil11 changed the title feat(agentx): aggregate full-response output TPS feat(agentx): aggregate full-response ITL and interactivity Aug 5, 2026
@cquil11 cquil11 added agentx-fast Run AgentX throughput with 1 warmup request per lane and a 20-minute profile; not reusable full-sweep-enabled labels Aug 5, 2026
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
@cquil11
cquil11 force-pushed the agent/full-response-agentx-tps branch from d368c20 to 1985ac7 Compare August 5, 2026 20:40
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentx-fast Run AgentX throughput with 1 warmup request per lane and a 20-minute profile; not reusable full-sweep-enabled

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant