TheDocumentation Index
Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
Use this file to discover all available pages before exploring further.
get_messages() method retrieves the original conversation messages stored via add(). Unlike get() which returns extracted memory records, this returns the raw user/assistant message pairs.
Basic Usage
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
owner_id | str | None | User/tenant scope |
session_id | str | None | Session scope |
agent_id | str | None | Agent scope |
limit | int | None | Max messages to return |
latest | bool | False | Return only the most recent messages |
cross_session | bool | False | Include messages from all sessions |
Use Cases
Conversation replay — Show a user their previous conversation:Async
get_messages() is hosted-only. In the open-source lyzr-cognis package, raw messages are stored in SQLite and accessible via get_context() as part of the short-term memory.