Skip to content

call_to_payload

autogen.beta.a2a.mappers.tools.call_to_payload #

call_to_payload(call)

Serialize a single tool invocation for the tool-call+json Part.

Source code in autogen/beta/a2a/mappers/tools.py
def call_to_payload(call: ToolCallEvent) -> dict[str, Any]:
    """Serialize a single tool invocation for the ``tool-call+json`` Part."""
    return {
        "id": call.id,
        "name": call.name,
        "arguments": call.arguments,
    }