Skip to content

[Feat]: Can the A2A server generate taskids by itself? #378

Description

@likai314

Is your feature request related to a problem? Please describe.

In the current SDK, after receiving a message, if it does not contain a taskid, the SDK will generate one automatically. This brings two problems:

  1. If the agent expects to attach the received message to an existing task, the new taskid will conflict with the original one;
  2. In practical use, organizations expect taskids to have a unified prefix or a unified organizational form, and do not want to use taskids automatically generated by the SDK.
    Please consider the above situations and add a configuration method to prevent the SDK from automatically generating taskids after receiving messages?

Describe the solution you'd like

add a configuration method to prevent the SDK from automatically generating taskids after receiving messages without taskid.

Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Aug 4, 2025
  2. RubberGoose246 commented on Aug 7, 2025

    @RubberGoose246

    This highlights a fundamental issue with how A2A handles task ID assignment. Since the framework generates a task ID internally, applications are unable to freely assign their own task ID — a problem I’ve also encountered.

    Whether an agent tries to pass a task ID (not generated by the agent itself) to the client, or the client tries to pass such a task ID to the agent, it results in an error because the framework expects the task ID to match its internal management.

    What complicates things further is that the task history stored in the DatabaseTaskStore or DatabasePushNotificationConfigStore is only associated with task IDs generated by the framework. This means that the history functionality cannot be used with application-defined task IDs. The same limitation applies to task state management, particularly in handling terminal states.

    I think the confusion stems from the fact that the framework-managed task ID is also exposed for application use. While it's reasonable for the framework to manage its own internal tasks, I believe it would be better to completely separate that from application-level task management.

  3. likai314 commented on Aug 18, 2025

    @likai314
    Author

    hi @kthota-g
    Could you kindly consider integrating my issue above into A2A sdk?
    Thank you very much.

  4. likai314 commented on Aug 22, 2025

    @likai314
    Author

    hi @holtskinner
    Could you kindly consider integrating my issue above into A2A sdk?
    Thank you very much.

  5. pstephengoogle commented on Aug 22, 2025

    @pstephengoogle
    Contributor

    Thanks for this feedback. For issue 1) the expectation is that the second request is attached to the task explicitly in the request. If you don't provide a task that message is associated with, the agent must assume this is a new request and can decide how to proceed.

    Will look into 2)

  6. pstephengoogle commented on Aug 28, 2025

    @pstephengoogle
    Contributor

    Follow up question for 2). If you could supply your own id generator to the sdk, would that resolve all your concerns? Having the caller provide the task id creates its own set of challenges, but if the agent developer could adhere to expected standards, that should work, right?

  7. added a commit that references this issue on Oct 9, 2025
    051ab20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions