Repository navigation
feat: allow clients to write artifacts via SendMessageRequest (#1995) - #2322
Conversation
76b3893 to
2b55dfa
Compare
2b55dfa to
d33b268
Compare
e579a36 to
3641711
Compare
|
/vote |
Vote created@herczyn has called for a vote on The members of the following teams have binding votes:
Non-binding votes are also appreciated as a sign of support! How to voteYou can cast your vote by reacting to
Please note that voting for multiple options is not allowed and those votes won't be counted. The vote will be open for |
Vote statusIn favor: Summary
Binding votes (0)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Vote statusIn favor: Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Vote statusIn favor: Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
4 similar comments
Vote statusIn favor: Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Vote statusIn favor: Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Vote statusIn favor: Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Vote statusIn favor: Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
vinoo999
left a comment
There was a problem hiding this comment.
This is largely additive and aims to make the protocol more symmetric.
Few questions in comments + couple here:
- Are user Artifacts persisted on Task?
- How does type negotiation work for content on Tasks? input_mode/output_mode doesn't seem to fit here properly
|
|
||
| For detailed security guidance on extended agent cards, see [Section 13.3 Extended Agent Card Access Control](#133-extended-agent-card-access-control). | ||
|
|
||
| #### 3.1.12. Send Live Message |
There was a problem hiding this comment.
nit: since this is covered in #2153 can we separate to what this covers alone? unless there is a joint bidi branch you want to merge into
| // an existing task. Requires `AgentCard.capabilities.user_artifacts` to be | ||
| // `true`. The `generation` field on each update is owned by the server: | ||
| // clients MUST leave it unset and servers MUST ignore any value sent. | ||
| repeated TaskArtifactUpdateEvent artifact_updates = 5; |
There was a problem hiding this comment.
this part is a bit incongruous; it introduces streaming operation on a non-streaming api operation. I think it is necessary as you cannot send a Task but there is some inconsistency here
There was a problem hiding this comment.
why streaming? you could send user artifacts in non-streaming scenarios as well. streaming is just a connection type, you should be able to achieve the same result without streaming if you want to
There was a problem hiding this comment.
I agree. The client side operation is 'simulating' streaming here though where as for Message it is a concrete data object.
There was a problem hiding this comment.
I think you can use the TaskArtifactUpdateEvent to "simulate" streaming, e.g. you can send partial chunks of a file or a stream of text.
But equally I think you can use this to work on a long document for example, generating a page at a time, I wouldn't necessarily count this as "streaming" but just being able to upload "more" and attribute it to the same artifact.
Having it on SendMessage is kind of the equivalent of push notifications but for the client side.
At AgntCon there was a use case raised for an Agent generating an image being able to share the partially generated whole image then update those results as they go. I was reading through the spec and we need to clear up the append / replace for this to work.
I also see a scenario where both agents co-work on the same artifact like a shared document. Currently the Agent could start it, then the client append to it, then the Agent refine it etc. It could be nice to expose operations beyond append/replace for artifacts like a diff or patch style operation in the future for this to work better.
There was a problem hiding this comment.
Yeah I think the other area where I want to draw boundaries between protocol and transport is what it means when you do have file or byte operations that are supported on a transport but are out of band of the json or proto definition in the A2A operations
## Summary Adds `SendLiveMessage`, a single operation for bidirectional interaction (#1995). Fully additive. Client-written artifacts were **split into #2322** so this PR is just the live channel. ## What's here **One operation, three uses.** `SendLiveMessage` serves a long-lived duplex session, a brief connect-send-disconnect exchange, and attaching to a task purely to observe it. **Reuses existing request types — no new wrapper messages.** `StreamRequest.payload` is a `oneof` of: - `SubscribeToTaskRequest subscribe = 3` (extended with `optional int64 last_seen_generation = 3`) — attaches to an existing task without sending input. - `SendMessageRequest send_message = 2` — sends a message with optional `SendMessageConfiguration` and `metadata`, identical to unary `SendMessage`. **Opening semantics.** The first request binds the stream to one task: - `subscribe` **with** `lastSeenGeneration`: no `Task` snapshot, replay only what followed it (falls back to a snapshot if the server no longer retains that point). - `subscribe` **without** `lastSeenGeneration`: opens with a `Task` snapshot. - Open with `sendMessage`: the message is appended first, so the opening snapshot **already reflects** it. - `subscribe` is only valid as the opening request; later it's rejected with a `StreamError`. **Transport parity.** Native-duplex transports (gRPC, WebSocket) use one connection. HTTP invokes the operation as a server stream for the downlink and sends further input as separate short-lived calls. A non-downlink call returns only an acknowledgement and never replays events, so a client holding both never sees an event twice. **`StreamError`.** Rejects a single bad request without tearing down the stream. **Forward compatibility.** New payload kinds on `StreamRequest`/`StreamResponse` are specified as non-breaking: clients MUST skip response payloads they don't recognise; servers MUST reject unknown request payloads with a `StreamError` rather than closing the stream. **`TaskMessageUpdateEvent`** delivers client-originated timeline entries, emitted only to clients negotiating `A2A-Version: 1.1`+. **`TaskPushNotificationConfig.protocolVersion`** — defaults to the version of the creating request; unset means 1.0. ## Verification `buf breaking` (FILE) clean, api-linter `problems: []`, protolint clean, markdownlint clean. Follow-up: #2322 (client-written artifacts + `Artifact.role`). Related: #1995, #1992, #1991
…ject#1995) Add repeated TaskArtifactUpdateEvent artifact_updates = 5 to SendMessageRequest so a client can send work-item artifacts alongside a control message (including when creating a task) or on their own when continuing an existing task, over SendMessage, SendStreamingMessage, and SendLiveMessage alike. Add AgentCapabilities.user_artifacts so clients know whether the agent accepts ROLE_USER artifacts, and add Artifact.role so client-written artifacts stay distinguishable from agent outputs (ROLE_AGENT).
3641711 to
16712f7
Compare
Vote statusIn favor: Summary
Binding votes (3)
|
| User | Vote | Timestamp |
|---|---|---|
| Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Vote closedThe vote passed! 🎉 In favor: Summary
Binding votes (6)
|
| User | Vote | Timestamp |
|---|---|---|
| @Tehsmash | In favor | 2026-10-12 12:12:11.0 +00:00:00 |
Follow-up adjustments to SendLiveMessage (a2aproject#2153) and client-written artifacts (a2aproject#2322) on dev-1.1: 1. Treat SubscribeToTaskRequest.last_seen_generation as a hint: servers may either replay subsequent events without an opening Task snapshot, or open with the current Task snapshot and stream onward. 2. Rename StreamRequest.send_message to StreamRequest.request, as SendMessageRequest may carry artifact_updates without a message. 3. Explicitly state that StreamError is a stream-local transport rejection: never appended to Task.timeline, never increments Task.generation, and never broadcast to other subscribers or webhooks. 4. Define (artifact_id, role) as the per-task artifact primary key, with servers enforcing ROLE_USER on client writes and ROLE_AGENT on agent outputs (and consumers treating ROLE_UNSPECIFIED as ROLE_AGENT). Signed-off-by: Kuba Herczynski <[email protected]>
## Summary Follow-up refinements to `SendLiveMessage` (#2153) and client-written artifacts (#2322) on `dev-1.1`: 1. **Escape hatch for `last_seen_generation`** (`SubscribeToTaskRequest`, §3.1.6, §3.1.12) — treats `lastSeenGeneration` as a hint rather than requiring event replay. When set, the server MAY replay subsequent events without an opening `Task` snapshot, OR ignore the hint, open with the current `Task` snapshot, and stream onward from there (allowing stores that only persist the projected `Task` to work without an event log). 2. **Rename `StreamRequest.send_message` → `StreamRequest.request`** (`StreamRequest` field 2, §3.1.12, §3.2.1) — `SendMessageRequest` can carry `artifact_updates` without a `message` when continuing an existing task, so `request` reflects the broader payload. 3. **`StreamError` explicitly off the timeline** (`StreamError`, §3.1.12, §3.2.7) — clarifies that `StreamError` is a transport-level rejection on that stream: it does not mutate task state, is never recorded in `Task.timeline`, never advances `Task.generation`, and is never broadcast to other subscribers or push notification webhooks. 4. **Artifact primary key = `(artifact_id, role)`** (`Artifact`, `TaskArtifactUpdateEvent`, §3.2.1) — defines `(artifact_id, role)` as the per-task unique key for `Task.artifacts`, `append: true` chunk matching, and `append: false` replacement, with servers enforcing/normalising `role` by origin (`ROLE_USER` on client writes, rejecting `ROLE_AGENT`; `ROLE_AGENT` on agent outputs, with `ROLE_UNSPECIFIED` treated as `ROLE_AGENT`). ## Verification - `buf breaking` against `main` clean - `protolint` clean - `api-linter` `problems: []` - `markdownlint` clean Related: #1995, #2153, #2322 --------- Signed-off-by: Kuba Herczynski <[email protected]>
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
StreamRequestin #2153 embedsSendMessageRequest, extendingSendMessageRequestonce enables client-written artifacts acrossSendMessage,SendStreamingMessage, andSendLiveMessagealike.What's here
SendMessageRequest.artifact_updates(repeated TaskArtifactUpdateEvent) — lets a client send work-item artifacts alongside a controlmessage(for example"please translate this doc"+ the doc when creating a task) or on their own when continuing an existing task (task_idset).messageis required when creating a task (when notask_idis provided, as the agent needs a control message to know what to do with the artifacts); it may be omitted only when sendingartifact_updatesto an existing task.messageandartifact_updatesare sent together and aTaskis created/updated,messageis appended totimelinefirst, followed byartifact_updatesin list order. If the agent responds with a directMessagewithout creating aTask, neither is persisted in a task.AgentCapabilities.user_artifacts(optional bool) — indicates whether the agent accepts client-written (ROLE_USER) artifacts inSendMessageRequest.artifact_updates(otherwiseUnsupportedOperationError/StreamError).generationownership — on each client-sentTaskArtifactUpdateEvent,generationis server-owned: clients MUST leave it unset, servers MUST ignore any value received, and the server stamps the authoritative value when broadcasting the resultingTaskArtifactUpdateEventdownstream.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 (feat: implement coherent task history — timeline + artifact ordering (ADR-002) #2129) for this change.Verification
buf breaking(FILE) clean, api-linterproblems: [], protolint clean, markdownlint clean.Related: #1995, #2153