Client operations
A2A event fields
The A2AcontextId maps to the Harnest session ID. A text-input root accepts A2A text parts; a typed-input root requires exactly one structured data part. Harnest projects customer-visible text and structured results back to A2A parts while keeping tool arguments and results inside the executing agent boundary regardless of tool_activity. With OutputPolicy(thinking=True), a streaming Task emits provider-exposed reasoning as a working-status message whose metadata.harnest.type is thinking; reasoning is otherwise suppressed. Agent and graph-node lifecycle updates use the same working status with metadata.harnest.type: agent_activity; model metadata uses metadata.harnest.type: agent_metadata. Set agent_metadata=AgentMetadataMode.SUPPRESS to omit those updates and aggregate token counts from the final Message or Task artifact. Answer artifacts can carry metadata.harnest.agent attribution. With OutputPolicy(decision_results=True), streaming tasks also publish working-status metadata with metadata.harnest.type: decision_result and the typed decision in metadata.harnest.value. Decision results are hidden by default.
Exports
A2AClient
Discover and invoke one remote agent without background polling or listing.Parameters and example
Parameters and example
A2AClient.card
Return the validated cached card without triggering network I/O.Example
Example
A2AClient.connect
Example
Example
A2AClient.send
Parameters and example
Parameters and example
A2AClient.stream
Parameters and example
Parameters and example
A2AClient.get_task
Parameters and example
Parameters and example
A2AClient.list_tasks
Parameters and example
Parameters and example
A2AClient.cancel_task
Parameters and example
Parameters and example
A2AClient.subscribe
Parameters and example
Parameters and example
A2AClient.close
Example
Example
A2AClient.aenter
Example
Example
A2AClient.aexit
Example
Example
A2AClientError
An outbound A2A interaction failed Harnest policy or protocol handling.Example
Example
A2AResult
Minimum portable projection of a direct Message or tracked A2A Task.— means no declared default):
Parameters and example
Parameters and example
A2AResult.terminal
Return whether the remote interaction no longer needs observation.Example
Example
A2AResult.as_dict
Example
Example
A2AUpdate
One normalized outbound stream update without protobuf coupling.— means no declared default):
Parameters and example
Parameters and example
RemoteAgent
A first-class remote A2A participant usable as a portable graph node.— means no declared default):
Parameters and example
Parameters and example
RemoteAgent.call
Parameters and example
Parameters and example
RemoteAgent.as_tool
Example
Example
RemoteAgentError
A remote agent reached a terminal failure state.Example
Example