Skip to content

feat(spec): Add tasks/list method with filtering and pagination to the specification#831

Merged
amye merged 40 commits intoa2aproject:mainfrom
edenreich:feature/implement-list-tasks
Oct 16, 2025
Merged

feat(spec): Add tasks/list method with filtering and pagination to the specification#831
amye merged 40 commits intoa2aproject:mainfrom
edenreich:feature/implement-list-tasks

Conversation

@edenreich
Copy link
Copy Markdown
Contributor

@edenreich edenreich commented Jul 3, 2025

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:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
  • Ensure the tests and linter pass (Run nox -s format from the repository root to format)
  • Appropriate docs were updated (if necessary)
  • Fix existing linting errors (I guess they were already on the main upstream)

Fixes #761 🦕

BEGIN_COMMIT_OVERRIDE
feat(spec): Add tasks/list method with filtering and pagination to the specification

Release-As: 1.0.0
END_COMMIT_OVERRIDE

@edenreich edenreich requested a review from a team as a code owner July 3, 2025 17:15
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @edenreich, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new tasks/list method to the A2A protocol specification. This addition significantly enhances the protocol's task management capabilities by allowing clients to retrieve a paginated and filterable list of tasks, enabling more efficient discovery and oversight of ongoing or completed operations.

Highlights

  • New tasks/list Method: A new tasks/list method has been added to the A2A protocol, enabling clients to query and retrieve a list of tasks.
  • Filtering and Pagination Capabilities: The tasks/list method supports filtering by contextId and status, as well as pagination using limit and offset parameters, providing flexible task discovery and management.
  • Comprehensive Specification Updates: The new method is fully documented across the specification, including its detailed parameters (ListTasksParams) and result (ListTasksResult) objects, along with usage examples.
  • Protocol Definition Updates: Corresponding updates have been made to the gRPC (a2a.proto), JSON Schema (a2a.json), and TypeScript (types.ts) definitions to incorporate the new method and its associated types.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@edenreich edenreich changed the title docs: Add 'tasks/list' method with filtering and pagination to the specification feat: Add 'tasks/list' method with filtering and pagination to the specification Jul 3, 2025
@edenreich edenreich changed the title feat: Add 'tasks/list' method with filtering and pagination to the specification feat(spec): Add 'tasks/list' method with filtering and pagination to the specification Jul 3, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds the tasks/list method to the A2A specification, enabling clients to retrieve a paginated and filterable list of tasks. The changes are consistently applied across the markdown documentation, gRPC proto definitions, JSON schema, and TypeScript types. My review focuses on the design of the new endpoint, particularly the pagination strategy and the clarity of the gRPC request parameters. I've identified a couple of areas for improvement regarding consistency and potential ambiguity to ensure the specification is robust and clear for implementers.

@holtskinner holtskinner changed the title feat(spec): Add 'tasks/list' method with filtering and pagination to the specification feat(spec): Add tasks/list method with filtering and pagination to the specification Jul 4, 2025
@edenreich
Copy link
Copy Markdown
Contributor Author

Not sure about this linting error of 404.html file, I didn't even touched this file. I guess it will be fixed on the main upstream.

@edenreich edenreich requested a review from holtskinner July 11, 2025 08:57
@holtskinner
Copy link
Copy Markdown
Member

holtskinner commented Jul 16, 2025

I did a rebase to pull in the updates from main so the lint errors don't mess with your PR.

@kthota-g and @pstephengoogle Can you please review/approve this change to the spec?

@a2aproject a2aproject deleted a comment from gemini-code-assist bot Jul 16, 2025
@holtskinner
Copy link
Copy Markdown
Member

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the tasks/list method to the A2A specification, enabling clients to fetch tasks with filtering and pagination. The changes are comprehensive, updating the main specification document, gRPC proto, JSON schema, and TypeScript types. The implementation of cursor-based pagination is well-documented. I've identified some inconsistencies in the documentation examples and missing information that could cause confusion for implementers. My review includes suggestions to align the documentation and improve clarity. Overall, this is a valuable addition to the protocol.

</div>

