unstale

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 init

@unstale/cli on npm

ag-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.

    1.0.0upgrade guide

  • Renames AGUIUserContent to AGUIContent and generalizes the string-or-parts union to tool messages and tool-call results. A string still assigns implicitly.

    1.0.0upgrade guide

  • 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.

    1.0.0upgrade guide

  • BinaryInputContent is no longer a valid content part; messages carrying one are rejected during RunAgentInput validation. Use media parts instead.

    0.0.0, 1.0.0upgrade guideupgrade guide

  • .NET MaxIterations and MaxExecutionTime change from int? to long?.

    1.0.0upgrade guide

  • .NET AgentCapabilities.Custom and IdentityCapabilities.Metadata now use JsonElement? instead of IDictionary<string, object?>?; construct values with JsonSerializer.SerializeToElement(...).

    1.0.0upgrade guide

  • MetadataMixin is no longer exported; custom models that used it should inherit ConfiguredBaseModel and declare metadata.

    0.0.0, 1.0.0upgrade guideupgrade guide

  • 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.

    1.0.0upgrade guide

  • Repeated occurrences of singular protobuf message fields are merged, including nested messages, metadata, and run inputs; later scalars win and lists append.

    1.0.0upgrade guide

  • A producer must declare its protocol version on RUN_STARTED. TypeScript also adds protocolVersion to RunAgentInput; forwarders must preserve the producer's declaration.

    1.0.0upgrade guide

  • The client fails runs for reasoning spans or messages left open at RUN_FINISHED, in addition to rejecting orphaned fragments and reopens.

    1.0.0upgrade guide

  • .NET Tool.Parameters and RunAgentInput.ForwardedProperties become nullable JsonElement? values; ForwardedProperties retains the forwardedProps wire key.

    1.0.0upgrade guide

  • tools and context become non-optional on the TypeScript type. When absent on the wire, the SDK presents them as empty arrays.

    1.0.0upgrade guide

  • In Python, fields with schema defaults parse to None when absent rather than materializing the default.

    1.0.0upgrade guide

  • Patch entries are typed operation models rather than dictionaries; read fields with attributes or convert models using model_dump(by_alias=True).

    0.0.0, 1.0.0upgrade guideupgrade guide

  • stripUnknown and StripResult are no longer exported from @ag-ui/client.

    1.0.0upgrade guide

  • SubAgentInfo is renamed to SubagentInfo; the old class name remains exported as an alias for one release.

    0.0.0, 1.0.0upgrade guideupgrade guide

  • Capability declarations use subagents instead of subAgents or sub_agents; the wire key changes and old keys are not aliases.

    1.0.0upgrade guide

  • The five event types are retired from the public TypeScript and Python APIs. Emit REASONING_* instead; the TypeScript client translates legacy incoming streams.

    1.0.0upgrade guide

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.

    1.0.0upgrade guide

New APIs and options 6

  • InputContent is renamed to ContentPart; the old name remains exported from ag_ui.core as an alias.

    0.0.0, 1.0.0upgrade guideupgrade guide

  • Every content part gains an optional id; TextPart also gains optional metadata.

    1.0.0upgrade guide

  • 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.

    1.0.0upgrade guide

  • metadata is the sanctioned channel for extra event and message data; it is open by key and is never stripped by client enforcement.

    1.0.0upgrade guide

  • SDK constant for declaring the producer's protocol version on RUN_STARTED; use it instead of a hand-typed string.

    1.0.0upgrade guide

  • .NET adds models, JSON handling, and protobuf mappers for SUBAGENT_STARTED, SUBAGENT_FINISHED, and SUBAGENT_ERROR.

    1.0.0upgrade guide

Behavior and default changes 5

  • Execution iteration and time limits validate as non-negative integers within JavaScript's safe range; Python rejects negative values.

    1.0.0upgrade guide

  • 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.

    1.0.0upgrade guide

  • .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.

    1.0.0upgrade guide

  • The TypeScript client drops unrecognized event types with a warning; unknown properties on known events and RunAgentInput are stripped with a warning.

    1.0.0upgrade guide

  • 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.

    1.0.0upgrade guide

Tooling 1

  • Python generated models default single-value literals such as type and fixed role to their only legal value.

    1.0.0upgrade guide

ag-ui-protocol 0.016 changes

Breaking changes 7

  • Negative max_execution_time values are rejected.

    0.0.0upgrade guide

  • Negative max_iterations values are rejected.

    0.0.0upgrade guide

  • The field is renamed from sub_agents to subagents, and the wire key is subagents; the old field and wire key are not retained.

    0.0.0upgrade guide

  • A 1.0 producer must declare its protocol version on RUN_STARTED; Python producers pass PROTOCOL_VERSION when constructing the event.

    0.0.0upgrade guide

  • Python producers must emit REASONING_* events; there is no producer-side compatibility shim for the retired THINKING_* events.

    0.0.0upgrade guide

  • Tool call result content can now be a string or a list of ContentPart values; code that assumes a string must narrow it first.

    0.0.0upgrade guide

  • Tool message content can now be a string or a list of ContentPart values; code that assumes a string must narrow it first.

    0.0.0upgrade guide

New APIs and options 8

  • Content parts gain an optional id field.

    0.0.0upgrade guide

  • InputContentDataSource is renamed to DataSource; the old name remains exported as an alias.

    0.0.0upgrade guide

  • PartSource gains a FileSource variant for a provider-issued handle to bytes already uploaded; consumers must not treat its value as a URL.

    0.0.0upgrade guide

  • ImageInputContent is renamed to ImagePart; the same naming change applies to audio, video, and document parts, and old names remain aliases.

    0.0.0upgrade guide

  • InputContentSource is renamed to PartSource; the old name remains exported as an alias, and PartSource also gains a FileSource arm.

    0.0.0upgrade guide

  • TextInputContent is renamed to TextPart; the old name remains exported from ag_ui.core as an alias.

    0.0.0upgrade guide

  • TextPart gains optional metadata, matching the media parts.

    0.0.0upgrade guide

  • InputContentUrlSource is renamed to UrlSource; the old name remains exported as an alias.

    0.0.0upgrade guide

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.

    0.0.0upgrade guide