A2A Python client

Import client interfaces from dataagent.extensions.a2a. See the integration guide for setup and a call example, and the host API for server factories.

Name Purpose
A2ACaller(base_url, *, auth_token=None, timeout=None, context_id=None, http_client=None) Call an A2A 1.0 agent. await send(text, *, thread_id=None) returns A2AResult. When it creates the HTTP client, omitted timeout defaults to 900 seconds
A2AResult text, context_id, task_id, state, plus optional request_id and root_run_id
A2ACallError Remote failure, cancellation, or rejection. Local code TOOL_ERROR; optional remote and correlation fields remote_code, request_id, task_id, context_id, root_run_id

The caller retains remote context from either a Message or Task response. Calls without thread_id share its default context, which can be initialized with context_id. If you supply http_client, its own timeout applies and you own its lifecycle. The caller sends text and waits for the response. Use direct JSON-RPC for structured human feedback. If a peer omits DataAgent diagnostic metadata, task and context IDs still come from the protocol result. To register a remote as an agent tool, follow the integration guide.