Get agent run logs
get_agent_run_logsFetch a session's log content from one agent run. part=session is the agent stream-json (reasoning + tool calls); part=system is the container/runner stdout (clone, dependency install, validation gate, git, callback); part=prompt is the assembled input prompt. The role and sessionId are fields of the agent run's own record. A log longer than 40,000 characters returns its end, from a whole line, with a note.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sandboxId": "<sandboxId>",
"role": "<role>",
"sessionId": "<sessionId>"
},
"name": "get_agent_run_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | Which log stream to read | session |
| role | Yes | Agent role: planner | builder | reviewer | qa | |
| sandboxId | Yes | Agent run id: the run's sandbox id | |
| sessionId | Yes | Session id from get_agent_run's sessions list |