komrad

get_last_turns

Read the newest turns of an agent's transcript.

read-onlyidempotentMCP toolAgent

A long turn is cut from its start to fit max_bytes.

Calling it#

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

Request#

GetLastTurnsRequest#

FieldTypeDescription
agent_iduuid*

The agent whose transcript to read, by id.

turnsint32

between 1 and 20

How many of the newest agent turns to return, with the prompts between them. Unset returns the last turn only.

max_bytesint32

at least 0

The most bytes to return for each turn. A longer turn loses its start, so its end stays. Unset uses the default.

Response#

GetLastTurnsResponse#

FieldTypeDescription
turnsTurn[]

The newest agent turns and the prompts between them, oldest first.

Types#

Turn#

Turn is one turn of an agent's transcript.

FieldTypeDescription
rolestring

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

seqint32

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

contentstring

The turn's text. When truncated is set, only the end of it.

truncatedbool

Whether the start of the text was cut to fit max_bytes.