Skip to content

docs: document sub-agent event attribution#1878

Open
loganrosen wants to merge 6 commits into
github:mainfrom
loganrosen:loganrosen-improve-sdk-docs
Open

docs: document sub-agent event attribution#1878
loganrosen wants to merge 6 commits into
github:mainfrom
loganrosen:loganrosen-improve-sdk-docs

Conversation

@loganrosen

@loganrosen loganrosen commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document envelope-level agentId in the streaming events guide
  • Add parent-agent-only rendering guidance for sub-agent event streams
  • Mark payload-level parentToolCallId as deprecated for sub-agent attribution
  • Note shared sub-agent event streams in custom agents docs

Validation

  • just validate-docs-ts
  • Syntax-checked changed streaming-events.md Python snippets with python3 -m py_compile
  • Documentation validation is passing in CI
Document envelope-level agentId in streaming events and clarify parent-agent rendering guidance. Mark parentToolCallId as deprecated for sub-agent attribution.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 20:02
@loganrosen loganrosen requested a review from a team as a code owner July 1, 2026 20:02

Copilot AI 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.

Pull request overview

Updates the documentation to clarify how sub-agent attribution works in streamed session events, centering on the envelope-level agentId and guidance for rendering only the parent agent’s chat output while routing sub-agent activity elsewhere.

Changes:

  • Documented envelope-level agentId in the streaming event envelope and added renderer guidance to ignore sub-agent assistant events in the main chat UI.
  • Marked payload-level parentToolCallId as deprecated for sub-agent attribution across relevant event payload tables.
  • Noted in custom agents docs that sub-agent events share the parent session stream and can be separated via the envelope.
Show a summary per file
File Description
docs/features/streaming-events.md Adds agentId to the event envelope docs, introduces “render only the parent agent” guidance, and deprecates parentToolCallId for attribution.
docs/features/custom-agents.md Adds a clarification that sub-agent events share the parent stream and can be separated using envelope-level agentId.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Low
Comment thread docs/features/streaming-events.md Outdated
loganrosen and others added 5 commits July 1, 2026 16:05
Add a hidden validation-only Python block for the parent-agent streaming example so docs validation has a typed session placeholder while keeping the visible snippet concise.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a typed CopilotSession helper in the hidden validation snippet instead of typing the session as Any.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the docs pipeline's supported TypeScript summary label for the new streaming-events tabbed example.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the quick-reference table note focused on payload fields rather than repeating sub-agent attribution guidance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use a single visible Python snippet for parent-response filtering instead of a hidden validation block plus duplicate visible example.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants