a13nDocs

列出运行显示项

按序号读取运行已提交的显示条目。未加过滤的详细查询默认返回最新条目和完整尾部。精简或带过滤的查询从最早序号开始,并严格遵守 limit。before 和 after 互斥;即使过滤后当前页为空,也应通过 next_before 或 next_after 继续读取。

GET/api/v1/runs/{run_id}/items

按序号读取运行已提交的显示条目。未加过滤的详细查询默认返回最新条目和完整尾部。精简或带过滤的查询从最早序号开始,并严格遵守 limit。before 和 after 互斥;即使过滤后当前页为空,也应通过 next_before 或 next_after 继续读取。

认证与授权

认证与授权Bearer <token>

工作空间 API 密钥(a13n_...)

传递位置: header

路径参数

run_id*Run Id

查询参数

before?|

返回紧接在此序号之前的显示项

after?|

返回紧接在此序号之后的显示项

limit?|null
view?string

查找资源时使用 compact;detailed 保留原有响应。

默认值"detailed"

可选值

  • "detailed"
  • "compact"
kind?|null
state?|null
tool_name?|null

请求头参数

X-Workspace-ID?|

登录会话作用的工作空间 ID,登录会话必须提供。API 密钥作用于自身工作空间,无需提供;禁止指定其他工作空间。

