v36

latestOpenAPI 3.1.0raw.githubusercontent.com2025-10-091882241.2 MB
agents

Search Messages

Search messages across the entire organization with optional project and template filtering. Returns messages with FTS/vector ranks and total RRF score.

This is a cloud-only feature.

post/v1/agents/messages/search

Request body

querystring nullable

Text query for full-text search

search_mode'vector' | 'fts' | 'hybrid'

Search mode to use

rolesMessageRole[] nullable

Filter messages by role

project_idstring nullable

Filter messages by project ID

template_idstring nullable

Filter messages by template ID

limitinteger

Maximum number of results to return

start_datestring date-time nullable

Filter messages created after this date

end_datestring date-time nullable

Filter messages created on or before this date

Response

Successful Response

embedded_textstring required

The embedded content (LLM-friendly)

fts_rankinteger nullable

Full-text search rank position if FTS was used

vector_rankinteger nullable

Vector search rank position if vector search was used

rrf_scorenumber required

Reciprocal Rank Fusion combined score

Example response

[
  {
    "message": {
      "id": "message-123e4567-e89b-12d3-a456-426614174000"
    }
  }
]