Skip to content

feat: allow clients to write artifacts via SendMessageRequest (#1995) - #2322

Merged
herczyn merged 1 commit into
a2aproject:dev-1.1from
herczyn:feat-bidi-artifacts
Oct 20, 2026
Merged

herczyn merged 1 commit into
a2aproject:dev-1.1from
herczyn:feat-bidi-artifacts

Conversation

@herczyn

@herczyn herczyn commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

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 (feat: implement coherent task history — timeline + artifact ordering (ADR-002) #2129) for this change.

Verification

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

Related: #1995, #2153

@herczyn
herczyn force-pushed the feat-bidi-artifacts branch from 76b3893 to 2b55dfa Compare October 7, 2026 12:04
@herczyn herczyn changed the title feat: allow clients to write artifacts over a live stream (#1995) feat: allow clients to write artifacts over live and unary operations (#1995) Oct 7, 2026
@herczyn
herczyn force-pushed the feat-bidi-artifacts branch from 2b55dfa to d33b268 Compare October 7, 2026 12:13
@herczyn herczyn changed the title feat: allow clients to write artifacts over live and unary operations (#1995) feat: allow clients to write artifacts via SendMessageRequest (#1995) Oct 7, 2026
@herczyn
herczyn marked this pull request as ready for review October 9, 2026 06:21
@herczyn
herczyn requested a review from a team as a code owner October 9, 2026 06:21
@herczyn
herczyn force-pushed the feat-bidi-artifacts branch 2 times, most recently from e579a36 to 3641711 Compare October 9, 2026 08:26
@herczyn

herczyn commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

/vote

@git-vote

git-vote Bot commented Oct 12, 2026

Copy link
Copy Markdown

Vote created

@herczyn has called for a vote on feat: allow clients to write artifacts via SendMessageRequest (#1995) (#2322).

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.

@git-vote

git-vote Bot commented Oct 13, 2026

Copy link
Copy Markdown

Vote status

In favor: 0.00% · Against: 0.00% · 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 (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

@git-vote

git-vote Bot commented Oct 14, 2026

Copy link
Copy Markdown

Vote status

In favor: 25.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@maeste Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

@git-vote

git-vote Bot commented Oct 15, 2026

Copy link
Copy Markdown

Vote status

In favor: 25.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@maeste Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

4 similar comments
@git-vote

git-vote Bot commented Oct 16, 2026

Copy link
Copy Markdown

Vote status

In favor: 25.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@maeste Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

@git-vote

git-vote Bot commented Oct 17, 2026

Copy link
Copy Markdown

Vote status

In favor: 25.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@maeste Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

@git-vote

git-vote Bot commented Oct 18, 2026

Copy link
Copy Markdown

Vote status

In favor: 25.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@maeste Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

@git-vote

git-vote Bot commented Oct 19, 2026

Copy link
Copy Markdown

Vote status

In favor: 25.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@maeste Pending
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

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

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

Comment thread specification/a2a.proto Resolved
Comment thread docs/specification.md

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

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.

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

Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto
// 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;

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.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

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 agree. The client side operation is 'simulating' streaming here though where as for Message it is a concrete data object.

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

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.

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

herczyn added a commit that referenced this pull request Oct 19, 2026
## 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).
@herczyn
herczyn force-pushed the feat-bidi-artifacts branch from 3641711 to 16712f7 Compare October 19, 2026 16:43
@git-vote

git-vote Bot commented Oct 20, 2026

Copy link
Copy Markdown

Vote status

In favor: 37.50% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
3 0 0 5

Binding votes (3)

User Vote Timestamp
maeste In favor 2026-10-19 16:22:09.0 +00:00:00
muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (1)

User Vote Timestamp
Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

@herczyn
herczyn merged commit 24159e0 into a2aproject:dev-1.1 Oct 20, 2026
6 checks passed
@git-vote

git-vote Bot commented Oct 21, 2026

Copy link
Copy Markdown

Vote closed

The vote passed! 🎉

In favor: 75.00% · Against: 0.00% · Passing threshold: 51%

Summary

In favor Against Abstain Not voted
6 0 0 2

Binding votes (6)

User Vote Timestamp
@ToddSegal In favor 2026-10-20 16:54:07.0 +00:00:00
@darrelmiller In favor 2026-10-20 16:53:31.0 +00:00:00
@maeste In favor 2026-10-19 16:22:09.0 +00:00:00
@muscariello In favor 2026-10-13 16:12:30.0 +00:00:00
@siwachabhi In favor 2026-10-20 17:53:02.0 +00:00:00
@spetschulatSFDC In favor 2026-10-13 16:12:44.0 +00:00:00

Non-binding votes (1)

User Vote Timestamp
@Tehsmash In favor 2026-10-12 12:12:11.0 +00:00:00

herczyn added a commit to herczyn/A2A that referenced this pull request Oct 29, 2026
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]>
darrelmiller pushed a commit that referenced this pull request Nov 17, 2026
## 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]>
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.

3 participants