conv.history attribute contains a chronological list of UserInput and AgentResponse objects representing the conversation so far.
UserInput
Represents a user turn in the conversation.
Properties
| Property | Type | Description |
|---|---|---|
text | str | The user’s input text |
role | str | Always "user" |
Methods
| Method | Returns | Description |
|---|---|---|
to_dict() | dict | Returns {"type": "user", "text": "..."} |
to_string() | str | Returns "User: <text>" |
AgentResponse
Represents an agent turn in the conversation.
Properties
| Property | Type | Description |
|---|---|---|
text | str | The agent’s response text |
role | str | Always "agent" |
Methods
| Method | Returns | Description |
|---|---|---|
to_dict() | dict | Returns {"type": "agent", "text": "..."} |
to_string() | str | Returns "Agent: <text>" |
Example: format history for logging
Example: get last user message
See also
convobject — full list of conversation methods and attributes.

