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
{{ message }}
Repository navigation
[DOCS] AG-UI RUN_FINISHED result now carries session stats #672
CLI PR inference-gateway/cli#1187 (resolves inference-gateway/cli#1186) makes the AG-UI headless output carry the per-session totals in the terminal RUN_FINISHED event. result now includes inputTokens, outputTokens, cacheReadTokens, totalToolCalls, cost, lastInputTokens, and contextWindow. The event has no result when the run made no model request, and contextWindow is omitted when the model's window is unknown.
The CLI's own docs/ag-ui-output.md was updated in that PR with the exact key names. This issue tracks mirroring that in the user-facing documentation wherever headless output formats are documented.
Acceptance Criteria
The headless output format documentation mentions the RUN_FINISHEDresult keys exactly as the CLI emits them
AG-UI consumers (desktop sidecar) are pointed at lastInputTokens / contextWindow / cost for context-percentage and cost indicators
Read CLI docs/ag-ui-output.md for exact result key names
Document RUN_FINISHEDresult keys in cli.md
Point AG-UI consumers (desktop sidecar) at lastInputTokens / contextWindow / cost
Validate: lint:md, format:check, build (all pass)
Commit + open PR
What changed
cli.md gains an AG-UI RUN_FINISHED result subsection under the headless session-stats docs:
Example RUN_FINISHED event plus a key table with inputTokens, outputTokens, cacheReadTokens, totalToolCalls, cost, lastInputTokens, contextWindow - exactly as the CLI emits them.
Notes result is absent when the run made no model request, and contextWindow is omitted when the model's window is unknown.
Consumer guidance: context percentage comes from lastInputTokens / contextWindow (not inputTokens, which is a session-wide sum and overshoots), hide it when contextWindow is absent; cost indicator reads cost directly.
Cross-link from the --format ag-ui bullet in the format list.
Plain hyphens only in the added text. One page touched, no new docs page - the existing headless output section is where consumers already look.
Activity
edenreich commentedon Sep 12, 2026
@claude Can you work on this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Sep 12, 2026
Claude finished @edenreich's task in 1m 56s —— View job •
docs/issue-672-20260912-1704• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-672-20260912-1704?quick_pull=1&title=Issue%20%23672%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23672%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Done
docs/ag-ui-output.mdfor exactresultkey namesRUN_FINISHEDresultkeys incli.mdlastInputTokens/contextWindow/costlint:md,format:check,build(all pass)What changed
cli.mdgains anAG-UI RUN_FINISHED resultsubsection under the headless session-stats docs:RUN_FINISHEDevent plus a key table withinputTokens,outputTokens,cacheReadTokens,totalToolCalls,cost,lastInputTokens,contextWindow- exactly as the CLI emits them.resultis absent when the run made no model request, andcontextWindowis omitted when the model's window is unknown.lastInputTokens / contextWindow(notinputTokens, which is a session-wide sum and overshoots), hide it whencontextWindowis absent; cost indicator readscostdirectly.--format ag-uibullet in the format list.Plain hyphens only in the added text. One page touched, no new docs page - the existing headless output section is where consumers already look.
PR: #674
| Branch
inference-gateway-releaser commentedon Sep 22, 2026
🎉 This issue has been resolved in version 0.9.14 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