#### 7.4.1. `TaskIdParams` Object (for `tasks/cancel` and `tasks/pushNotificationConfig/get`)
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`TaskNotFoundError`](#82-a2a-specific-errors), [`TaskNotCancelableError`](#82-a2a-specific-errors)).
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.

medium

Consider adding TaskNotFoundError and TaskNotCancelableError to the list of possible errors for this endpoint.

Suggested change
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`TaskNotFoundError`](#82-a2a-specific-errors), [`TaskNotCancelableError`](#82-a2a-specific-errors)).
- **Response `error` type (on failure)**: [`JSONRPCError`](#612-jsonrpcerror-object) (e.g., [`TaskNotFoundError`](#82-a2a-specific-errors), [`TaskNotCancelableError`](#82-a2a-specific-errors)).

@holtskinner holtskinner requested a review from a team as a code owner July 23, 2025 14:20
@ReubenBond
Copy link
Copy Markdown

If I send a tasks/list command to a public-facing compliant A2A server without specifying a contextId, will I receive everyone's tasks? I believe the answer should be no, but the spec appears to not constrain the scope of the query when a contextId is not specified. We could add some text to say the implementation can decide the implicit scope when no contextId is specified. The implementation can implicitly scope a query to a user/tenant/etc. Alternatively, the scope could be an explicit parameter.

@holtskinner holtskinner requested a review from a team July 31, 2025 16:20
@holtskinner holtskinner added the TSC Review To be reviewed by the Technical Steering Committee label Jul 31, 2025
…ecification

Signed-off-by: Eden Reich <eden.reich@gmail.com>
wap definitions for 'CancelTaskRequest' and 'ListTasksRequest' in JSON schema; add detailed structure for 'ListTasks' methods.

And mark the file as generated so it's easier to understand that this file is generated and it doesn't expand on the pull request.

Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ation

Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ation approach

Signed-off-by: Eden Reich <eden.reich@gmail.com>
@edenreich
Copy link
Copy Markdown
Contributor Author

IMHO MUST-FIX (tasks/list):

  1. Add inline unit note for lastUpdatedAfter (ms epoch) in param bullets.
  2. Define includeArtifacts=false semantics: artifacts field MUST be omitted (not empty array).
  3. Add explicit InvalidParamsError cases table: pageSize out of bounds (1–100), malformed/expired pageToken, historyLength < 0, invalid status value, invalid lastUpdatedAfter (and optionally future timestamp).
  4. Make ordering normative: MUST return tasks sorted by descending last update time.
  5. Propagate pageSize (1–100, default 50) and historyLength (>=0, default 0) bounds/defaults across spec text, proto comments, JSON Schema, TS JSDoc.
  6. Decide & document final-page nextPageToken behavior (omit vs empty) and keep consistent.
  7. Clarify totalSize semantics (exact vs approximate vs optional) and align across layers.

@muscariello Thanks for reviewing, I have addressed those too. Good catch with the inconsistency between proto file and spec - those should be now in sync. I'll add a changelog - would highly recommend that this project uses semantic-release, it would make things much easier!

Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ksResult, ListTasksRequest, ListTasksSuccessResponse, and ListTasksResponse

Signed-off-by: Eden Reich <eden.reich@gmail.com>
@a2aproject a2aproject deleted a comment from git-vote bot Sep 15, 2025
@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 15, 2025

Vote status

So far 37.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
3 0 0 5

Binding votes (3)

User Vote Timestamp
darrelmiller In favor 2025-09-13 13:34:47.0 +00:00:00
lerhaupt In favor 2025-09-14 20:21:00.0 +00:00:00
muscariello In favor 2025-09-15 11:16:31.0 +00:00:00
@geneknit Pending
@hughesthe1st Pending
@ToddSegal Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

Non-binding votes (2)

User Vote Timestamp
matoushavlena In favor 2025-09-15 8:29:35.0 +00:00:00
pilartomas In favor 2025-09-15 10:53:23.0 +00:00:00

@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 16, 2025

Votes can only be checked once a day.

@mrbobbytables
Copy link
Copy Markdown

/check-vote

@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 16, 2025

Votes can only be checked once a day.

@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 16, 2025

Vote status

So far 50.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
4 0 0 4

Binding votes (4)

User Vote Timestamp
darrelmiller In favor 2025-09-13 13:34:47.0 +00:00:00
geneknit In favor 2025-09-16 15:47:35.0 +00:00:00
lerhaupt In favor 2025-09-14 20:21:00.0 +00:00:00
muscariello In favor 2025-09-15 11:16:31.0 +00:00:00
@hughesthe1st Pending
@ToddSegal Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

Non-binding votes (2)

User Vote Timestamp
matoushavlena In favor 2025-09-15 8:29:35.0 +00:00:00
pilartomas In favor 2025-09-15 10:53:23.0 +00:00:00

2 similar comments
@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 17, 2025

Vote status

So far 50.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
4 0 0 4

Binding votes (4)

User Vote Timestamp
darrelmiller In favor 2025-09-13 13:34:47.0 +00:00:00
geneknit In favor 2025-09-16 15:47:35.0 +00:00:00
lerhaupt In favor 2025-09-14 20:21:00.0 +00:00:00
muscariello In favor 2025-09-15 11:16:31.0 +00:00:00
@hughesthe1st Pending
@ToddSegal Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

Non-binding votes (2)

User Vote Timestamp
matoushavlena In favor 2025-09-15 8:29:35.0 +00:00:00
pilartomas In favor 2025-09-15 10:53:23.0 +00:00:00

@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 18, 2025

Vote status

So far 50.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
4 0 0 4

Binding votes (4)

User Vote Timestamp
darrelmiller In favor 2025-09-13 13:34:47.0 +00:00:00
geneknit In favor 2025-09-16 15:47:35.0 +00:00:00
lerhaupt In favor 2025-09-14 20:21:00.0 +00:00:00
muscariello In favor 2025-09-15 11:16:31.0 +00:00:00
@hughesthe1st Pending
@ToddSegal Pending
@000-000-000-000-000 Pending
@SivaNSAP Pending

Non-binding votes (2)

User Vote Timestamp
matoushavlena In favor 2025-09-15 8:29:35.0 +00:00:00
pilartomas In favor 2025-09-15 10:53:23.0 +00:00:00

@ToddSegal
Copy link
Copy Markdown
Contributor

I'm in favor of the change but need to figure out how we avoid merging this as part of 0.3. This needs to be part of 0.4 and we need the links for 'latest' to point to 0.3 without this change.

@amye
Copy link
Copy Markdown
Contributor

amye commented Sep 18, 2025

I'm in favor of the change but need to figure out how we avoid merging this as part of 0.3. This needs to be part of 0.4 and we need the links for 'latest' to point to 0.3 without this change.

So what'll happen is: the vote will close as 'pass', we mark it as 'approved for .4' and we merge it at that time. We can document this process as part of the release.

@git-vote
Copy link
Copy Markdown

git-vote bot commented Sep 19, 2025

Vote closed

The vote passed! 🎉

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

Summary

In favor Against Abstain Not voted
6 0 0 2

Binding votes (6)

User Vote Timestamp
@SivaNSAP In favor 2025-09-18 21:09:40.0 +00:00:00
@ToddSegal In favor 2025-09-19 0:34:18.0 +00:00:00
@darrelmiller In favor 2025-09-13 13:34:47.0 +00:00:00
@geneknit In favor 2025-09-16 15:47:35.0 +00:00:00
@lerhaupt In favor 2025-09-14 20:21:00.0 +00:00:00
@muscariello In favor 2025-09-15 11:16:31.0 +00:00:00

Non-binding votes (2)

User Vote Timestamp
@matoushavlena In favor 2025-09-15 8:29:35.0 +00:00:00
@pilartomas In favor 2025-09-15 10:53:23.0 +00:00:00

@amye amye merged commit 0a9f629 into a2aproject:main Oct 16, 2025
8 checks passed
madankumarpichamuthu pushed a commit to madankumarpichamuthu/A2A that referenced this pull request Oct 18, 2025
…the specification (a2aproject#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 a2aproject#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitvote/closed gitvote/passed gitvote TSC Review To be reviewed by the Technical Steering Committee

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: The ability to list tasks (tasks/list) in addition to the existing get (tasks/get)