-
|
I have a case where I want to create a custom Agent that can take a while to process. When someone calls the agent (via SendMessage over A2A) I do not want to block: instead, I want to immediately return a task with TASK_STATE_SUBMITTED or TASK_STATE_WORKING. Long running function tool support comes close: https://google.github.io/adk-docs/tools-custom/function-tools/#long-run-tool . However, this results in TASK_STATE_INPUT_REQUIRED, even though I don't actually need any user input. e.g. the closest I've come is something like this: If I just emit a placeholder event like a "started" message, without a long running tool ID and corresponding FunctionCall, it's treated as completed (TASK_STATE_COMPLETED). If I just do the long-running work without yielding any initial event, the SendMessage RPC blocks until it finishes. Is the use-case of a long-running task that does not require user input supported by ADK? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
After investigating more, I realized that the blocking-ness is controlled by the client as part of the A2A spec: https://a2a-protocol.org/latest/specification/#322-sendmessageconfiguration When correctly including configuration in the request with |
Beta Was this translation helpful? Give feedback.
After investigating more, I realized that the blocking-ness is controlled by the client as part of the A2A spec: https://a2a-protocol.org/latest/specification/#322-sendmessageconfiguration
When correctly including configuration in the request with
blocking:falseand invoking my ADK agent, I do get an immediate return with TASK_STATE_SUBMITTED. No need to represent the internal work as a tool call.