agentle.agents.a2a.messages¶
A2A Messages Package
This package provides the message models and adapters used in the A2A protocol. Messages represent the communication units exchanged between users and agents, containing one or more parts (text, data, files).
The package includes: - Message models defining the structure of user and agent messages - Adapters for converting between different message formats - Utility functions for message handling
Example
```python from agentle.agents.a2a.messages.message import Message from agentle.agents.a2a.message_parts.text_part import TextPart
# Create a simple message message = Message(
role=”user”, parts=[TextPart(text=”Hello, how can you help me today?”)]
)¶
Classes
|
Adapter for converting generation messages to A2A messages. |
|
Represents a message exchanged between a user and an agent. |
Modules
Generation Message to A2A Message Adapter |
|
A2A Message Model |
|
A2A Message to Generation Message Adapter |