openclaw_chat_history
Retrieve the chat history for a specific session by providing the session key. Use the optional limit parameter to control the number of messages returned.
Instructions
Fetch chat history for a session. Wraps chat.history. Wire format (verified live): requires sessionKey; accepts limit. Read-only. The pre-0.5.x agentId/sessionId/offset fields are rejected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. | |
| sessionKey | Yes | Composite session key from openclaw_sessions_list. |