microsoft/agent-host-protocol spec/v0.4.0
microsoft/agent-host-protocol
Captured source
source ↗AHP Spec v0.4.0
Repository: microsoft/agent-host-protocol
Tag: spec/v0.4.0
Published: 2026-06-19T18:25:59Z
Prerelease: no
Release notes:
[0.4.0] — 2026-06-19
Spec version: 0.4.0
Added
MessageOrigin—Message.originis now a named type (was an inline
{ kind } object), and its MessageKind gains Agent and Tool kinds for turns initiated by the agent or a tool rather than the user (e.g. a tool seeding the first message of a worker chat it spawned), so a host no longer has to misrepresent such a message as User or SystemNotification.
ConfigPropertySchema.additionalProperties— optional JSON Schema field
(ConfigPropertySchema) describing the schema for object-typed config properties beyond those listed in properties.
changeset/contentChanged— full-replacement changeset action for sending
batched files, optional operations, and error details on initial snapshots or bulk refreshes.
ChangesetOperationStatus.Disabled— signals that a changeset operation is
currently unavailable and cannot be invoked, so clients can render the control as disabled rather than hiding it.
ChangesetOperation.group— optional identifier for grouping related
changeset operations together in the UI.
_metaslot on the per-turn chat actions (chat/turnStarted,chat/delta,
chat/responsePart, chat/reasoning, chat/usage, chat/turnComplete, chat/turnCancelled, chat/error) — optional provider-specific metadata so agent hosts can carry portable per-event context, such as attributing an event to a specific agent (e.g. a sub-agent acting within the turn). The tool-call actions already exposed _meta; this extends the same convention to the remaining turn-scoped actions.
annotations/updated(AnnotationsUpdatedAction) — a client-dispatchable
action that partially updates an existing annotation's own properties (turnId, resource, range, resolved) without resending its entries. Resolving or re-anchoring an annotation no longer requires replacing the whole annotation via annotations/set. Omitted fields are left unchanged; the annotation's entries, id, and _meta are never touched.
ahp-chat:channel for per-chat conversation state;SessionState.chats[]catalog;SessionState.defaultChat?input-routing hint;ChatOriginprovenance union;createChat/disposeChatcommands.ChatSummary.workingDirectory?— optional per-chat working directory. When absent, chats inherit the session'sworkingDirectory. Enables agent-swarm patterns where multiple chats in one session operate on independent worktrees.ChatInteractivityenum ("full"/"read-only"/"hidden") plus the optionalChatSummary.interactivity/ChatState.interactivityfield describing how the user can interact with a chat, supporting agent-team patterns where worker chats are read-only or hidden. Absent defaults to"full".- Three discrete chat-catalog actions on the session channel —
session/chatAdded(upsert bysummary.resource),session/chatRemoved, andsession/chatUpdated(partial-update withPartial) — mirroring the root-channelroot/sessionAdded/root/sessionRemoved/root/sessionSummaryChangedpattern. session/defaultChatChangedaction — updatesSessionState.defaultChatto steer new input to the designated chat; absent value clears the hint.ErrorInfo._meta?: Record— optional provider-specific metadata bag on error payloads, mirroring the existing_metaconvention onUsageInfoand other protocol types. Clients MAY inspect well-known keys here for richer, localised error UI.RootStatenow carries an optional_metaproperty bag for
implementation-defined metadata about the agent host itself, mirroring the MCP _meta convention. A well-known hostBuild key may carry build information (version, commit, date) about the program hosting the agent host.
Changed
ToolResultSubagentContent.resourceis now specified as the spawned worker
chat URI (ahp-chat:/), not a session URI — a tool-spawned sub-agent is a chat. Its doc now describes the correspondence with the worker chat's ChatOrigin record (kind: 'tool', matching toolCallId), which remains the canonical representation of the spawn relationship.
Snapshot.statenow acceptsResourceWatchState, soinitialize/
reconnect / subscribe can seed an ahp-resource-watch: channel from a point-in-time snapshot. Existing variants (root, session, terminal, changeset, annotations) are unchanged.
fetchTurnsandcompletionsnow target anahp-chat:channel;PROTOCOL_VERSIONbumped to0.4.0.ChatStateis now flat — the previoussummary: ChatSummarysub-object has been replaced by inlinedresource/title/status/activity/modifiedAt/model/agent/origin/workingDirectoryfields.ChatSummaryremains as the standalone catalog entry onSessionState.chats.ChatSummary.modifiedAtandChatState.modifiedAtare now ISO 8601 strings instead of numeric milliseconds.SessionSummarynow documents how its aggregate fields (status,activity,modifiedAt) are derived from the session's chats, includingInputNeeded/Errorpromotion when any chat raises the flag.
Fixed
- Session reducers now apply
_metaupdates from every tool-call-scoped
action, not only session/toolCallStart.
Removed
SessionState.turns,SessionState.activeTurn,SessionState.steeringMessage,SessionState.queuedMessages,SessionState.inputRequests(moved toChatState).session/chatsChangedfull-replacement action (replaced bysession/chatAdded/session/chatRemoved/session/chatUpdated).
Notability
notability 3.0/10Routine spec release from Microsoft.