Python: feat(ag-ui): add emit_messages_snapshot config to suppress terminal snapshot - #7808
Open
Manideep Malyala (manideep-malyala) wants to merge 3 commits into
Open
Python: feat(ag-ui): add emit_messages_snapshot config to suppress terminal snapshot#7808Manideep Malyala (manideep-malyala) wants to merge 3 commits into
Manideep Malyala (manideep-malyala) wants to merge 3 commits into
Conversation
Manideep Malyala (manideep-malyala)
requested review from
chetantoshniwal,
Giles Odigwe (giles17) and
Evan Mattson (moonbox3)
as code owners
August 21, 2026 16:57
Manideep Malyala (manideep-malyala)
deployed
to
github-app-auth
August 21, 2026 16:57 — with
GitHub Actions
Active
Manideep Malyala (manideep-malyala)
deployed
to
github-app-auth
August 21, 2026 16:57 — with
GitHub Actions
Active
Manideep Malyala (manideep-malyala)
deployed
to
github-app-auth
August 21, 2026 16:57 — with
GitHub Actions
Active
Manideep Malyala (manideep-malyala)
deployed
to
github-app-auth
August 21, 2026 16:57 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
Manideep Malyala (manideep-malyala)
August 21, 2026 16:57
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-out for terminal message snapshots while preserving existing behavior by default.
Changes:
- Adds
emit_messages_snapshotconfiguration. - Conditionally suppresses terminal snapshots.
- Adds suppression coverage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
_agent.py |
Defines and propagates the configuration flag. |
_agent_run.py |
Applies the flag before emitting the snapshot. |
test_run.py |
Tests snapshot suppression and normal completion. |
Suppressed comments (1)
python/packages/ag-ui/tests/ag_ui/test_run.py:1853
- Remove the trailing spaces on this blank line; Ruff formatting will reject whitespace-only blank lines.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| events = [event async for event in agent.run(payload)] | ||
|
|
Manideep Malyala (manideep-malyala)
deployed
to
github-app-auth
August 21, 2026 17:01 — with
GitHub Actions
Active
Manideep Malyala (manideep-malyala)
deployed
to
github-app-auth
August 22, 2026 12:39 — with
GitHub Actions
Active
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.
Fixes #7807
Summary
Adds a new
emit_messages_snapshotflag (defaulting toTrue) toAgentConfigin theagent_framework_ag_uipackage.When set to
False, the terminalMessagesSnapshotEventis suppressed at the end of the run. This allows clients usingHistoryProvider(or those managing their own state) to avoid full transcript rewrites on the client side, while maintaining full backward compatibility for existing applications.Changes Made
emit_messages_snapshotboolean toAgentConfigrun_agent_streamlogic to check this config before yielding_build_messages_snapshot(flow, snapshot_messages)test_run_agent_stream_suppresses_messages_snapshot_if_configuredintest_run.pyto verify the suppression behavior.