pypi / ag-ui-protocol
ag-ui-protocol
What changed in ag-ui-protocol 0.0 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
26 breaking1 deprecations14 new APIs and options6 behavior and defaults1 tooling
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initag-ui-protocol 132 changes
Breaking changes 19
Validators move from @ag-ui/core to this subpath; importing them requires zod 3.25.18 or newer, or any 4.x.
Renames AGUIUserContent to AGUIContent and generalizes the string-or-parts union to tool messages and tool-call results. A string still assigns implicitly.
Under .NET AOT, only the source-generated serializer context is available. Serializing tool results whose runtime types are unregistered throws NotSupportedException; int is registered in 1.0.
BinaryInputContent is no longer a valid content part; messages carrying one are rejected during RunAgentInput validation. Use media parts instead.
.NET MaxIterations and MaxExecutionTime change from int? to long?.
.NET AgentCapabilities.Custom and IdentityCapabilities.Metadata now use JsonElement? instead of IDictionary<string, object?>?; construct values with JsonSerializer.SerializeToElement(...).
MetadataMixin is no longer exported; custom models that used it should inherit ConfiguredBaseModel and declare metadata.
Whole optional fields without values must be omitted rather than serialized as null. The TypeScript client normalizes a fixed set of legacy nulls before validation and warns.
Repeated occurrences of singular protobuf message fields are merged, including nested messages, metadata, and run inputs; later scalars win and lists append.
A producer must declare its protocol version on RUN_STARTED. TypeScript also adds protocolVersion to RunAgentInput; forwarders must preserve the producer's declaration.
The client fails runs for reasoning spans or messages left open at RUN_FINISHED, in addition to rejecting orphaned fragments and reopens.
.NET Tool.Parameters and RunAgentInput.ForwardedProperties become nullable JsonElement? values; ForwardedProperties retains the forwardedProps wire key.
tools and context become non-optional on the TypeScript type. When absent on the wire, the SDK presents them as empty arrays.
In Python, fields with schema defaults parse to None when absent rather than materializing the default.
Patch entries are typed operation models rather than dictionaries; read fields with attributes or convert models using model_dump(by_alias=True).
stripUnknown and StripResult are no longer exported from @ag-ui/client.
SubAgentInfo is renamed to SubagentInfo; the old class name remains exported as an alias for one release.
Capability declarations use subagents instead of subAgents or sub_agents; the wire key changes and old keys are not aliases.
The five event types are retired from the public TypeScript and Python APIs. Emit REASONING_* instead; the TypeScript client translates legacy incoming streams.
Deprecations 1
Replaces AbstractAgent.maxVersion. The old override still works but warns once per process; pinning this value below the client version omits protocolVersion from RunAgentInput.
New APIs and options 6
InputContent is renamed to ContentPart; the old name remains exported from ag_ui.core as an alias.
Every content part gains an optional id; TextPart also gains optional metadata.
Adds a file source for a handle issued by a model provider for already-uploaded bytes. It is not a URL; agents unable to pass it to their provider should skip the part with a warning.
metadata is the sanctioned channel for extra event and message data; it is open by key and is never stripped by client enforcement.
SDK constant for declaring the producer's protocol version on RUN_STARTED; use it instead of a hand-typed string.
.NET adds models, JSON handling, and protobuf mappers for SUBAGENT_STARTED, SUBAGENT_FINISHED, and SUBAGENT_ERROR.
Behavior and default changes 5
Execution iteration and time limits validate as non-negative integers within JavaScript's safe range; Python rejects negative values.
Tool message and tool-call result content can now be a string or content parts. Narrow before using as a string; contentToText() and contentHasMedia() are available in TypeScript.
.NET stream readers now skip unknown event types with a trace warning instead of ending the stream. Decoding a single unknown event still throws AGUIUnknownEventTypeException.
The TypeScript client drops unrecognized event types with a warning; unknown properties on known events and RunAgentInput are stripped with a warning.
zod becomes an optional peer dependency for @ag-ui/core validators and a peer dependency to install alongside @ag-ui/client, @ag-ui/encoder, and @ag-ui/proto.
Tooling 1
Python generated models default single-value literals such as type and fixed role to their only legal value.
ag-ui-protocol 0.016 changes
Breaking changes 7
Negative max_execution_time values are rejected.
Negative max_iterations values are rejected.
The field is renamed from sub_agents to subagents, and the wire key is subagents; the old field and wire key are not retained.
A 1.0 producer must declare its protocol version on RUN_STARTED; Python producers pass PROTOCOL_VERSION when constructing the event.
Python producers must emit REASONING_* events; there is no producer-side compatibility shim for the retired THINKING_* events.
Tool call result content can now be a string or a list of ContentPart values; code that assumes a string must narrow it first.
Tool message content can now be a string or a list of ContentPart values; code that assumes a string must narrow it first.
New APIs and options 8
Content parts gain an optional id field.
InputContentDataSource is renamed to DataSource; the old name remains exported as an alias.
PartSource gains a FileSource variant for a provider-issued handle to bytes already uploaded; consumers must not treat its value as a URL.
ImageInputContent is renamed to ImagePart; the same naming change applies to audio, video, and document parts, and old names remain aliases.
InputContentSource is renamed to PartSource; the old name remains exported as an alias, and PartSource also gains a FileSource arm.
TextInputContent is renamed to TextPart; the old name remains exported from ag_ui.core as an alias.
TextPart gains optional metadata, matching the media parts.
InputContentUrlSource is renamed to UrlSource; the old name remains exported as an alias.
Behavior and default changes 1
Fields with no value are omitted from JSON instead of written as null; readers checking for absent fields must test whether the key exists.