> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentbase.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Messages

> Retrieve the messages from the current agent session.

### Query Parameters

**session** `string` *required*

The session ID to retrieve messages from. This identifies the specific agent
session.

### Response

Returns the entire message history for the specified agent session as an array of message objects.

```json theme={null}
[
  {
    "type": "user_message",
    "content": "Can you launch a computer instance?"
  },
  {
    "type": "agent_thinking",
    "content": "The user is asking me to launch a computer instance. I can see that I have a \"computer\" function available that creates a new computer instance for the current user session."
  },
  {
    "type": "agent_response",
    "content": "I'll launch a computer instance for you right away."
  },
  {
    "type": "agent_tool_use",
    "content": "{\"tool\":\"computer\",\"input\":\"\"}"
  },
  {
    "type": "agent_response",
    "content": "Great! I've successfully launched a computer instance for you."
  }
]
```

### Message Types

**user\_message** `object`

Messages sent by the user to the agent

**agent\_thinking** `object`

Internal agent reasoning and thought processes

**agent\_response** `object`

Agent responses visible to the user

**agent\_tool\_use** `object`

Records of tools used by the agent, including input parameters


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.