docs: document complete sub-agent event data fields#2072
Open
rinceyuan wants to merge 1 commit into
Open
Conversation
The event table for sub-agent lifecycle events was missing several fields that are available in the typed event interfaces: - subagent.started: add \model?\ - subagent.completed: add \model?\, \durationMs?\, \ otalTokens?\, \ otalToolCalls?\ - subagent.failed: add \model?\, \durationMs?\, \ otalTokens?\, \ otalToolCalls?\ Also update the Node.js code example to demonstrate accessing the performance metrics (duration, tokens, tool calls) from completed/failed events.
Contributor
Author
|
@microsoft-github-policy-service agree company=Microsoft |
Contributor
Author
|
@roji Small docs-only fix — the sub-agent event table was missing performance fields (durationMs, totalTokens, totalToolCalls, model) that are present in the typed interfaces. Useful for embedders building observability dashboards. Quick review appreciated! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Document the complete set of data fields available on sub-agent lifecycle events (subagent.started, subagent.completed, subagent.failed) in the custom agents feature documentation.
The event reference table was missing several fields that are present in the typed interfaces (SubagentStartedData, SubagentCompletedData, SubagentFailedData):
subagent.startedmodel?subagent.completedmodel?,durationMs?,totalTokens?,totalToolCalls?subagent.failedmodel?,durationMs?,totalTokens?,totalToolCalls?These fields are useful for embedders building observability/telemetry around sub-agent performance (e.g., tracking per-agent duration, token efficiency, and tool call patterns).
Also updated the Node.js code example to demonstrate accessing the performance metrics from completed/failed events.
Validation
nodejs/src/generated/session-events.tsinterfaces