Skip to content

feat: implement coherent task history — timeline + artifact ordering (ADR-002) - #2129

Merged
herczyn merged 13 commits into
a2aproject:dev-1.1from
herczyn:feat-coherent-task-history
Sep 22, 2026
Merged

herczyn merged 13 commits into
a2aproject:dev-1.1from
herczyn:feat-coherent-task-history

Conversation

@herczyn

@herczyn herczyn commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Fixes #1991

Summary

Implements the coherent task history model from ADR-002 (#2084, tracking #1991) in the proto (specification/a2a.proto) and the normative spec prose (docs/specification.md), on top of the merged generation field (#1810). Additive and backward compatible, and deliberately introduces no new wire event: the timeline reuses the existing TaskStatusUpdateEvent for delivery.

Elicitations were split out of this PR into #2149 following review feedback, so this change is now scoped to the timeline alone.

Design (why it's non-breaking)

The timeline is a restructuring of the Task snapshot, not a new event on the wire. TimelineEntry is a oneof:

  • Message message — client messages recorded in the task.
  • TaskStatus status — agent status progression (state + the agent's message), delivered by the existing TaskStatusUpdateEvent.

This matters because a new member of the stream event union is not safely ignorable today: a2a-go, a2a-java and a2a-rs all hard-error on an unrecognised event (java's StreamingEventKind is a sealed interface), a2a-python raises on strict ParseDict, and a2a-js / python-gRPC silently drop it. Reusing an existing event avoids that entirely.

TaskStatus.message is retained (not deprecated): the "latest status message" pollution problem is solved by the timeline retaining the full ordered sequence of statuses rather than just the head.

What's included

  1. TimelineEntry { oneof { Message message; TaskStatus status } int64 generation } + repeated TimelineEntry timeline on Task. Widens generation so appending a timeline entry increments it (previously only TaskState transitions and artifact add/update counted, so a progress message that doesn't change state wouldn't advance it).
  2. Artifact interleaving — start_generation / end_generation on Artifact, so artifacts are placed relative to timeline entries without per-chunk events flooding the timeline.
  3. history deprecation — the timeline supersedes it, so Task.history and the three history_length params are soft-deprecated and timeline_length added. Deprecated fields stay populated/honored through v1.x, removed in 2.0.
  4. Spec prose — Task Timeline Semantics (§3.2.8), artifact interleaving, the deprecation, the widened generation mutation set, and a TimelineEntry object section.

Notes for reviewers

  • Fail-open is normative: clients MUST skip a TimelineEntry whose oneof kind they don't recognise (its generation still counts), so future entry kinds are additive.
  • Timeline generations are monotonic but not contiguous — artifact updates also consume generation numbers, so gaps between entries are expected.
  • Live delivery of client-message timeline entries to third-party subscribers is deferred to the bidirectional work (a new method, where both parties are 1.1 by construction).
  • Artifact.role was dropped from this PR and deferred to bidi, per review.

Related: #2084 (ADR-002), #2149 (elicitations), #1810, #1794

@herczyn
herczyn force-pushed the feat-coherent-task-history branch from 31d3e31 to b93e539 Compare August 17, 2026 09:16
Add a generation-ordered TimelineEntry collection to Task. Each entry is a
oneof - an agent TaskStatus (streamed via the existing TaskStatusUpdateEvent,
so no new wire event) or a client Message - and is extensible to more entry
kinds later. Widen the generation definition so appending a timeline entry
increments it.
Add an Elicitation collection and ElicitationState (WAITING/BLOCKED/
RESOLVED) to Task so input-required flows are modeled explicitly, deriving
INPUT_REQUIRED without changing the TaskState enum.
Annotate Artifact with start_generation/end_generation so artifacts
interleave with the timeline without per-chunk events, and add an origin
role to preserve the input/output distinction for client-written
(bidirectional) artifacts.
…002)

Now that the timeline records both agent status entries and client messages,
it supersedes history. Soft-deprecate Task.history and the three
history_length request params, and add timeline_length to
SendMessageConfiguration, GetTaskRequest, and ListTasksRequest. Deprecated
fields stay populated/honored through the v1.x line and are removed in 2.0.
@herczyn
herczyn force-pushed the feat-coherent-task-history branch from e8e8f5f to 45da163 Compare August 17, 2026 10:50
…DR-002)

Add specification prose for the coherent task history model: Task Timeline
Semantics (TimelineEntry oneof of TaskStatus/Message, ordered by generation,
delivered via the existing TaskStatusUpdateEvent so no new event type),
Elicitation Semantics, artifact start/end generation interleaving, the
history/historyLength deprecation in favour of timeline/timelineLength, and
the widened generation mutation set. Add object sections for TimelineEntry,
Elicitation, and ElicitationState.
Put the client Message case first (field 1) and TaskStatus second (field 2)
in the TimelineEntry oneof, in both the proto and the spec prose.
Add a repeated Elicitation delta field to TaskStatusUpdateEvent so
elicitation creations and state changes reach streaming clients without a
new event type, identified and merged by elicitation_id. Document creation
timing, identity/monotonic states, delivery, and tighten generation
semantics so elicitation changes are delivered rather than only reconciled.
Move the elicitation delta from TaskStatusUpdateEvent onto TaskStatus, so it
is delivered via the status update and captured in the timeline (each status
entry records what changed), reconstructing elicitation history without a new
event type or repeating the full set. Keep Task.elicitations as the
authoritative current set. Trim Elicitation to {elicitation_id, state,
metadata}: request_message_id is redundant (co-located with status.message)
and generation is implied by the status the delta appears in.
…ferred elicitation-resolution note (ADR-002)

Clients MUST skip a TimelineEntry whose oneof kind they do not recognise
(its generation still counts, so ordering/gap-detection keep working),
documented in both the proto comment and the timeline semantics. Remove the
out-of-scope note about how a client indicates which elicitation an input
satisfies.
@herczyn
herczyn marked this pull request as ready for review August 17, 2026 13:18
@herczyn
herczyn requested a review from a team as a code owner August 17, 2026 13:18

@vinoo999 vinoo999 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove Role from artifacts and Elicitation altogether. Seeking clarification on Artifact generation firmly tying it to a Task and how generation increments from client side invocations. Curious on alternatives to TimelineEntry of Message and if all we are really missing from History is the idea that it can be repeated Message | Event. Artifact updates are missing from Timeline Entry which may be desirable but will lead to a non-1:1 relation in entry to generation increments.

Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
Comment thread docs/specification.md Resolved
Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
Remove the origin role field from Artifact (defer client-written/bidirectional
artifacts to the bidi work, per review) and tighten the start/end_generation
comments.
…y (ADR-002)

Fix a stale proto comment that listed an Elicitation state change as a
separate generation mutation (it is part of a status update now), and state
explicitly that timeline-entry generation values are monotonic but not
contiguous - Artifact updates also advance generation, so gaps between
entries are expected and artifacts are placed via start/end_generation.
Comment thread docs/specification.md Resolved
Comment thread docs/specification.md Resolved
Comment thread docs/specification.md Resolved
Comment thread specification/a2a.proto Resolved
…e (ADR-002)

State the elicitation -> TaskState mapping explicitly: INPUT_REQUIRED while at
least one elicitation is BLOCKED, with WAITING leaving the state unchanged so
the agent can keep working. Framed as implementation guidance (typically an
SDK default) rather than a protocol requirement, and not conditioned on the
negotiated version. Corrects earlier text that treated WAITING and BLOCKED
alike.
Remove Elicitation, ElicitationState, Task.elicitations and the TaskStatus
elicitation delta, plus their spec sections, so this PR covers only the
coherent timeline. Elicitations move to a follow-up PR where they can be
reviewed on their own merits.
@herczyn

herczyn commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

/vote

@git-vote

git-vote Bot commented Aug 19, 2026

Copy link
Copy Markdown

Vote created

@herczyn has called for a vote on feat: implement coherent task history — timeline, elicitations, artifact ordering (ADR-002) (#2129).

The members of the following teams have binding votes:

Team
@a2aproject/a2a-tsc

Non-binding votes are also appreciated as a sign of support!

How to vote

You can cast your vote by reacting to this comment. The following reactions are supported:

In favor Against Abstain
👍 👎 👀

Please note that voting for multiple options is not allowed and those votes won't be counted.

The vote will be open for 11months 29days 3h 50m 24s. It will pass if at least 51% of the users with binding votes vote In favor 👍. Once it's closed, results will be published here as a new comment.

@herczyn herczyn changed the title feat: implement coherent task history — timeline, elicitations, artifact ordering (ADR-002) feat: implement coherent task history — timeline + artifact ordering (ADR-002) Aug 19, 2026
@git-vote

git-vote Bot commented Aug 20, 2026

Copy link
Copy Markdown

Vote status

So far 0.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
0 0 0 8

Binding votes (0)

User Vote Timestamp
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (2)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00

2 similar comments
@git-vote

git-vote Bot commented Aug 21, 2026

Copy link
Copy Markdown

Vote status

So far 0.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
0 0 0 8

Binding votes (0)

User Vote Timestamp
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (2)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00

@git-vote

git-vote Bot commented Aug 22, 2026

Copy link
Copy Markdown

Vote status

So far 0.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
0 0 0 8

Binding votes (0)

User Vote Timestamp
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (2)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00

@git-vote

git-vote Bot commented Sep 5, 2026

Copy link
Copy Markdown

Vote status

So far 12.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
1 0 0 7

Binding votes (1)

User Vote Timestamp
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (2)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00

@git-vote

git-vote Bot commented Sep 6, 2026

Copy link
Copy Markdown

Vote status

So far 12.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
1 0 0 7

Binding votes (1)

User Vote Timestamp
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (2)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00

@git-vote

git-vote Bot commented Sep 7, 2026

Copy link
Copy Markdown

Vote status

So far 12.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
1 0 0 7

Binding votes (1)

User Vote Timestamp
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 8, 2026

Copy link
Copy Markdown

Vote status

So far 12.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
1 0 0 7

Binding votes (1)

User Vote Timestamp
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 9, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 10, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 11, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

4 similar comments
@git-vote

git-vote Bot commented Sep 12, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 13, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 14, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 15, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@maeste Pending
@muscariello Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 16, 2026

Copy link
Copy Markdown

Vote status

So far 62.50% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
5 0 0 3

Binding votes (5)

User Vote Timestamp
ToddSegal In favor 2026-09-15 22:41:04.0 +00:00:00
darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
maeste In favor 2026-09-15 16:57:39.0 +00:00:00
muscariello In favor 2026-09-15 16:06:13.0 +00:00:00
spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

User Vote Timestamp
vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@git-vote

git-vote Bot commented Sep 16, 2026

Copy link
Copy Markdown

Vote closed

The vote passed! 🎉

62.50% of the users with binding vote were in favor and 0.00% were against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
5 0 0 3

Binding votes (5)

User Vote Timestamp
@ToddSegal In favor 2026-09-15 22:41:04.0 +00:00:00
@darrelmiller In favor 2026-09-08 16:52:39.0 +00:00:00
@maeste In favor 2026-09-15 16:57:39.0 +00:00:00
@muscariello In favor 2026-09-15 16:06:13.0 +00:00:00
@spetschulatSFDC In favor 2026-09-01 17:42:11.0 +00:00:00

Non-binding votes (3)

User Vote Timestamp
@vinoo999 In favor 2026-08-19 11:29:16.0 +00:00:00
@herczyn In favor 2026-08-19 13:15:03.0 +00:00:00
@Tehsmash In favor 2026-09-07 8:35:36.0 +00:00:00

@herczyn
herczyn merged commit db39eb5 into a2aproject:dev-1.1 Sep 22, 2026
13 of 19 checks passed
Tehsmash added a commit to a2aproject/experimental-cpb-slimrpc that referenced this pull request Sep 29, 2026
)

## Summary

Extends the SLIMRPC binding with a layered set of specs and an example for collaborative multi-agent sessions. No new RPC methods are defined — the relay works with `SendStreamingMessage` (A2A 1.0+) for broad compatibility, and upgrades to `SendLiveMessage` bidi streaming (A2A 1.1) when available.

The specs are layered from most-general to most-specific:

```
spec/v1/a2a-shared-task.md            ← base primitive: multi-client single-agent task
spec/v1/a2a-collaborative-task.md     ← multi-agent relay (extends shared-task)
spec/v1/slimrpc-collaborative-task.md ← SLIMRPC profile: capability-driven mode selection
spec/v1/slimrpc-multicast.md          ← SLIMRPC multicast SendLiveMessage (fan-out, no relay)
spec/v1/slimrpc.md                    ← base SLIMRPC binding (point-to-point)
```

---

### `spec/v1/a2a-shared-task.md` — A2A Shared Task extension

Defines the primitive that collaborative-task is built on: a single `Task` on a single agent addressable by multiple clients simultaneously. Key points:

- **No new A2A methods.** Works with `SendMessage` / `SendStreamingMessage` (A2A 1.0+). The A2A SDK already fans all events to all active subscribers on a task.
- **`message-sender` metadata key.** Namespaced under the extension URI in `Message.metadata`; carries the identity of the sender of each message.
- **Extension URI:** `https://a2a-protocol.org/extensions/shared-task/v1`

---

### `spec/v1/a2a-collaborative-task.md` — A2A Collaborative Task extension

Transport-neutral spec for output-to-input relay between N agent tasks. Key design points:

- **All-to-all mesh topology.** No pipeline or star; all participants see all messages.
- **Three relay tiers** (in order of preference):
  - *Native fan-out*: transport delivers peer `StreamResponse` items to all members natively — no relay process. Requires A2A 1.1.
  - *Live relay*: relay uses `SendLiveMessage` (A2A 1.1) — relay holds open send stream per agent.
  - *Basic relay*: relay uses `SendStreamingMessage` + `SendMessage(context_id, return_immediately=True)` injection (A2A 1.0+). Broadest compatibility — works with any A2A agent.
- **`message-sender` attribution** carried in `Message.metadata` under the shared-task extension URI. Application code MUST NOT set or override it; the transport or relay populates it.
- **Session ID rewriting.** Each agent independently assigns its own `contextId` / `taskId`; the relay rewrites both into every translated item before delivery.
- **Extension URI:** `https://a2a-protocol.org/extensions/collaborative-task/v1`

### Peer event translation table

| Peer sends | Translated to | Parts |
| :--- | :--- | :--- |
| Initial `Task` | `StreamRequest { message }` | 1× `Part.data` (`application/vnd.a2a.task+json`) |
| `TaskStatusUpdateEvent` with message | `StreamRequest { message }` | Original parts + appended `Part.data` (`application/vnd.a2a.task-status-update+json`) |
| `TaskStatusUpdateEvent` without message | `StreamRequest { message }` | 1× `Part.data` (`application/vnd.a2a.task-status-update+json`) |
| `TaskArtifactUpdateEvent` | `StreamRequest { artifact_update }` unchanged | — |
| `TaskMessageUpdateEvent` | `StreamRequest { message }` (original parts + appended envelope) | Preserve original `message-sender` |

---

### `spec/v1/slimrpc-collaborative-task.md` — SLIMRPC Collaborative Task profile

Maps the generic spec onto SLIM. Key points:

- **Capability-driven mode selection (§3).** Before initiating a session, the client inspects each agent's Agent Card to determine the transport mode:

  | Participant capabilities | Mode |
  | :--- | :--- |
  | All agents declare SLIMRPC binding + all three collaborative-task extension URIs | **Native** — shared-responses GROUP channel, no relay |
  | Some SLIMRPC-capable, some not | **Hybrid** — shared-responses GROUP for SLIMRPC agents + p2p relay for others |
  | None SLIMRPC-capable | **Full relay** — point-to-point A2A connections only |

- **Activation signal (§4).** `a2a-extensions: https://a2a-protocol.org/bindings/experimental-slimrpc/extensions/collaborative-task/v1` in SLIMRPC call metadata. Applies to both `SendLiveMessage` and `SendStreamingMessage` on SLIM group channels.
- **`message-sender` in `Message.metadata` (§5.1).** Populated from SLIM transport `src` field by the runtime. Application code MUST NOT set it.
- **`slimrpc-context-map` (§5.2).** SLIMRPC session-level call metadata on the initial streaming call; used for session continuation only.
- **MUST NOT declare SLIMRPC collaborative-task URI unless started with shared-responses (§8).** Declaring the URI signals native-mode eligibility; an agent not in shared-responses mode cannot participate correctly.

---

### `spec/v1/slimrpc-multicast.md` — Multicast `SendLiveMessage`

Fan-out `SendLiveMessage` over a SLIM group channel: each agent's `StreamResponse` flows back to the initiating client only; agents are unaware of one another's output. Unchanged from prior version.

---

### `examples/collaborative/incident-response/`

Four-agent incident response example (monitoring → log → diagnostics → remediation). All relay logic lives in `collaborate_transport.py`:

```python
async for slim_name, response in collaborate(client_factory, agent_cards, request_stream):
    ...
```

`collaborate()` inspects Agent Cards and selects the mode automatically:

```python
try:
    client = client_factory.create(agent_cards)      # ValueError → nstreams
    if isinstance(client, MulticastClient) and all_slimrpc_capable:
        # native: shared-responses GROUP channel, no relay
    else:
        # multicast relay: GROUP channel, app relay re-injects peer responses
except ValueError:
    # nstreams: N p2p SRPCTransport instances, app fan-out relay
```

`make_agent_card(shared_responses=False)` conditionally declares the SLIMRPC collaborative-task URI — only when `shared_responses=True` — enforcing the MUST NOT rule from spec §8.

---

### Related

- A2A 1.1 bidi streaming foundations: [a2aproject/A2A#2153](a2aproject/A2A#2153)
- A2A 1.1 coherent task timeline (ADR-002): [a2aproject/A2A#2129](a2aproject/A2A#2129)
- Follow-up — `contextId` correlation for `SendMessage`/`SendStreamingMessage` multicast: [#7](#7)
msampathkumar pushed a commit that referenced this pull request Oct 13, 2026
…tics (#2270)

## Summary

Clarifies that task states are **terminal** or **non-terminal**, and
that the interrupted states `TASK_STATE_INPUT_REQUIRED` and
`TASK_STATE_AUTH_REQUIRED` are **non-terminal**. A non-terminal task
stays under the server's control: the server **MAY** keep processing it
and transition it to any other state — including out of an interrupted
state — without a message from the client, and **MAY** keep accepting
messages directed to it. Entering a non-terminal state does not
necessitate closing a streaming response.

Prose-only. No new types, fields, or enum values, and no wire change.

## Motivation

The interrupted states are already labelled "interrupted" in
`a2a.proto`, and the streaming operations (§3.1.2, §3.1.6) already close
a stream only on a terminal state. But the SSE binding prose (§11.7)
said the stream closes on "a terminal **or interrupted** state", and the
spec never stated plainly what terminal vs. non-terminal means. That
left implementors inferring a stricter, client-driven model than the
protocol requires — e.g. that `INPUT_REQUIRED` ends the turn and closes
the stream.

Nothing in the protocol prevents sending a message to a task in an
interrupted state, or an agent moving a task out of an interrupted state
on its own. The server owns the task lifecycle; sending to a running
task is otherwise underspecified for interop (#1992). This PR states the
rule once, at the `TaskState` level, so bindings have a single thing to
implement against. It also unblocks the input-required discussion and
complements the steering extension (#2125).

## Changes

- `specification/a2a.proto` — `TaskState` enum comment: define terminal
vs. non-terminal/interrupted at the lifecycle level. Per-state comments
unchanged.
- `docs/specification.md` §4.1.3 — matching normative definition under
the enum table. Delivery-agnostic; streaming stays in the streaming
operation.
- `docs/specification.md` §3.1.2 — in the Task lifecycle stream, a
non-terminal/interrupted state SHOULD NOT by itself close the stream
(terminal still MUST).
- `docs/specification.md` §11.7 — drop "or interrupted" from the SSE
close rule; point to §3.1.2.

## Breaking change?

Drafted as SHOULD NOT (not MUST NOT) so no conforming implementation is
invalidated. The only behavioral shift is for servers that close the SSE
stream on an interrupted state today (see Appendix). Opening a vote to
record whether this counts as breaking.

## Non-goals

- Elicitations — deferred to an extension (ADR-002 / #2084).
- Deprecating `TaskStatus.message` — how an agent describes the
requested input is a docs concern, not this change.
- Blocking `SendMessage` / `return_immediately` semantics — unchanged.
- Steering an actively `WORKING` task — separate extension, #2125.

## Appendix: current SDK behavior (server side)

Which SDK server implementations end a streaming response when a task
enters an interrupted state:

| SDK | Closes on `input-required`? | Closes on `auth-required`? | Where
|
|---|---|---|---|
| a2a-python `DefaultRequestHandlerV2` (default) | No | No |
`active_task.py` — `INTERRUPTED_TASK_STATES` kept disjoint from
`TERMINAL_TASK_STATES`; stream handler has no state-based break |
| a2a-python `LegacyRequestHandler` | Yes | No | `event_consumer.py:
consume_all()` — `is_final_event` set includes `INPUT_REQUIRED` (#167) |
| a2a-go | Yes | No | `internal/taskupdate/final.go: IsFinal()` →
`state.Terminal() \|\| state == TaskStateInputRequired` |
| a2a-js | Yes | No | `execution_event_queue.ts: events()` stop set =
`TERMINAL_STATE_LIST \|\| INPUT_REQUIRED_STATE_LIST` (AUTH excluded) |
| a2a-dotnet | Yes | Yes | `TaskUpdater.cs` — `RequireInputAsync()` and
`RequireAuthAsync()` both call `eventQueue.Complete()` |

- `auth-required` is already broadly compliant; only a2a-dotnet closes
on it.
- `input-required` is the divergence: only a2a-python V2 (the default)
keeps the stream open; go, js, python-legacy, and dotnet close.
- Bringing an SDK in line is small and wire-neutral: drop
`input-required` from the stop predicate (`IsFinal` in go, `events()` in
js, `consume_all` in python-legacy), and stop calling `Complete()` in
dotnet's `RequireInputAsync`/`RequireAuthAsync`. SHOULD NOT → MUST NOT
is a candidate for a later minor once these converge.

Related: #2084, #2129, #1992, #2125.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <[email protected]>
herczyn added a commit that referenced this pull request Oct 20, 2026
…#2322)

## Summary

Lets a client write artifacts (including multiple artifacts in one call,
or chunked updates) over both live streams and unary/server-streaming
calls, split out of #2153 so the live channel can be reviewed on its
own.

Because `StreamRequest` in #2153 embeds `SendMessageRequest`, extending
`SendMessageRequest` once enables client-written artifacts across
`SendMessage`, `SendStreamingMessage`, and `SendLiveMessage` alike.

## What's here

1. **`SendMessageRequest.artifact_updates` (`repeated
TaskArtifactUpdateEvent`)** — lets a client send work-item artifacts
alongside a control `message` (for example `"please translate this doc"`
+ the doc when creating a task) or on their own when continuing an
existing task (`task_id` set).
- `message` is required when creating a task (when no `task_id` is
provided, as the agent needs a control message to know what to do with
the artifacts); it may be omitted only when sending `artifact_updates`
to an existing task.
- When `message` and `artifact_updates` are sent together and a `Task`
is created/updated, `message` is appended to `timeline` first, followed
by `artifact_updates` in list order. If the agent responds with a direct
`Message` without creating a `Task`, neither is persisted in a task.

2. **`AgentCapabilities.user_artifacts` (`optional bool`)** — indicates
whether the agent accepts client-written (`ROLE_USER`) artifacts in
`SendMessageRequest.artifact_updates` (otherwise
`UnsupportedOperationError` / `StreamError`).

3. **`generation` ownership** — on each client-sent
`TaskArtifactUpdateEvent`, `generation` is server-owned: clients MUST
leave it unset, servers MUST ignore any value received, and the server
stamps the authoritative value when broadcasting the resulting
`TaskArtifactUpdateEvent` downstream.

4. **`Artifact.role`** — restored so a client-written artifact
(`ROLE_USER`) stays distinguishable from an agent output (`ROLE_AGENT`,
the default). Deferred out of the history ADR (#2129) for this change.

## Verification

`buf breaking` (FILE) clean, api-linter `problems: []`, protolint clean,
markdownlint clean.

Related: #1995, #2153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants