Tool details
| Field | Value |
|---|---|
| Name | get_agent_run_events |
| Group | Conversations |
Playground
Input schema
Input schema
{
"type": "object",
"properties": {
"conversation_id": {
"type": "string",
"format": "uuid",
"description": "Conversation identifier that scopes the request."
},
"run_id": {
"type": "string",
"minLength": 1,
"description": "Run identifier that scopes the request."
},
"after_event_id": {
"type": "integer",
"minimum": 0,
"description": "Provide the after event id."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "Maximum number of results to return."
}
},
"required": [
"conversation_id",
"run_id"
],
"additionalProperties": false,
"description": "Input schema for the get_agent_run_events tool.",
"$schema": "http://json-schema.org/draft-07/schema#"
}
Output schema
Output schema
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"event_id": {
"type": "integer",
"minimum": 0,
"description": "Monotonic event identifier within the run."
},
"event": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "RUN_STARTED",
"description": "The type associated with this record."
},
"runId": {
"type": "string",
"minLength": 1,
"description": "The run id associated with this record."
},
"threadId": {
"type": "string",
"minLength": 1,
"description": "The thread id associated with this record."
},
"agentId": {
"type": "string",
"minLength": 1,
"description": "The agent id associated with this record."
}
},
"required": [
"type"
],
"additionalProperties": true,
"description": "Structured option 1 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "RUN_FINISHED",
"description": "The type associated with this record."
},
"metadata": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"description": "The provider associated with this record."
},
"model": {
"type": "string",
"description": "The model associated with this record."
},
"inputTokens": {
"type": "number",
"description": "The input tokens associated with this record."
},
"outputTokens": {
"type": "number",
"description": "The output tokens associated with this record."
},
"cachedInputTokens": {
"type": "number",
"description": "The cached input tokens associated with this record."
},
"reasoningTokens": {
"type": "number",
"description": "The reasoning tokens associated with this record."
},
"finishReason": {
"type": "string",
"description": "The finish reason associated with this record."
},
"providerRequestId": {
"type": "string",
"description": "The provider request id associated with this record."
}
},
"required": [
"provider",
"model",
"inputTokens",
"outputTokens",
"finishReason"
],
"additionalProperties": false,
"description": "Additional structured metadata for the record."
}
},
"required": [
"type"
],
"additionalProperties": true,
"description": "Structured option 2 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "RUN_ERROR",
"description": "The type associated with this record."
},
"code": {
"type": "string",
"description": "The code associated with this record."
},
"message": {
"type": "string",
"description": "The message associated with this record."
}
},
"required": [
"type"
],
"additionalProperties": true,
"description": "Structured option 3 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TEXT_MESSAGE_START",
"description": "The type associated with this record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
},
"role": {
"type": "string",
"description": "The role associated with this record."
}
},
"required": [
"type",
"messageId"
],
"additionalProperties": true,
"description": "Structured option 4 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TEXT_MESSAGE_CONTENT",
"description": "The type associated with this record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
},
"delta": {
"type": "string",
"description": "The delta associated with this record."
}
},
"required": [
"type",
"messageId",
"delta"
],
"additionalProperties": true,
"description": "Structured option 5 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TEXT_MESSAGE_END",
"description": "The type associated with this record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
}
},
"required": [
"type",
"messageId"
],
"additionalProperties": true,
"description": "Structured option 6 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TOOL_CALL_START",
"description": "The type associated with this record."
},
"toolCallId": {
"type": "string",
"minLength": 1,
"description": "The tool call id associated with this record."
},
"toolCallName": {
"type": "string",
"minLength": 1,
"description": "The tool call name associated with this record."
}
},
"required": [
"type",
"toolCallId",
"toolCallName"
],
"additionalProperties": true,
"description": "Structured option 7 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TOOL_CALL_ARGS",
"description": "The type associated with this record."
},
"toolCallId": {
"type": "string",
"minLength": 1,
"description": "The tool call id associated with this record."
},
"delta": {
"type": "string",
"description": "The delta associated with this record."
}
},
"required": [
"type",
"toolCallId",
"delta"
],
"additionalProperties": true,
"description": "Structured option 8 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TOOL_CALL_CHUNK",
"description": "The type associated with this record."
},
"toolCallId": {
"type": "string",
"minLength": 1,
"description": "The tool call id associated with this record."
},
"delta": {
"type": "string",
"description": "The delta associated with this record."
}
},
"required": [
"type",
"toolCallId",
"delta"
],
"additionalProperties": true,
"description": "Structured option 9 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TOOL_CALL_END",
"description": "The type associated with this record."
},
"toolCallId": {
"type": "string",
"minLength": 1,
"description": "The tool call id associated with this record."
}
},
"required": [
"type",
"toolCallId"
],
"additionalProperties": true,
"description": "Structured option 10 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "TOOL_CALL_RESULT",
"description": "The type associated with this record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
},
"toolCallId": {
"type": "string",
"minLength": 1,
"description": "The tool call id associated with this record."
},
"content": {
"description": "Source content or body stored on the record."
},
"result": {
"description": "The result associated with this record."
},
"role": {
"type": "string",
"const": "tool",
"description": "The role associated with this record."
},
"isError": {
"type": "boolean",
"description": "The is error associated with this record."
}
},
"required": [
"type",
"toolCallId"
],
"additionalProperties": true,
"description": "Structured option 11 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MESSAGES_SNAPSHOT",
"description": "The type associated with this record."
},
"messages": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier for the record."
},
"role": {
"type": "string",
"const": "assistant",
"description": "The role associated with this record."
},
"content": {
"type": "string",
"description": "Source content or body stored on the record."
},
"name": {
"type": "string",
"description": "Human-readable name for the record."
},
"encryptedValue": {
"type": "string",
"description": "The encrypted value associated with this record."
},
"toolCalls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier for the record."
},
"type": {
"type": "string",
"const": "function",
"description": "The type associated with this record."
},
"function": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Human-readable name for the record."
},
"arguments": {
"type": "string",
"description": "The arguments associated with this record."
}
},
"required": [
"name",
"arguments"
],
"additionalProperties": false,
"description": "Structured function details associated with this record."
}
},
"required": [
"id",
"type",
"function"
],
"additionalProperties": true,
"description": "One tool call item associated with this record."
},
"description": "The tool calls associated with this record."
}
},
"required": [
"id",
"role"
],
"additionalProperties": true,
"description": "Structured option 1 details associated with this record."
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier for the record."
},
"role": {
"type": "string",
"const": "user",
"description": "The role associated with this record."
},
"content": {
"anyOf": [
{
"type": "string",
"description": "The option 1 associated with this record."
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text",
"description": "The type associated with this record."
},
"text": {
"type": "string",
"description": "The text associated with this record."
}
},
"required": [
"type",
"text"
],
"additionalProperties": false,
"description": "Structured option 1 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "binary",
"description": "The type associated with this record."
},
"mimeType": {
"type": "string",
"minLength": 1,
"description": "The mime type associated with this record."
},
"id": {
"type": "string",
"description": "Unique identifier for the record."
},
"url": {
"type": "string",
"description": "The url associated with this record."
},
"data": {
"type": "string",
"description": "Primary record collection."
},
"filename": {
"type": "string",
"description": "The filename associated with this record."
}
},
"required": [
"type",
"mimeType"
],
"additionalProperties": true,
"description": "Structured option 2 details associated with this record."
}
],
"description": "One option 2 item associated with this record."
},
"description": "List of option 2 associated with this record."
}
],
"description": "Source content or body stored on the record."
},
"name": {
"type": "string",
"description": "Human-readable name for the record."
},
"encryptedValue": {
"type": "string",
"description": "The encrypted value associated with this record."
}
},
"required": [
"id",
"role",
"content"
],
"additionalProperties": true,
"description": "Structured option 2 details associated with this record."
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier for the record."
},
"role": {
"type": "string",
"const": "tool",
"description": "The role associated with this record."
},
"toolCallId": {
"type": "string",
"minLength": 1,
"description": "The tool call id associated with this record."
},
"content": {
"type": "string",
"description": "Source content or body stored on the record."
},
"error": {
"type": "string",
"description": "Error details associated with the record."
},
"encryptedValue": {
"type": "string",
"description": "The encrypted value associated with this record."
}
},
"required": [
"id",
"role",
"toolCallId",
"content"
],
"additionalProperties": true,
"description": "Structured option 3 details associated with this record."
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier for the record."
},
"role": {
"type": "string",
"const": "reasoning",
"description": "The role associated with this record."
},
"content": {
"type": "string",
"description": "Source content or body stored on the record."
},
"name": {
"type": "string",
"description": "Human-readable name for the record."
},
"encryptedValue": {
"type": "string",
"description": "The encrypted value associated with this record."
}
},
"required": [
"id",
"role",
"content"
],
"additionalProperties": true,
"description": "Structured option 4 details associated with this record."
}
],
"description": "One message item associated with this record."
},
"description": "List of messages associated with this record."
}
},
"required": [
"type",
"messages"
],
"additionalProperties": true,
"description": "Structured option 12 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "STATE_SNAPSHOT",
"description": "The type associated with this record."
},
"snapshot": {
"type": "object",
"additionalProperties": {
"description": "Additional structured values associated with this result."
},
"description": "Structured snapshot details associated with this record."
}
},
"required": [
"type",
"snapshot"
],
"additionalProperties": true,
"description": "Structured option 13 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "STATE_DELTA",
"description": "The type associated with this record."
},
"delta": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"description": "Additional structured values associated with this result."
},
"description": "Structured option 1 details associated with this record."
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"add",
"remove",
"replace",
"move",
"copy",
"test"
],
"description": "The op associated with this record."
},
"path": {
"type": "string",
"minLength": 1,
"description": "The path associated with this record."
},
"from": {
"type": "string",
"minLength": 1,
"description": "The from associated with this record."
},
"value": {
"description": "The value associated with this record."
}
},
"required": [
"op",
"path"
],
"additionalProperties": true,
"description": "One option 2 item associated with this record."
},
"description": "List of option 2 associated with this record."
}
],
"description": "The delta associated with this record."
}
},
"required": [
"type",
"delta"
],
"additionalProperties": true,
"description": "Structured option 14 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "REASONING_MESSAGE_START",
"description": "The type associated with this record."
},
"id": {
"type": "string",
"description": "Unique identifier for the record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
},
"role": {
"type": "string",
"description": "The role associated with this record."
}
},
"required": [
"type"
],
"additionalProperties": true,
"description": "Structured option 15 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "REASONING_MESSAGE_CONTENT",
"description": "The type associated with this record."
},
"id": {
"type": "string",
"description": "Unique identifier for the record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
},
"delta": {
"type": "string",
"description": "The delta associated with this record."
}
},
"required": [
"type",
"delta"
],
"additionalProperties": true,
"description": "Structured option 16 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "REASONING_MESSAGE_END",
"description": "The type associated with this record."
},
"id": {
"type": "string",
"description": "Unique identifier for the record."
},
"messageId": {
"type": "string",
"minLength": 1,
"description": "The message id associated with this record."
}
},
"required": [
"type"
],
"additionalProperties": true,
"description": "Structured option 17 details associated with this record."
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CUSTOM",
"description": "The type associated with this record."
},
"name": {
"type": "string",
"enum": [
"message-metadata",
"source-url",
"source-document",
"file",
"tool-call-status",
"stream-heartbeat"
],
"description": "Human-readable name for the record."
},
"value": {
"description": "The value associated with this record."
}
},
"required": [
"type",
"name"
],
"additionalProperties": true,
"description": "Structured option 18 details associated with this record."
}
],
"description": "AG-UI event payload emitted by the run."
}
},
"required": [
"event_id",
"event"
],
"additionalProperties": false,
"description": "One persisted agent run event."
},
"description": "Event records for the requested page."
},
"page_info": {
"type": "object",
"properties": {
"self": {
"type": [
"string",
"null"
],
"description": "Cursor representing the current page."
},
"first": {
"type": "null",
"description": "Always null because these MCP pagination flows do not expose a first-page cursor."
},
"next": {
"type": [
"string",
"null"
],
"description": "Cursor for the next page, or null when there are no more results."
},
"prev": {
"type": [
"string",
"null"
],
"description": "Cursor for the previous page, or null when unavailable."
}
},
"required": [
"self",
"first",
"next",
"prev"
],
"additionalProperties": false,
"description": "Pagination cursors for the agent run event list."
}
},
"required": [
"data",
"page_info"
],
"additionalProperties": false,
"description": "Paginated agent run event list response.",
"$schema": "http://json-schema.org/draft-07/schema#"
}