npm / @ag-ui/client
@ag-ui/client
What changed in @ag-ui/client 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-31.
11 breaking1 deprecations1 new APIs and options2 behavior and defaults
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@ag-ui/client 115 changes
Breaking changes 11
BinaryInputContent is retired from the public API; use image, audio, video, or document media parts with a source.
EventEncoder omits optional protocol fields whose values are null before transmission; producers should emit the canonical absent-field shape.
Validators are no longer re-exported by @ag-ui/client; import them from @ag-ui/core/schemas instead.
The client enforces unknown-material stripping and malformed-value failures on paths with middleware and over protobuf, not only plain SSE.
Repeated singular protobuf message fields are merged, including nested messages, metadata, and run inputs; later scalars win and repeated list entries append.
The client fails a run when reasoning messages or spans are left open at RUN_FINISHED, in addition to rejecting orphaned fragments and reopens.
Unknown keys on RunAgentInput are stripped before transmission; use forwardedProps for extra JSON intended for the agent.
stripUnknown and StripResult are no longer exported from @ag-ui/client because they were enforcement-stage internals.
The five THINKING_* events are retired from the public API; emit REASONING_* instead. Incoming legacy streams are translated by the compatibility boundary.
Events with unrecognized types are dropped with a warning, and unknown properties on known events are stripped with a warning before subscribers see them.
@ag-ui/client takes zod as a peer dependency; install it alongside the client because its enforcement stage validates with zod.
Deprecations 1
AbstractAgent.maxVersion is deprecated in favor of maxProtocolVersion; overrides of the old name still work and warn once per process.
New APIs and options 1
The client declares protocolVersion on every RunAgentInput and reads the producer's version on RUN_STARTED, warning for newer or uninterpretable versions.
Behavior and default changes 2
Pin maxProtocolVersion below the client package version to omit protocolVersion for peers whose parsers reject unknown members.
The client normalizes historically accepted whole optional null fields to absent before validation and warns for each translation.