Skip to content

Commit 86f0918

Browse files
authored
fix(a2a): Make instructions of _send_query more clear. (#705)
The cause of the failures was the agent deciding to pass `"'0"` as task_id instead of `None`.
1 parent 0cec0b5 commit 86f0918

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/any_agent/tools/a2a.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ async def _send_query(
156156
157157
Args:
158158
query (str): The query to send to the agent.
159-
task_id (str, optional): Task ID for continuing an incomplete task. Use the same
160-
task_id from a previous response with TaskState.input_required to resume the task. If you want to start a new task, you should not provide a task id.
161-
context_id (str, optional): Context ID for conversation continuity. Provides the
162-
agent with conversation history. Omit to start a fresh conversation. If you want to start a new conversation, you should not provide a context id.
159+
task_id (str, optional): Task ID for continuing an incomplete task.
160+
If you want to start a new task, you should not provide a task_id (pass `task_id=None`).
161+
If you want to resume a task, use the same task_id from a previous response with TaskState.input_required.
162+
context_id (str, optional): Context ID for conversation continuity.
163+
If you want to start a new conversation, you should not provide a context_id (pass `context_id=None`).
163164
164165
Returns:
165166
dict: Response from the A2A agent containing:

0 commit comments

Comments
 (0)