list_agent_messages
List agent messages by status to view pending, processing, processed, or failed items. Retrieve unprocessed messages by default to identify all work the agent should handle.
Instructions
List messages that the agent needs to process, filtered by status.
Default behavior (no status): Returns all messages that are NOT processed.
This is the recommended way to get all work the agent should handle, including
new, delivered, processing (stuck/crashed), and failed messages.
Status filter options:
- (no param): Everything NOT processed - get all work to do
- "pending": No status, delivered, or failed without active attempt - queue depth
- "processing": Currently being processed - in-flight work
- "processed": Successfully completed - done items
- "failed": Failed only - failure backlog
- "all": All messages regardless of status - full history
Messages are returned in chronological order (oldest first).
Workflow after retrieving messages:
1. Get messages via this tool or get_agent_next_message
2. Call mark_agent_message_processing before starting work
3. Process the message
4. Call mark_agent_message_processed or mark_agent_message_failed
Args:
chat_id: The unique identifier of the chat room (required).
status: Filter by processing status (optional, default: all actionable).
page: Page number for pagination (optional).
page_size: Items per page (optional, default: 20, max: 100).
Returns:
JSON string containing the list of messages.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | ||
| status | No | ||
| page | No | ||
| page_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |