komrad

search_transcripts

Search transcripts by full text, archived agents included.

read-onlyidempotentMCP toolAgent

Quote phrases, prefix - to exclude, and narrow with qualifiers such as from:me, agent:NAME, workflow:NAME, is:reviewer, since:2d and on:DATE. Only the caller's transcript is searched unless agent_id or a qualifier names others.

Calling it#

curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/SearchTranscripts \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "<query>"
}'

Request#

SearchTranscriptsRequest#

FieldTypeDescription
querystring*

at most 500 characters

The words to search for, matched whole and stemmed. A quoted phrase matches in order, a leading minus excludes a word, and qualifiers narrow the search.

paginationPagination

The page to read. One cursor pages through matches and near together.

agent_iduuid

The agent whose transcript to search, by id. Unset searches the caller's own, unless a qualifier names other agents.

Response#

SearchTranscriptsResponse#

FieldTypeDescription
matchesSearchHit[]

The turns that contain the words, in the order the query asked for.

nearSearchHit[]

The turns that contain the letters only inside other text, such as a word inside a path. They are ranked by how closely the letters match.

next_page_tokenstring

The cursor for the next page of both lists. Unset on the last page.

Types#

Pagination#

Pagination selects one page of a listing.

FieldTypeDescription
limitint32

at least 0

How many records to return. Komrad caps the value, and picks one when unset.

cursorstring

at most 2048 characters

The next_page_token from the previous response. Unset to start from the first page.

SearchHit#

SearchHit is one turn of a transcript that matched a search.

FieldTypeDescription
agent_iduuid*

The id of the agent whose transcript holds the turn.

snippetstring

The turn's text around the match, with the match marked.

namestring

The agent's name.

archivedbool

Whether the agent is archived. Search includes archived agents.

scoredouble

How well the turn matched. Zero when the hits are ordered by time.

seqint32

The turn's position in the transcript, counting from zero.

rolestring

Who wrote the turn: the agent, or whoever prompted it.

content_offsetint64

The byte offset of the turn in the whole transcript, for reading the text around it.

content_lengthint64

How many bytes the turn runs to from content_offset.

spoken_attimestamp

When the turn was written. Unset when the CLI's log was gone before komrad read the time.