o
    Æ°i¤  ã                   @   s\   d Z ddlmZ ddlmZmZmZmZ ddlm	Z	m
Z
mZmZmZ ddlmZ g d¢ZdS )a³  
LiteLLM A2A - Wrapper for invoking A2A protocol agents.

This module provides a thin wrapper around the official `a2a` SDK that:
- Handles httpx client creation and agent card resolution
- Adds LiteLLM logging via @client decorator
- Matches the A2A SDK interface (SendMessageRequest, SendMessageResponse, etc.)

Example usage (standalone functions with @client decorator):
    ```python
    from litellm.a2a_protocol import asend_message
    from a2a.types import SendMessageRequest, MessageSendParams
    from uuid import uuid4

    request = SendMessageRequest(
        id=str(uuid4()),
        params=MessageSendParams(
            message={
                "role": "user",
                "parts": [{"kind": "text", "text": "Hello!"}],
                "messageId": uuid4().hex,
            }
        )
    )
    response = await asend_message(
        base_url="http://localhost:10001",
        request=request,
    )
    print(response.model_dump(mode='json', exclude_none=True))
    ```

Example usage (class-based):
    ```python
    from litellm.a2a_protocol import A2AClient

    client = A2AClient(base_url="http://localhost:10001")
    response = await client.send_message(request)
    ```
é    )Ú	A2AClient)ÚA2AAgentCardErrorÚA2AConnectionErrorÚA2AErrorÚA2ALocalhostURLError)Úaget_agent_cardÚasend_messageÚasend_message_streamingÚcreate_a2a_clientÚsend_message)ÚLiteLLMSendMessageResponse)r   r   r   r	   r   r
   r   r   r   r   r   N)Ú__doc__Zlitellm.a2a_protocol.clientr   Zlitellm.a2a_protocol.exceptionsr   r   r   r   Zlitellm.a2a_protocol.mainr   r   r	   r
   r   Zlitellm.types.agentsr   Ú__all__© r   r   úT/home/app/Keep/.python/lib/python3.10/site-packages/litellm/a2a_protocol/__init__.pyÚ<module>   s    (