Skip to content

Commit 0a9f629

Browse files
edenreichholtskinnerdarrelmilleramye
authored
feat(spec): Add tasks/list method with filtering and pagination to the specification (#831)
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](https://github.com/a2aproject/A2A/blob/main/CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - [x] Ensure the tests and linter pass (Run `nox -s format` from the repository root to format) - [x] Appropriate docs were updated (if necessary) - [x] Fix existing linting errors (I guess they were already on the main upstream) Fixes #761 🦕 --------- Signed-off-by: Eden Reich <eden.reich@gmail.com> Co-authored-by: Holt Skinner <holtskinner@google.com> Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com> Co-authored-by: Darrel <darrmi@microsoft.com> Co-authored-by: Amye Scavarda Perrin <amye@amye.org>
1 parent b8fc33e commit 0a9f629

6 files changed

Lines changed: 570 additions & 37 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.4.0](https://github.com/a2aproject/A2A/compare/v0.3.0...v0.4.0) (2025-09-15)
4+
5+
### Features
6+
7+
* **spec:** Add `tasks/list` method for retrieving and filtering tasks with pagination
8+
39
## [0.3.0](https://github.com/a2aproject/A2A/compare/v0.2.6...v0.3.0) (2025-07-30)
410

511

docs/llms.txt

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,61 @@ Key features of the A2A protocol include: agent discovery via Agent Cards, stand
7676

7777
### 2.3. A2A RPC Methods
7878

79-
- **`message/send`:** Sends a message to initiate or continue a task. Returns a final `Task` or `Message` object.
80-
- **`message/stream`:** Sends a message and subscribes to real-time updates via Server-Sent Events (SSE).
81-
- **`tasks/get`:** Retrieves the current state of a task by its ID.
82-
- **`tasks/cancel`:** Requests cancellation of a running task.
83-
- **`tasks/pushNotificationConfig/set`:** Sets the webhook configuration for a task.
84-
- **`tasks/pushNotificationConfig/get`:** Retrieves the push notification configuration for a task.
85-
- **`tasks/resubscribe`:** Resubscribes to a task's update stream after a disconnection.
86-
87-
### 2.4. Streaming Events (`message/stream`, `tasks/resubscribe`)
88-
89-
When using a streaming method, the server sends a sequence of JSON-RPC 2.0 response objects. The `result` field of each response object will contain one of the following payload types:
90-
- **`Task`:** The initial state of the newly created task. Sent as the first event in a new task stream.
91-
- **`Message`:** An immediate, self-contained message from the agent.
92-
- **`TaskStatusUpdateEvent`:** Signals a change in the task's lifecycle state (e.g., `working`, `completed`). A final event is marked with `final: true`.
93-
- **`TaskArtifactUpdateEvent`:** Delivers a new or updated `Artifact` generated by the task, which can be sent in chunks.
79+
- **`message/send`:** (Request/Response)
80+
- Sends a message to initiate or continue a task.
81+
- `params`: `MessageSendParams` (includes `taskId`, `contextId`, `message`, optionally `configuration`).
82+
- `result`: `Task` (final state after synchronous processing).
83+
- **`message/stream`:** (Request/Stream)
84+
- Sends a message and subscribes to real-time updates via Server-Sent Events (SSE).
85+
- `params`: `MessageSendParams`.
86+
- `result` (stream events): `SendStreamingMessageResponse` containing one of: `MessageEvent`, `TaskStatusUpdateEvent`, `TaskArtifactUpdateEvent`. Final event has `final: true`.
87+
- **`tasks/get`:** (Request/Response)
88+
- Retrieves the current state of a task.
89+
- `params`: `TaskQueryParams` (includes `id`, optionally `historyLength`).
90+
- `result`: `Task`.
91+
- **`tasks/list`:** (Request/Response)
92+
- Retrieves a list of tasks with optional filtering and pagination.
93+
- `params`: `ListTasksParams` (optional: `contextId`, `status`, `pageSize`, `pageToken`, `historyLength`, `lastUpdatedAfter`, `includeArtifacts`, `metadata`).
94+
- `result`: `ListTasksResult` (includes `tasks[]`, `totalSize`, `pageSize`, `nextPageToken`).
95+
- **`tasks/cancel`:** (Request/Response)
96+
- Requests cancellation of a running task.
97+
- `params`: `TaskIdParams` (includes `id`).
98+
- `result`: `Task` (updated state, likely 'canceled') or error if not cancelable.
99+
- **`tasks/pushNotificationConfig/set`:** (Request/Response)
100+
- Sets or updates the push notification configuration for a task.
101+
- `params`: `TaskPushNotificationConfig`.
102+
- `result`: `TaskPushNotificationConfig` (confirmed configuration).
103+
- **`tasks/pushNotificationConfig/get`:** (Request/Response)
104+
- Retrieves the current push notification configuration for a task.
105+
- `params`: `TaskIdParams` (includes `taskId`).
106+
- `result`: `TaskPushNotificationConfig`.
107+
- **`tasks/resubscribe`:** (Request/Stream)
108+
- Resubscribes to task updates after a connection interruption (SSE).
109+
- `params`: `TaskQueryParams`.
110+
- `result` (stream events): `TaskStatusUpdateEvent` or `TaskArtifactUpdateEvent`.
111+
112+
### 2.4. Streaming Update Events (Result of `message/stream` or `tasks/resubscribe`)
113+
114+
- **`SendStreamingMessageResponse`:** Contains a message from the agent.
115+
- `type`: "message"
116+
- `message`: (`Message`) The message content.
117+
- `contextId`: (string) Context identifier the message is associated with.
118+
- `kind`: ("streaming-response") Type discriminator.
119+
- `final`: (boolean) True if this is the final message for the task.
120+
- **`TaskStatusUpdateEvent`:** Signals a change in task status.
121+
- `type`: "task-status"
122+
- `taskId`: (string) Task ID.
123+
- `contextId`: (string) Context identifier the task is associated with.
124+
- `kind`: ("status-update") Type discriminator.
125+
- `status`: (`TaskStatus`) The new status object.
126+
- `final`: (boolean) True if this is the terminal update for the task.
127+
- **`TaskArtifactUpdateEvent`:** Signals a new or updated artifact.
128+
- `type`: "task-artifact"
129+
- `taskId`: (string) Task ID.
130+
- `artifact`: (`Artifact`) The artifact data.
131+
- `append`: (boolean) If true, append parts to artifact; if false (default), replace.
132+
- `lastChunk`: (boolean) If true, indicates this is the final update for the artifact.
133+
- `final`: (boolean) Usually false for artifacts, can signal end concurrently with status.
94134

95135
### 2.5. Standard Error Codes
96136

0 commit comments

Comments
 (0)