AgentResponseItem Class  
Represents a response item from an agent. An AgentResponseItem includes a message payload (ChatMessageContent) and the conversation thread that produced it.
Constructor
AgentResponseItem(*, message: TMessage, thread: AgentThread)Keyword-Only Parameters
| Name | Description | 
|---|---|
| message 
				Required
			 |  | 
| thread 
				Required
			 |  | 
Methods
| __str__ | Returns the string representation of the response item, equivalent to its content string. | 
| __hash__ | Returns a hash of the response item based on its message and thread. | 
__str__
Returns the string representation of the response item, equivalent to its content string.
__str__() -> str__hash__
Returns a hash of the response item based on its message and thread.
__hash__() -> intAttributes
message
The message content of the response item. This is typically a ChatMessageContent or subclass instance.
message: TMessagethread
The conversation thread instance associated with this response item. Holds contextual or ephemeral state for the conversation.
thread: AgentThreadcontent
A property returning the entire message content of this response item.
content: TMessageitems
A property returning the list of item segments in the message content. For example, multiple text or function-call blocks.
items: list[CMC_ITEM_TYPES]metadata
A property returning metadata associated with the message content, such as tokens, function call statuses, or any additional fields.
metadata: dict[str, Any]name
A property returning the optional name assigned to the message content (e.g., function name or user label).
name: str | Nonerole
A property returning the role of this message content (e.g., "user", "assistant", or "system").
role: str | None