POST
/
get-messages
Get Messages
curl --request POST \
  --url https://api.agentbase.sh/get-messages \
  --header 'Authorization: Bearer <token>'
{
  "user_message": {},
  "agent_thinking": {},
  "agent_response": {},
  "agent_tool_use": {}
}

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.
[
  {
    "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