响应体

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/runs/string/items"
{  "complete": true,  "items": [    {      "content": {        "property1": null,        "property2": null      },      "content_refs": {        "property1": {          "id": "string",          "media_type": "text/plain",          "preview": "string",          "size_bytes": 0,          "truncated": false        },        "property2": {          "id": "string",          "media_type": "text/plain",          "preview": "string",          "size_bytes": 0,          "truncated": false        }      },      "ended_at": "2019-08-24T14:15:22Z",      "first_stream_id": "string",      "id": "string",      "kind": "text_message",      "last_stream_id": "string",      "ordinal": 1,      "started_at": "2019-08-24T14:15:22Z",      "state": "in_progress"    }  ],  "run": {    "agent_id": "string",    "agent_revision_id": "string",    "attempts": 0,    "cancel_requested_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "current_attempt_id": "string",    "environment_mounts": [      {        "environment_id": "string",        "name": "string",        "permission_ceiling": {          "operations": [            "environment.file.copy_destination",            "environment.file.copy_source",            "environment.file.list",            "environment.file.mkdir",            "environment.file.move",            "environment.file.patch_text",            "environment.file.query",            "environment.file.read_bytes",            "environment.file.read_text",            "environment.file.remove",            "environment.file.search_text",            "environment.file.stat",            "environment.file.write_bytes",            "environment.file.write_text",            "environment.output.read",            "environment.output.release",            "environment.port.inspect",            "environment.port.wait",            "environment.process.close_stdin",            "environment.process.inspect",            "environment.process.kill",            "environment.process.list",            "environment.process.read_output",            "environment.process.release",            "environment.process.signal",            "environment.process.start",            "environment.process.wait",            "environment.process.write_stdin",            "environment.shell.exec",            "environment.state.export",            "environment.state.restore"          ]        },        "working_directory": "string"      }    ],    "failure": {      "code": "string",      "message": "string"    },    "id": "string",    "input": {      "property1": null,      "property2": null    },    "labels": {      "property1": "string",      "property2": "string"    },    "lineage": "root",    "max_attempts": 0,    "memory_mounts": [      {        "access": "read",        "memory_id": "string",        "name": "string",        "recall": true      }    ],    "options": {      "configuration": {        "allowed_hosts": [          "string"        ],        "extensions": {          "property1": null,          "property2": null        }      },      "context": {        "headers": {          "property1": "string",          "property2": "string"        }      },      "execution": {        "environment": {          "property1": "string",          "property2": "string"        },        "steering": "boundary",        "tools": {          "foreground_wait_seconds": 0,          "mode": "inline"        }      },      "labels": {        "property1": "string",        "property2": "string"      },      "max_usage": {        "requests": 1      },      "overrides": {        "builtin_skills": [          "platform-operations"        ],        "client_tools": [          {            "description": "string",            "instruction": "string",            "metadata": {              "property1": null,              "property2": null            },            "name": "string",            "parameters_json_schema": {              "property1": null,              "property2": null            },            "permission": "inherit"          }        ],        "connection_tools": [          {            "connection_id": "string",            "permission": "inherit",            "permissions": {              "property1": "allow",              "property2": "allow"            },            "tools": [              "string"            ]          }        ],        "instructions": "string",        "lazy_environment": true,        "media_understanding": {          "audio": "string",          "image": "string",          "video": "string"        },        "model": "string",        "model_characteristics": {          "compact_threshold": 0.9,          "context_window_tokens": 1,          "proactive_context_management_threshold": 0.65        },        "model_settings": {          "property1": null,          "property2": null        },        "output_spec": {          "description": "string",          "name": "string",          "resources": {},          "schema": {            "property1": null,            "property2": null          },          "variants": [            {              "description": "string",              "name": "string",              "resources": {},              "schema": {                "property1": null,                "property2": null              }            },            {              "description": "string",              "name": "string",              "resources": {},              "schema": {                "property1": null,                "property2": null              }            }          ]        },        "plugins": [          {            "config": {              "property1": null,              "property2": null            },            "instance_name": "string",            "plugin_key": "string"          }        ],        "retries": {          "output": 0,          "tools": 0        },        "reviewer": {          "instruction": "string",          "model": "string",          "model_settings": {            "property1": null,            "property2": null          },          "on_error": "deny",          "on_flagged": "deny",          "risk_threshold": "low",          "rules": {            "property1": {              "on_flagged": "deny",              "risk_threshold": "low"            },            "property2": {              "on_flagged": "deny",              "risk_threshold": "low"            }          },          "shell_instruction": "string",          "timeout_seconds": 120        },        "skill_sync": {          "cleanup": false,          "mode": "shared",          "overwrite": true        },        "skills": [          {            "revision_id": "string",            "skill_id": "string"          }        ],        "subagents": {},        "tool_search": {          "config": {            "call_name": "call_tool",            "describe_name": "describe_tool",            "groups_name": "list_tool_groups",            "list_name": "list_tools",            "max_results": 10,            "max_search_bytes": 32768,            "mode": "proxy",            "search_name": "discover_tools"          },          "groups": {            "property1": {              "capabilities": [],              "connections": [],              "description": "string",              "platform": false,              "plugins": []            },            "property2": {              "capabilities": [],              "connections": [],              "description": "string",              "platform": false,              "plugins": []            }          }        },        "toolsets": {          "property1": {            "config": {              "property1": null,              "property2": null            },            "enabled": true,            "tools": {}          },          "property2": {            "config": {              "property1": null,              "property2": null            },            "enabled": true,            "tools": {}          }        }      }    },    "output": null,    "parent_run_id": "string",    "pending": {      "approvals": [        {          "arguments": {            "property1": null,            "property2": null          },          "presentation": {            "property1": null,            "property2": null          },          "tool_call_id": "string",          "tool_name": "string"        }      ],      "calls": [        {          "arguments": {            "property1": null,            "property2": null          },          "presentation": {            "property1": null,            "property2": null          },          "tool_call_id": "string",          "tool_name": "string"        }      ],      "desktop_control_id": "string"    },    "principal_id": "string",    "resume": {      "approvals": {        "property1": {          "action": "approve"        },        "property2": {          "action": "approve"        }      },      "calls": {        "property1": {          "status": "returned",          "value": null        },        "property2": {          "status": "returned",          "value": null        }      },      "input": {        "content": [          {            "text": "string",            "type": "text"          }        ]      }    },    "resumed_by_id": "string",    "revision_selection": "pinned",    "schedule_origin": {      "occurrence_id": "string",      "schedule_id": "string"    },    "sealed_at": "2019-08-24T14:15:22Z",    "session_id": "string",    "source_entry_id": "string",    "started_at": "2019-08-24T14:15:22Z",    "status": "accepted",    "thread_id": "string",    "trigger": "input",    "updated_at": "2019-08-24T14:15:22Z",    "usage_at_seal": {      "property1": null,      "property2": null    },    "version": 0,    "wait_reason": "approval",    "workspace_id": "string"  }}