fix(aws-strands): advertise RAW in the TypeScript capabilities matrix - #2614
Merged
Conversation
`DEFAULT_CAPABILITIES` reported `events.RAW: false` while the run loop's
terminal fallback in `agent.ts` forwards every unmapped Strands stream event
as `{ type: "RAW", event, source: "strands" }`, unconditionally. A client that
read `GET /capabilities` was told the adapter never emits RAW while it does.
Flip the flag to `true`. `capabilitiesFor` needs no derivation for it: the
fallback is not gated on `emitChunkEvents` or any other config, so the static
default is correct in every configuration.
The doc comment above `StrandsAguiCapabilities` used `RAW` as an example of a
family this adapter does not emit. Replace it with `SUBAGENT_*`, which the
adapter genuinely never emits (no reference to it anywhere in `src/`),
alongside the `ACTIVITY_*` example that still holds.
The new test derives the expectation from a real run rather than hardcoding
it: it scripts an unmapped provider event through the adapter, reads whether a
RAW event reached the wire, and asserts the served `/capabilities` document
agrees. A second case pins the same equality for a chunk-mode agent through
`capabilitiesFor`. Both fail against the old flag.
The README carried a caveat telling readers the flag was wrong and not to gate
on it. With the flag correct, that paragraph is deleted and the surrounding
text now flags only `STATE_DELTA` / `stateDelta`, which are accurate as they
stand.
Python has no equivalent drift to fix: `ag_ui_strands/endpoint.py` exposes only
the run endpoint and `add_ping`, with no capabilities endpoint and no
capability matrix to be stale.
Full suite: 1613 tests across 76 files, all passing.
Contributor
Python Preview PackagesVersion
Install with uvAdd the TestPyPI index to your [[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = trueThen install the packages you need: # Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1788422873' --index testpypi
# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1788422873' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1788422873' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1788422873' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1788422873' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1788422873' --index testpypiInstall with pippip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
ag-ui-protocol==0.0.0.dev1788422873
Commit: 2761209 |
@ag-ui/a2a-middleware
@ag-ui/a2ui-middleware
@ag-ui/event-throttle-middleware
@ag-ui/mcp-apps-middleware
@ag-ui/mcp-middleware
@ag-ui/a2a
@ag-ui/adk
@ag-ui/ag2
@ag-ui/agno
@ag-ui/aws-strands
@ag-ui/claude-agent-sdk
@ag-ui/claude-managed-agents
@ag-ui/crewai
@ag-ui/langchain
@ag-ui/langgraph
@ag-ui/llamaindex
@ag-ui/mastra
@ag-ui/pydantic-ai
@ag-ui/vercel-ai-sdk
@ag-ui/watsonx
@ag-ui/a2ui-toolkit
create-ag-ui-app
@ag-ui/client
@ag-ui/core
@ag-ui/encoder
@ag-ui/proto
commit: |
AlemTuzlak
approved these changes
Sep 3, 2026
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.
What
DEFAULT_CAPABILITIESinintegrations/aws-strands/typescript/src/endpoint.tsreportedevents.RAW: false, while the run loop's terminal fallback inagent.tsforwards every unmapped Strands stream event as{ type: "RAW", event, source: "strands" }. A client readingGET /capabilitieswas told the adapter never emits RAW while it does.events.RAWtotrue.capabilitiesForneeds no derivation for this flag. The fallback is not gated onemitChunkEventsor any other config, so the static default is correct in every configuration. A test pins that.StrandsAguiCapabilities, which usedRAWas its example of a family this adapter does not emit.SUBAGENT_*replaces it: nothing undersrc/referencesSUBAGENT_STARTED,SUBAGENT_FINISHEDorSUBAGENT_ERROR. TheACTIVITY_*example still holds.Test
New cases in
src/__tests__/endpoint-capabilities.test.ts, in the spirit ofdocs-contract.test.ts: rather than hardcodingtrue, they script an unmapped provider event (modelRedactionEvent, the same oneraw-fallback.test.tsuses) through the adapter, read off whether a RAW event actually reached the wire, and assert the served/capabilitiesdocument agrees. A second case pins the same equality for a chunk-mode agent throughcapabilitiesFor.Both fail against the old flag (
expected false to be true), and pass after it.pnpm exec vitest runinintegrations/aws-strands/typescript: 1613 tests across 76 files, all passing.tsc --noEmitclean.Python
No equivalent drift.
integrations/aws-strands/python/src/ag_ui_strands/endpoint.pyexposes only the run endpoint andadd_ping— there is no capabilities endpoint and no capability matrix in the package, so nothing there can be stale about RAW. Python does emit RAW (agent.py), it just never advertises anything.Note for whoever merges second
The TypeScript README's capabilities section carried a paragraph documenting
events.RAW: falseas a known-wrong flag and telling readers not to gate on it. That caveat landed in #2611, which is already merged intomain, so this PR deletes it directly rather than leaving it for a follow-up — the surrounding text now flags onlySTATE_DELTA/stateDelta, which remain accurate.If another branch touches that same paragraph, keep this version: the flag it warned about is no longer wrong.