Skip to content

Get Agent Messages

GET
/api/agents/messages/{agent_id}

Get comprehensive message history for a specific agent with pagination support.

Args: agent_id: Unique identifier of the agent to retrieve messages for request: FastAPI Request object for backend context limit: Maximum number of messages to return (default: 50) offset: Number of messages to skip for pagination (default: 0)

Returns: Dict[str, object]: Agent message history with pagination metadata

Note: Retrieves message history from the communication hub with manual pagination support for efficient message browsing and analysis across agent communications.

agent_id
required
Agent Id
string
limit
Limit
integer
default: 50
offset
Offset
integer
0

Successful Response

AgentMessagesResponse

Agent message history response model with pagination support.

Returns paginated message history for a specific agent with comprehensive pagination metadata for efficient message browsing and analysis through the communication hub.

Fields: status: Operation status indicator agent_id: Agent identifier for message history messages: List of agent messages (paginated) count: Number of messages in current page total: Total number of messages available offset: Pagination offset (messages skipped) limit: Pagination limit (max messages per page)

Used By: - GET /api/agents/management/messages/{agent_id} endpoint - Agent message history retrieval - Communication analytics

object
status
required
Status

Operation status: ‘success’ or error state

string
agentId
required
Agentid

Agent identifier for message history

string
messages
required
Messages

List of agent messages (paginated)

Array<object>
AgentMessageSummary

Summary of an agent message.

Used in agent_models.py for messages lists.

object
messageId
required
Messageid
string
role
required
Role
string
contentPreview
required
Contentpreview
string
timestamp
required
Timestamp
string
tokenCount
Any of:
integer
count
required
Count

Number of messages in current page

integer
total
required
Total

Total number of messages available

integer
offset
required
Offset

Pagination offset (messages skipped)

integer
limit
required
Limit

Pagination limit (max messages per page)

integer

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object