diff options
Diffstat (limited to 'data/zh_cn/agentloop/2026-05-20')
| -rw-r--r-- | data/zh_cn/agentloop/2026-05-20/api-docs.php | 5818 |
1 files changed, 5818 insertions, 0 deletions
diff --git a/data/zh_cn/agentloop/2026-05-20/api-docs.php b/data/zh_cn/agentloop/2026-05-20/api-docs.php new file mode 100644 index 0000000..c42a87a --- /dev/null +++ b/data/zh_cn/agentloop/2026-05-20/api-docs.php @@ -0,0 +1,5818 @@ +<?php return [ + 'version' => '1.0', + 'info' => ['style' => 'ROA', 'product' => 'AgentLoop', 'version' => '2026-05-20'], + 'directories' => [ + [ + 'children' => ['DescribeRegions'], + 'type' => 'directory', + 'title' => '地域', + 'id' => 455911, + ], + [ + 'children' => ['ExecuteQuery', 'UpdateDataset', 'CreateDataset', 'DeleteDataset', 'ListDatasets', 'GetDataset'], + 'type' => 'directory', + 'title' => '数据集', + 'id' => 455912, + ], + [ + 'children' => ['CreateAgentSpace', 'UpdateAgentSpace', 'ListAgentSpaces', 'GetAgentSpace', 'DeleteAgentSpace'], + 'type' => 'directory', + 'title' => '智能体空间', + 'id' => 455913, + ], + [ + 'children' => [ + [ + 'children' => ['ListEvaluationTasks', 'GetEvaluationTask', 'CreateEvaluationTask', 'UpdateEvaluationTask', 'DeleteEvaluationTask', 'ListEvaluationRuns', 'GetEvaluationRun', 'UpdateEvaluationRun', 'DeleteEvaluationRun'], + 'type' => 'directory', + 'title' => '评估任务', + 'id' => 459328, + ], + [ + 'children' => ['ListEvaluators', 'GetEvaluator', 'CreateEvaluator', 'UpdateEvaluator', 'DeleteEvaluator', 'ListEvaluatorSkills', 'GetEvaluatorSkill', 'CreateEvaluatorSkill', 'UpdateEvaluatorSkill', 'DeleteEvaluatorSkill'], + 'type' => 'directory', + 'title' => '评估器', + 'id' => 459325, + ], + ], + 'type' => 'directory', + 'title' => '评估', + 'id' => 459324, + ], + [ + 'children' => [ + 'UpdateContextStore', 'DeletePipeline', 'DeleteContextStoreAPIKey', 'CreateContextStoreAPIKey', 'ListContextStores', 'ListContextStoreAPIKeys', 'GetContextStoreAPIKey', 'ListPipelines', 'GetContextStore', 'GetPipeline', 'SearchContext', 'DeleteContextStore', 'UpdatePipeline', 'CreateContextStore', 'AddDatasetData', 'CancelPipelineRun', 'GetPipelineRun', 'GetPipelineStats', 'ListPipelineRuns', 'PausePipeline', + 'ResumePipeline', 'RunPipeline', 'TerminatePipeline', + ], + 'type' => 'directory', + 'title' => '其他', + 'id' => 455914, + ], + ], + 'components' => [ + 'schemas' => [ + 'BackfillStrategy' => [ + 'description' => '历史数据回填评估策略,用于指定一次回填运行的时间范围和触发方式。', + 'type' => 'object', + 'properties' => [ + 'enabled' => [ + 'description' => '是否启用回填策略。不传或 true 表示启用;false 表示关闭但保留配置。', + 'type' => 'boolean', + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'true', + ], + 'startTime' => ['description' => '回填时间范围起点,Unix 毫秒时间戳。需要手动启动回填时应提供完整时间范围。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000000'], + 'endTime' => ['description' => '回填时间范围终点,Unix 毫秒时间戳。需要手动启动回填时应提供完整时间范围。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782902400000'], + ], + 'example' => '{"enabled":true,"startTime":1782816000000,"endTime":1782902400000,"immediate":false}', + ], + 'ConnectorProperties' => [ + 'type' => 'object', + 'properties' => [ + 'protocol' => ['title' => '协议类型:openai / openai-compatible / anthropic(model_service必填)', 'type' => 'string'], + 'modelList' => ['title' => '支持的模型列表,逗号分隔格式(model_service必填)', 'type' => 'string'], + 'channelType' => ['title' => '通道类型:custom / apig(model_service可选,默认custom)', 'type' => 'string'], + 'vpcId' => ['title' => 'VPC ID(agent_app可选)', 'type' => 'string'], + 'securityGroupId' => ['title' => '安全组ID(agent_app可选)', 'type' => 'string'], + 'vSwitchId' => ['title' => '交换机ID(agent_app可选)', 'type' => 'string'], + 'responseBodyPath' => ['title' => '响应体JSON Path提取路径(agent_app可选)', 'type' => 'string'], + 'network' => ['title' => '网络类型:internet / aliyun-vpc', 'type' => 'string'], + 'region' => ['title' => '地域(aliyun-vpc时必填)', 'type' => 'string'], + 'dryRunRequestBody' => ['title' => 'dryRun=All且type=agent_app时必填,用户提供的示例请求体,用于验证端点连通性(不持久化)', 'type' => 'string'], + ], + ], + 'ContinuousStrategy' => [ + 'description' => '持续评估策略,用于按固定时间窗口持续评估新增数据。', + 'type' => 'object', + 'properties' => [ + 'enabled' => [ + 'description' => '是否启用持续评估。不传或 true 表示启用;false 表示关闭但保留配置。', + 'type' => 'boolean', + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'true', + ], + 'intervalUnit' => [ + 'description' => '持续评估窗口间隔单位。当前轮询实现需要该字段。', + 'type' => 'string', + 'enumValueTitles' => ['HOUR' => 'HOUR', 'MINUTE' => 'MINUTE', 'DAY' => 'DAY'], + 'example' => 'HOUR', + ], + 'intervalValue' => ['description' => '持续评估窗口间隔大小,需要与 intervalUnit 配合使用,取值应大于 0。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'dataDelayMinutes' => ['description' => '数据到达延迟时间,单位为分钟。窗口结束后延迟该时间再创建运行,用于等待数据完整到达;不传默认为 0。', 'type' => 'integer', 'format' => 'int32', 'example' => '5'], + ], + 'example' => '{"enabled":true,"intervalUnit":"HOUR","intervalValue":1,"dataDelayMinutes":5}', + ], + 'DataFilter' => [ + 'description' => '评估任务的数据筛选条件,用于控制数据查询条件、单次输入内容、采样比例和最大评估数量。', + 'type' => 'object', + 'properties' => [ + 'query' => ['description' => '数据查询过滤条件,会与评估器级 filters.query 共同生效。Trace 场景可填写服务名、环境、标签等过滤表达式。', 'type' => 'string', 'example' => 'serviceName=\'checkout-service\''], + 'maxRecords' => ['description' => '最大评估记录数,对 backfill 和 continuous 运行都生效。未传时后端不额外写入默认值。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'samplingRate' => [ + 'description' => '采样率百分比,取值 0 到 100。0 或不传表示不采样;100 表示全量;小于 100 时先随机采样,再应用 maxRecords 限制。', + 'type' => 'integer', + 'format' => 'int32', + 'enumValueTitles' => ['0-100' => '0-100'], + 'example' => '100', + ], + 'provided' => ['description' => '单次临时评估输入内容,主要用于 oneshot 任务。值会按字符串保存;对象或数组值会被序列化为 JSON 字符串。', 'type' => 'object', 'example' => '{"input":"用户查询订单状态","output":"已查询到订单状态"}'], + ], + 'example' => '{"query":"serviceName=\'checkout-service\'","maxRecords":10,"samplingRate":100}', + ], + 'Evaluator' => [ + 'description' => '评估任务中的评估器配置,用于引用已创建的评估器,或以内联方式描述本次任务使用的评估器。', + 'type' => 'object', + 'properties' => [ + 'evaluatorRef' => ['title' => '评估器引用ID(引用已注册评估器时使用)', 'description' => '已注册评估器的引用名称。传入后优先按该引用加载评估器定义,支持内置评估器和自定义评估器。', 'type' => 'string', 'example' => 'Builtin.agent_task_completion'], + 'name' => ['title' => '评估器名称', 'description' => '评估器名称。未传 evaluatorRef 的内联评估器场景必填;同一任务内 evaluatorRef 或 name 不能重复。', 'type' => 'string', 'example' => 'agent_task_completion'], + 'type' => [ + 'title' => '评估器类型:LLM / CODE', + 'description' => '评估器类型。未传时默认 LLM;内联 CODE 评估器当前不支持,CODE 类型请通过 evaluatorRef 引用已创建评估器。', + 'type' => 'string', + 'enumValueTitles' => ['AGENT' => 'AGENT', 'CODE' => 'CODE', 'LLM' => 'LLM'], + 'example' => 'AGENT', + ], + 'resultName' => ['title' => '评分名称', 'description' => '评估结果字段名。内联评估器场景必填;引用已有评估器时未传则使用评估器定义中的 metricName。', 'type' => 'string', 'example' => 'agent_task_completion'], + 'resultType' => [ + 'title' => '结果类型:score / binary / text', + 'description' => '评估结果类型。内联评估器场景必填;引用已有评估器时未传默认为 score。', + 'type' => 'string', + 'enumValueTitles' => ['score' => 'score', 'binary' => 'binary', 'text' => 'text'], + 'example' => 'score', + ], + 'config' => ['title' => '评估器配置(如prompt等)', 'description' => '评估器运行配置。内联 LLM 评估器需要包含 prompt 等配置;引用已有评估器时通常不传,仅在需要指定版本等运行时参数时传入。', 'type' => 'object', 'example' => '{"version":"1.0.0"}'], + 'filters' => ['title' => '数据筛选条件', 'description' => '评估器级数据筛选条件,会与任务级 dataFilter.query 共同生效。', 'type' => 'object', 'example' => '{"query":"serviceName=\'checkout-service\'"}'], + 'variableMapping' => [ + 'title' => '变量映射', + 'description' => '变量映射关系,将评估器变量映射到评估数据字段。LLM/AGENT 内联评估器必填,引用已有评估器时变量名必须存在于评估器定义中。', + 'type' => 'object', + 'additionalProperties' => ['description' => '单个变量映射值,表示该评估器变量读取的评估数据字段路径。', 'type' => 'string', 'example' => 'trace.input'], + 'example' => '{"input":"trace.input","output":"trace.output","agent_trajectory":"trace.agent_trajectory"}', + ], + ], + 'example' => '{"evaluatorRef":"Builtin.agent_task_completion","resultName":"agent_task_completion","resultType":"score","variableMapping":{"input":"trace.input","output":"trace.output","agent_trajectory":"trace.agent_trajectory"}}', + ], + 'ExperimentConfig' => [ + 'type' => 'object', + 'properties' => [ + 'label' => ['title' => '实验标签(A/B/C/D/E)', 'type' => 'string'], + 'name' => ['title' => '实验名称', 'type' => 'string'], + 'modelName' => ['title' => '模型名称(agent场景可填agent)', 'type' => 'string'], + 'modelProvider' => ['title' => '模型提供商:dashscope(默认)/ user / agent', 'type' => 'string'], + 'modelParameters' => ['title' => '模型参数', '$ref' => '#/components/schemas/ModelParameters'], + 'endpointConnectorId' => ['title' => '端点连接器ID(user/agent模式时必填)', 'type' => 'string'], + 'promptTemplate' => [ + 'title' => 'Prompt消息模板,支持{{变量名}}占位符', + 'type' => 'array', + 'items' => ['$ref' => '#/components/schemas/PromptTemplateItem'], + ], + 'requestBodyTemplate' => ['title' => 'Agent请求体模板(agent模式时必填,支持{{变量名}})', 'type' => 'string'], + 'requestMethod' => ['title' => 'Agent请求方法:POST(默认)/ GET', 'type' => 'string'], + ], + ], + 'ExperimentPlanData' => [ + 'type' => 'object', + 'properties' => [ + 'planId' => ['title' => '实验计划ID', 'type' => 'string'], + 'planName' => ['title' => '实验计划名称', 'type' => 'string'], + 'experimentType' => ['title' => '实验类型:offline(离线实验)/ online(在线实验)', 'type' => 'string'], + 'description' => ['title' => '描述信息', 'type' => 'string'], + 'status' => ['title' => '状态:pending/running/stopped', 'type' => 'string'], + 'datasetId' => ['title' => '关联的数据集ID', 'type' => 'string'], + 'querySql' => ['title' => 'dataset-partial 模式下的自定义查询SQL子句', 'type' => 'string'], + 'experimentCount' => ['title' => '该计划下的实验执行次数', 'type' => 'integer', 'format' => 'int32'], + 'createdAt' => ['title' => '创建时间(毫秒时间戳)', 'type' => 'integer', 'format' => 'int64'], + 'updatedAt' => ['title' => '更新时间(毫秒时间戳)', 'type' => 'integer', 'format' => 'int64'], + ], + ], + 'ExperimentRecord' => [ + 'type' => 'object', + 'properties' => [ + 'recordId' => ['title' => '实验记录ID', 'type' => 'string'], + 'recordName' => ['title' => '实验记录名称', 'type' => 'string'], + 'experimentPlanId' => ['title' => '关联的实验计划ID', 'type' => 'string'], + 'planName' => ['title' => '关联的实验计划名称', 'type' => 'string'], + 'status' => ['title' => '状态:pending/running/completed/failed', 'type' => 'string'], + 'totalTasks' => ['title' => '总任务数', 'type' => 'integer', 'format' => 'int32'], + 'failedTasks' => ['title' => '失败任务数', 'type' => 'integer', 'format' => 'int32'], + 'completedTasks' => ['title' => '已完成任务数', 'type' => 'integer', 'format' => 'int32'], + 'progress' => ['title' => '执行进度(0-1)', 'type' => 'number', 'format' => 'float'], + 'executedAt' => ['title' => '执行时间(毫秒时间戳)', 'type' => 'integer', 'format' => 'int64'], + 'completedAt' => ['title' => '完成时间(毫秒时间戳)', 'type' => 'integer', 'format' => 'int64'], + 'datasetId' => ['title' => '数据集ID', 'type' => 'string'], + 'experimentConfig' => [ + 'title' => '实验配置列表', + 'type' => 'array', + 'items' => ['$ref' => '#/components/schemas/ExperimentConfig'], + ], + 'dataSourceType' => ['title' => '数据源类型:simple/dataset-full/dataset-partial', 'type' => 'string'], + 'modelNames' => [ + 'title' => '使用的模型名称列表', + 'type' => 'array', + 'items' => ['type' => 'string'], + ], + 'errorMessage' => ['title' => '错误信息', 'type' => 'string'], + 'datasetProject' => ['title' => '数据集所在的SLS Project', 'type' => 'string'], + 'evaluators' => [ + 'title' => '评估器列表', + 'type' => 'array', + 'items' => ['$ref' => '#/components/schemas/Evaluator'], + ], + 'input' => ['title' => 'SIMPLE模式下的单行输入', 'type' => 'object'], + 'selectedItemIds' => [ + 'title' => 'dataset-partial 模式下选定的数据项ID列表', + 'type' => 'array', + 'items' => ['type' => 'string'], + ], + 'querySql' => ['title' => 'dataset-partial 模式下的自定义查询SQL子句', 'type' => 'string'], + 'evaluationTaskId' => ['title' => '关联的评估任务ID', 'type' => 'string'], + ], + ], + 'IndexJsonKey' => [ + 'type' => 'object', + 'properties' => [ + 'type' => ['type' => 'string'], + 'chn' => ['type' => 'boolean'], + ], + ], + 'IndexKey' => [ + 'type' => 'object', + 'properties' => [ + 'chn' => ['type' => 'boolean'], + 'type' => ['type' => 'string'], + 'embedding' => ['type' => 'string'], + 'jsonKeys' => [ + 'type' => 'object', + 'additionalProperties' => ['$ref' => '#/components/schemas/IndexJsonKey'], + ], + ], + ], + 'ModelParameters' => [ + 'type' => 'object', + 'properties' => [ + 'temperature' => ['title' => '温度参数,控制输出随机性,范围0-2', 'type' => 'number', 'format' => 'float'], + 'maxTokens' => ['title' => '最大输出Token数', 'type' => 'integer', 'format' => 'int64'], + 'topP' => ['title' => 'Top P 采样参数,范围0-1', 'type' => 'number', 'format' => 'float'], + 'topK' => ['title' => 'Top K 采样参数,范围1-100', 'type' => 'integer', 'format' => 'int32'], + 'frequencyPenalty' => ['title' => '频率惩罚,正值减少重复,范围-2.0到2.0', 'type' => 'number', 'format' => 'float'], + 'presencePenalty' => ['title' => '存在惩罚,正值鼓励新话题,范围-2.0到2.0', 'type' => 'number', 'format' => 'float'], + 'stopSequences' => [ + 'title' => '停止序列,遇到时立即停止生成', + 'type' => 'array', + 'items' => ['type' => 'string'], + ], + ], + ], + 'OfflineExperimentConfig' => [ + 'type' => 'object', + 'properties' => [ + 'label' => ['title' => '实验标签', 'type' => 'string'], + 'name' => ['title' => '实验名称', 'type' => 'string'], + 'desc' => ['title' => '实验描述', 'type' => 'string'], + ], + ], + 'PromptTemplateItem' => [ + 'type' => 'object', + 'properties' => [ + 'role' => ['title' => '角色:system/user/assistant', 'type' => 'string'], + 'content' => ['title' => '内容,支持{{变量名}}占位符', 'type' => 'string'], + ], + ], + 'RunStrategies' => [ + 'description' => '评估任务的运行策略容器,用于配置历史数据回填评估和持续增量评估。', + 'type' => 'object', + 'properties' => [ + 'backfill' => ['description' => '历史批量回填策略。对象存在且 enabled 未显式为 false 时表示启用 backfill。', 'example' => '{"enabled":true,"startTime":1782816000000,"endTime":1782902400000,"immediate":false}', '$ref' => '#/components/schemas/BackfillStrategy'], + 'continuous' => ['description' => '持续评估策略。对象存在且 enabled 未显式为 false 时表示启用 continuous。', 'example' => '{"enabled":true,"intervalUnit":"HOUR","intervalValue":1,"dataDelayMinutes":5}', '$ref' => '#/components/schemas/ContinuousStrategy'], + ], + 'example' => '{"backfill":{"enabled":true,"startTime":1782816000000,"endTime":1782902400000,"immediate":false},"continuous":{"enabled":true,"intervalUnit":"HOUR","intervalValue":1,"dataDelayMinutes":5}}', + ], + ], + ], + 'apis' => [ + 'AddDatasetData' => [ + 'path' => '/agentspace/{agentSpace}/dataset/{datasetName}/rows', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => false, 'example' => 'sop-agent'], + ], + [ + 'name' => 'datasetName', + 'in' => 'path', + 'schema' => ['description' => '数据集名称', 'type' => 'string', 'required' => false, 'example' => 'product_faq_dataset'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体,必须包含 dataArray。', + 'type' => 'object', + 'properties' => [ + 'dataArray' => [ + 'description' => '待追加写入的数据行数组。数组不能为空;服务端流式读取;请求体默认最大 100MB;单请求事务内 all-or-nothing。', + 'type' => 'array', + 'items' => [ + 'description' => '单行数据对象。key 为 id 或 Dataset schema 中定义的字段名;字段名大小写不敏感;未知字段会报错。', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'any', 'example' => '"hello" / 123 / 0.98 / {"a":1}', 'description' => 'schema 字段值。未传或传 null 写入空值;text 传 string,long 传整数或整数字符串,double 传有限数字或数字字符串,json 传任意合法 JSON 值。'], + ], + 'required' => false, + ], + ], + 'required' => false, + 'example' => '{"dataArray":[{"content":"hello"}]}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['description' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'D0173835-9E0F-508F-8BFA-9F556E59C302'], + 'affectedRows' => ['description' => '扫描/处理的日志行数', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '添加数据集数据', + 'summary' => '向指定 Dataset 追加结构化数据行,避免客户端拼接 SQL。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:AddDatasetData', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpace}/dataset/{#DatasetName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"D0173835-9E0F-508F-8BFA-9F556E59C302\\",\\n \\"affectedRows\\": 100\\n}","type":"json"}]', + ], + 'CancelPipelineRun' => [ + 'summary' => '取消流水线运行', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/runs/{runId}/cancel', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => 'AgentSpace 名称'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + ], + [ + 'name' => 'runId', + 'in' => 'path', + 'schema' => ['title' => '待取消的运行 Id(仅 Pending 可取消)', 'type' => 'string', 'example' => 'run-20260101-0001', 'description' => '待取消的运行 Id(仅 Pending 可取消)'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + 'runId' => ['title' => '被取消的运行 Id', 'type' => 'string', 'example' => 'run-20260101-0001', 'description' => '被取消的运行 Id'], + 'status' => ['title' => '取消后的 Run 状态,固定为 Cancelled', 'type' => 'string', 'example' => 'Cancelled', 'description' => '取消后的 Run 状态,固定为 Cancelled'], + 'finishTime' => ['title' => '取消完成时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:05.000Z', 'description' => '取消完成时间,ISO 8601 UTC 格式'], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:CancelPipelineRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"runId\\": \\"run-20260101-0001\\",\\n \\"status\\": \\"Cancelled\\",\\n \\"finishTime\\": \\"2026-01-01T00:00:05.000Z\\"\\n}","type":"json"}]', + ], + 'CreateAgentSpace' => [ + 'path' => '/agentspace', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求body', + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['description' => 'AgentSpace名称', 'type' => 'string', 'required' => true, 'example' => 'test-agent-space', 'maxLength' => 64, 'minLength' => 2], + 'description' => ['description' => '描述', 'type' => 'string', 'required' => false, 'example' => 'test'], + 'cmsWorkspace' => ['description' => 'CMS 工作空间', 'type' => 'string', 'required' => false, 'example' => 'test-cms-workspace'], + 'trajectoryStoreEnabled' => ['type' => 'boolean'], + ], + 'required' => false, + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求Id', 'type' => 'string', 'example' => 'AA689779-61AB-5077-BD91-9F7EA1205D68'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建AgentSpace', + 'summary' => '创建AgentSpace', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"AA689779-61AB-5077-BD91-9F7EA1205D68\\"\\n}","type":"json"}]', + ], + 'CreateContextStore' => [ + 'summary' => '创建上下文库', + 'path' => '/agentspace/{agentSpace}/contextstore', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,长度 2-64 字符', 'description' => 'AgentSpace 名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '请求体', + 'description' => '请求体', + 'type' => 'object', + 'properties' => [ + 'contextStoreName' => ['title' => '上下文库名称,AgentSpace 内全局唯一,长度 2-64 字符', 'description' => '上下文库名称,AgentSpace 内全局唯一,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-context-store'], + 'contextType' => ['title' => '上下文库类型,枚举值,例如 experience(经验库)、memory(记忆库)等', 'description' => '上下文库类型,枚举值,例如 experience(经验库)、memory(记忆库)等', 'type' => 'string', 'required' => true, 'example' => 'experience'], + 'description' => ['title' => '上下文库描述,便于业务方理解用途', 'description' => '上下文库描述,便于业务方理解用途', 'type' => 'string', 'required' => false, 'example' => '我的上下文库'], + 'config' => [ + 'title' => '上下文库配置,包含数据源、元数据字段映射等', + 'description' => '上下文库配置,包含数据源、元数据字段映射等', + 'type' => 'object', + 'properties' => [ + 'source' => [ + 'title' => '数据源配置,仅作为数据源根标识;可选块', + 'description' => '数据源配置,仅作为数据源根标识;可选块', + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['title' => 'trace 数据源所在的 AgentSpace;不传默认为当前 path 中的 AgentSpace。本期不支持跨 AgentSpace,若传入必须等于 path AgentSpace,否则返回 400 参数错误。创建后不可变更', 'description' => 'trace 数据源所在的 AgentSpace;不传默认为当前 path 中的 AgentSpace。本期不支持跨 AgentSpace,若传入必须等于 path AgentSpace,否则返回 400 参数错误。创建后不可变更', 'type' => 'string', 'required' => false, 'example' => 'my-agent-space'], + 'startTime' => ['title' => '数据回灌起始时间,ISO 8601 UTC 格式;不传表示从当前时间开始', 'description' => '数据回灌起始时间,ISO 8601 UTC 格式;不传表示从当前时间开始', 'type' => 'string', 'format' => 'iso8601_normal', 'required' => false, 'example' => '2026-01-01T00:00:00Z'], + ], + 'required' => false, + ], + 'serviceNames' => [ + 'title' => '服务名列表,必填且非空;与 source.agentSpace 协同定位 trace 数据源(trajectory 抽取服务用 agentSpace 自查绑定的 cms workspace + project/logstore,再按 serviceName 过滤)。创建后不可变更(本期无修改入口)', + 'description' => '服务名列表,必填且非空;与 source.agentSpace 协同定位 trace 数据源(trajectory 抽取服务用 agentSpace 自查绑定的 cms workspace + project/logstore,再按 serviceName 过滤)。创建后不可变更(本期无修改入口)', + 'type' => 'array', + 'items' => ['title' => '服务名', 'description' => '服务名', 'type' => 'string', 'required' => false, 'example' => 'order-service'], + 'required' => true, + 'example' => '["order-service","payment-service"]', + ], + 'metadataField' => [ + 'title' => '元数据字段映射,key 为业务字段,value 为存储字段', + 'description' => '元数据字段映射,key 为业务字段,value 为存储字段', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'description' => ''], + 'example' => '{"userId":"user_id","sessionId":"session_id"}', + ], + 'miningInterval' => [ + 'title' => '经验挖掘间隔,控制多久执行一次经验挖掘;可选 1h/6h/12h/1d,默认 1d。创建后不可变更', + 'description' => '经验挖掘间隔,控制多久执行一次经验挖掘;可选 1h/6h/12h/1d,默认 1d。创建后不可变更', + 'type' => 'string', + 'required' => false, + 'example' => '1d', + 'default' => '1d', + 'enum' => ['1h', '6h', '12h', '1d'], + ], + ], + 'required' => false, + ], + ], + 'required' => false, + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\"\\n}","type":"json"}]', + ], + 'CreateContextStoreAPIKey' => [ + 'summary' => '创建 API Key', + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}/apikey', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'description' => 'AgentSpace 名称', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space'], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '上下文库名称', 'description' => '上下文库名称', 'type' => 'string', 'required' => true, 'example' => 'my-context-store'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '请求体', + 'description' => '请求体', + 'type' => 'object', + 'properties' => [ + 'name' => ['title' => 'API Key 的显示名称,用于标识用途', 'description' => 'API Key 的显示名称,用于标识用途', 'type' => 'string', 'required' => true, 'example' => 'my-api-key'], + ], + 'required' => false, + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + 'apiKey' => ['title' => '完整的 API Key 值', 'description' => '完整的 API Key 值', 'type' => 'string', 'example' => 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], + 'name' => ['title' => 'API Key 的名称', 'description' => 'API Key 的名称', 'type' => 'string', 'example' => 'my-api-key'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateContextStoreAPIKey', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"apiKey\\": \\"sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\",\\n \\"name\\": \\"my-api-key\\"\\n}","type":"json"}]', + ], + 'CreateDataset' => [ + 'path' => '/agentspace/{agentSpace}/dataset', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => true, 'example' => 'testxx', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体', + 'type' => 'object', + 'properties' => [ + 'datasetName' => ['description' => '数据集名称', 'type' => 'string', 'required' => true, 'example' => 'product_faq_dataset', 'maxLength' => 64, 'minLength' => 2], + 'description' => ['description' => '数据集描述', 'type' => 'string', 'required' => false, 'example' => 'Product FAQ dataset for semantic search'], + 'schema' => [ + 'description' => '数据集结构', + 'type' => 'object', + 'required' => true, + 'additionalProperties' => ['$ref' => '#/components/schemas/IndexKey', 'description' => '数据集结构'], + ], + ], + 'required' => false, + 'example' => '{'."\n" + .' "datasetName": "product_faq_dataset",'."\n" + .' "description": "Product FAQ dataset for semantic search",'."\n" + .' "schema": {'."\n" + .' "title": {'."\n" + .' "type": "string",'."\n" + .' "chn": false,'."\n" + .' "embedding": "false"'."\n" + .' },'."\n" + .' "content": {'."\n" + .' "type": "string",'."\n" + .' "chn": false,'."\n" + .' "embedding": "true"'."\n" + .' },'."\n" + .' "metadata": {'."\n" + .' "type": "json",'."\n" + .' "chn": false,'."\n" + .' "embedding": "false",'."\n" + .' "jsonKeys": {'."\n" + .' "author": {'."\n" + .' "type": "string",'."\n" + .' "chn": false'."\n" + .' },'."\n" + .' "source": {'."\n" + .' "type": "string",'."\n" + .' "chn": false'."\n" + .' },'."\n" + .' "publishDate": {'."\n" + .' "type": "string",'."\n" + .' "chn": false'."\n" + .' }'."\n" + .' }'."\n" + .' }'."\n" + .' }'."\n" + .'}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'EB27D183-8F6C-5C5A-A6A3-E0508AF54F78'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建数据集', + 'summary' => '创建数据集', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"EB27D183-8F6C-5C5A-A6A3-E0508AF54F78\\"\\n}","type":"json"}]', + ], + 'CreateEvaluationTask' => [ + 'path' => '/api/v1/evaluation-task/{agentSpace}', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。', + 'type' => 'object', + 'properties' => [ + 'taskName' => ['description' => '任务名称,同一用户同一 AgentSpace 下不能与未删除任务重名,长度不超过 256 字符。', 'type' => 'string', 'required' => false, 'example' => 'trace_task_completion_eval'], + 'taskMode' => [ + 'description' => '评估任务模式。`batch` 创建持久评估任务。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['batch' => 'batch'], + 'example' => 'batch', + ], + 'dataType' => [ + 'description' => '评估对象的数据来源类型。链路 Trace 评估使用 `trace`。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['trace' => 'trace', 'log' => 'log', 'atif' => 'atif', 'dataset' => 'dataset'], + 'example' => 'trace', + ], + 'dataFilter' => ['description' => '评估数据筛选条件,支持 JSON 对象或 JSON 字符串。常用字段包括 `query`、`provided`、`maxRecords`、`samplingRate`。', 'type' => 'string', 'required' => false, 'example' => '{"query":"serviceName=\'checkout-service\'","maxRecords":10,"samplingRate":100}'], + 'evaluators' => [ + 'description' => '评估器配置列表,不能为空。同一任务内以 `evaluatorRef` 优先,否则以 `name` 作为唯一标识。', + 'type' => 'array', + 'items' => ['description' => '单个评估器配置对象。', 'required' => false, '$ref' => '#/components/schemas/Evaluator'], + 'required' => false, + 'example' => '[{"evaluatorRef":"Builtin.agent_task_completion","resultName":"agent_task_completion","resultType":"score","variableMapping":{"input":"trace.input","output":"trace.output","agent_trajectory":"trace.agent_trajectory"}}]', + ], + 'channel' => [ + 'description' => '任务来源。未传时后端默认为 `default`。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['default' => 'default'], + 'example' => 'default', + ], + 'config' => [ + 'description' => '数据源和执行配置。`dataType=trace` 时后端自动补齐 SLS Project 和 `storeName=logstore-tracing`;链路级 Trace 评估建议传 `dataScope=trace`。', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'description' => '单个配置项的值,键名由具体字段约定决定。', 'example' => 'trace'], + 'example' => '{"dataScope":"trace"}', + ], + 'tags' => [ + 'description' => '任务标签键值对。默认无需传递;仅在需要按业务标签关联或过滤任务时传入。', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'description' => '单个任务标签值,键名按业务维度自定义。', 'example' => 'prod'], + 'example' => '{"env":"prod","serviceId":"checkout-service","planId":"plan-20260703"}', + ], + 'runStrategies' => ['description' => '任务执行策略,支持 JSON 对象或 JSON 字符串。`backfill` 用于历史数据回填,`continuous` 用于持续评估新增数据。', 'required' => false, '$ref' => '#/components/schemas/RunStrategies'], + 'description' => ['description' => '评估任务描述。', 'type' => 'string', 'required' => false, 'example' => '评估线上 Agent 链路任务完成度'], + ], + 'required' => false, + 'example' => '{"taskName":"trace_task_completion_eval","taskMode":"batch","dataType":"trace","evaluators":[{"evaluatorRef":"Builtin.agent_task_completion","resultName":"agent_task_completion","resultType":"score","variableMapping":{"input":"trace.input","output":"trace.output","agent_trajectory":"trace.agent_trajectory"}}],"config":{"dataScope":"trace"}}', + ], + ], + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token。CloudSpec 声明了该查询参数,当前后端未做幂等比对。', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'taskId' => ['description' => '评估任务 ID。', 'type' => 'string', 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + 'status' => [ + 'description' => '评估任务状态。创建后通常为 `Pending`,异步编排后可能进入 `Running` 或 `Scheduling`。', + 'type' => 'string', + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Scheduling' => 'Scheduling', 'Deleted' => 'Deleted', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Pending', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建评估任务', + 'summary' => '创建评估任务。', + 'description' => '调用 CreateEvaluationTask 在指定 AgentSpace 下创建评估任务。服务端会校验 AgentSpace 权限、初始化评估结果存储、检查任务名称唯一性,并根据 `taskMode` 与 `runStrategies` 异步创建和执行 EvaluationRun。'."\n" + ."\n" + .'该接口适用于对 Trace、Dataset 或 SLS Log 数据运行内置或自定义评估器,支持历史回填和持续评估两类执行策略。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"taskId\\": \\"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25\\",\\n \\"status\\": \\"Pending\\"\\n}","type":"json"}]', + ], + 'CreateEvaluator' => [ + 'path' => '/api/v1/evaluators/{agentSpace}', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。', + 'type' => 'object', + 'properties' => [ + 'name' => ['description' => '评估器名称,不能以系统保留前缀开头,最长 128 字符。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + 'displayName' => ['description' => '显示名称,最长 128 字符。', 'type' => 'string', 'required' => false, 'example' => '链路任务完成度'], + 'type' => [ + 'description' => '评估器类型。`LLM` 表示内联大模型评估器,`AGENT` 表示 StarOps 数字员工评估器,`CODE` 表示代码评估器。', + 'type' => 'string', + 'required' => true, + 'enumValueTitles' => ['AGENT' => 'AGENT', 'CODE' => 'CODE', 'LLM' => 'LLM'], + 'example' => 'AGENT', + ], + 'description' => ['description' => '评估器描述,最长 256 字符。', 'type' => 'string', 'required' => false, 'example' => '判断 Agent 是否完成用户任务'], + 'metricName' => ['description' => '评估指标名称。', 'type' => 'string', 'required' => true, 'example' => 'agent_task_completion'], + 'version' => ['description' => '初始版本号。', 'type' => 'string', 'required' => true, 'example' => '1.0.0'], + 'versionDescription' => ['description' => '版本描述。', 'type' => 'string', 'required' => false, 'example' => '初始版本'], + 'config' => ['description' => '评估器配置。LLM/AGENT 常包含 prompt、variables、outputSchema;CODE 常包含 codeType、faasConfig、variables、parameters。', 'type' => 'object', 'required' => false, 'example' => '{"prompt":"请评估任务完成度","variables":[{"name":"input"}]}'], + 'annotations' => [ + 'description' => '注解标记列表。', + 'type' => 'array', + 'items' => ['description' => '单个注解标记。', 'type' => 'string', 'required' => false, 'example' => '__en'], + 'required' => false, + 'example' => '["__en"]', + ], + 'properties' => ['description' => '评估器属性。', 'type' => 'object', 'required' => false, 'example' => '{"agentEvaluatorMode":"raw_prompt"}'], + ], + 'required' => false, + 'example' => '{"name":"trace_task_completion","displayName":"链路任务完成度","type":"AGENT","metricName":"agent_task_completion","version":"1.0.0"}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token。CloudSpec 声明了该查询参数,当前后端未做幂等比对。', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'name' => ['description' => '评估器名称。', 'type' => 'string', 'example' => 'trace_task_completion'], + 'version' => ['description' => '创建的版本号。', 'type' => 'string', 'example' => '1.0.0'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建评估器', + 'summary' => '创建评估器。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"name\\": \\"trace_task_completion\\",\\n \\"version\\": \\"1.0.0\\"\\n}","type":"json"}]', + ], + 'CreateEvaluatorSkill' => [ + 'summary' => '创建评估器技能。', + 'path' => '/api/v1/evaluator/{name}/skill', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。', + 'type' => 'object', + 'properties' => [ + 'skillName' => ['description' => '技能名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_context_loader'], + 'displayName' => ['description' => '技能显示名称。', 'type' => 'string', 'required' => false, 'example' => 'Trace 上下文读取'], + 'description' => ['description' => '技能描述。', 'type' => 'string', 'required' => false, 'example' => '读取链路上下文辅助评估'], + 'enable' => [ + 'description' => '是否启用技能。', + 'type' => 'boolean', + 'required' => false, + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'true', + ], + 'files' => [ + 'description' => '技能文件列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个技能文件对象。', + 'type' => 'object', + 'properties' => [ + 'name' => ['description' => '技能文件名。', 'type' => 'string', 'required' => true, 'example' => 'SKILL.md'], + 'content' => ['description' => '技能文件内容。', 'type' => 'string', 'required' => true, 'example' => '# Trace Context Loader'], + 'remark' => ['description' => '文件备注。', 'type' => 'string', 'required' => false, 'example' => '主技能说明'], + ], + 'required' => false, + 'example' => '{"name":"SKILL.md"}', + ], + 'required' => true, + 'example' => '[{"name":"SKILL.md","content":"# Trace Context Loader","remark":"主技能说明"}]', + ], + ], + 'required' => false, + 'example' => '{"skillName":"trace_context_loader","displayName":"Trace 上下文读取","enable":true,"files":[{"name":"SKILL.md","content":"# Trace Context Loader"}]}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证创建操作幂等', 'description' => '幂等 Token。CloudSpec 声明了该查询参数,当前后端未做幂等比对。', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'skillName' => ['description' => '创建的技能名称。', 'type' => 'string', 'example' => 'trace_context_loader'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建评估器技能', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"skillName\\": \\"trace_context_loader\\"\\n}","type":"json"}]', + ], + 'DeleteAgentSpace' => [ + 'summary' => '删除AgentSpace', + 'path' => '/agentspace/{agentSpace}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace名称', 'type' => 'string', 'required' => true, 'example' => 'test-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'deleteMseNamespace', + 'in' => 'query', + 'schema' => [ + 'description' => '是否删除绑定的 MSE 命名空间', + 'type' => 'boolean', + 'required' => false, + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'false', + 'default' => 'false', + ], + ], + [ + 'name' => 'deleteSlsProject', + 'in' => 'query', + 'schema' => [ + 'description' => '是否删除绑定的 SLS Project', + 'type' => 'boolean', + 'required' => false, + 'enumValueTitles' => ['true' => 'true'], + 'example' => 'false', + ], + ], + [ + 'name' => 'deleteCmsWorkspace', + 'in' => 'query', + 'schema' => [ + 'description' => '是否删除绑定的 云监控2.0 工作空间', + 'type' => 'boolean', + 'required' => false, + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'false', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求Id', 'type' => 'string', 'example' => 'D0173835-9E0F-508F-8BFA-9F556E59C302'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除AgentSpace', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"D0173835-9E0F-508F-8BFA-9F556E59C302\\"\\n}","type":"json"}]', + ], + 'DeleteContextStore' => [ + 'summary' => '删除上下文库', + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,长度 2-64 字符', 'description' => 'AgentSpace 名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '待删除的上下文库名称,长度 2-64 字符', 'description' => '待删除的上下文库名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-context-store', 'maxLength' => 64, 'minLength' => 2], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\"\\n}","type":"json"}]', + ], + 'DeleteContextStoreAPIKey' => [ + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}/apikey/{name}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'description' => 'AgentSpace 名称', 'type' => 'string', 'required' => false, 'example' => 'my-agent-space'], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '上下文库名称', 'description' => '上下文库名称', 'type' => 'string', 'required' => false, 'example' => 'my-context-store'], + ], + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['title' => '待删除的 API Key 显示名称', 'description' => '待删除的 API Key 显示名称', 'type' => 'string', 'required' => false, 'example' => 'my-api-key'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'summary' => '删除 API Key', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteContextStoreAPIKey', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\"\\n}","type":"json"}]', + ], + 'DeleteDataset' => [ + 'path' => '/agentspace/{agentSpace}/dataset/{datasetName}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => true, 'example' => 'sop-agent', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'datasetName', + 'in' => 'path', + 'schema' => ['description' => '数据集名称', 'type' => 'string', 'required' => true, 'example' => 'product_faq_dataset', 'maxLength' => 64, 'minLength' => 2], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除数据集', + 'summary' => '删除数据集', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'DeleteEvaluationRun' => [ + 'summary' => '删除评估运行。', + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}/run/{runId}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + [ + 'name' => 'runId', + 'in' => 'path', + 'schema' => ['description' => '评估运行 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除评估运行', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'DeleteEvaluationTask' => [ + 'summary' => '删除评估任务。', + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除评估任务', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'DeleteEvaluator' => [ + 'summary' => '删除评估器。', + 'path' => '/api/v1/evaluators/{agentSpace}/{name}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'version', + 'in' => 'query', + 'schema' => ['description' => '指定要删除的版本。不传则删除整个评估器。', 'type' => 'string', 'required' => false, 'example' => '1.0.0'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除评估器', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'DeleteEvaluatorSkill' => [ + 'summary' => '删除评估器技能。', + 'path' => '/api/v1/evaluator/{name}/skill/{skillName}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'skillName', + 'in' => 'path', + 'schema' => ['description' => '技能名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_context_loader'], + ], + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除评估器技能', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'DeletePipeline' => [ + 'summary' => '删除流水线', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}', + 'methods' => ['delete'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,定位待删除流水线所在的 AgentSpace', 'description' => 'AgentSpace 名称,定位待删除流水线所在的 AgentSpace', 'type' => 'string', 'required' => false, 'example' => 'my-agent-space'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '待删除的流水线名称', 'description' => '待删除的流水线名称', 'type' => 'string', 'required' => false, 'example' => 'my-pipeline'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '删除Pipeline', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeletePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\"\\n}","type":"json"}]', + ], + 'DescribeRegions' => [ + 'summary' => '查询Regions', + 'path' => '/regions', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ + [ + 'name' => 'language', + 'in' => 'query', + 'schema' => ['description' => '语言,可传参数'."\n" + .'- zh:中文'."\n" + .'- en:英语', 'type' => 'string', 'required' => true, 'example' => 'zh', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '最大请求数量', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '50'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => '分页Token', 'type' => 'string', 'required' => false, 'example' => 'dXkC1NeQkVKHWkVfOvIVEp4dD+2BRJj42DLT6GrZysw='], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求Id', 'type' => 'string', 'example' => '4FDD8668-516C-5183-9BCF-4CAD8E3CF327'], + 'regions' => [ + 'description' => '地域信息', + 'type' => 'array', + 'items' => [ + 'description' => '地域信息', + 'type' => 'object', + 'properties' => [ + 'regionId' => ['description' => '地域ID', 'type' => 'string', 'example' => 'cn-hangzhou'], + 'internetEndpoint' => ['description' => '公网地址', 'type' => 'string', 'example' => 'agentloop.cn-hangzhou.aliyuncs.com'], + 'vpcEndpoint' => ['description' => '内网地址', 'type' => 'string', 'example' => 'agentloop.cn-hangzhou.aliyuncs.com'], + 'localName' => ['description' => '地域名称', 'type' => 'string', 'example' => '华东1(杭州)'], + ], + ], + ], + 'nextToken' => ['description' => '分页Token,没有下一页则为空', 'type' => 'string', 'example' => 'ydx438PDAW1lYRJZbBn9'], + 'maxResults' => ['description' => '一次获取的最大记录数', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询地域信息', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"4FDD8668-516C-5183-9BCF-4CAD8E3CF327\\",\\n \\"regions\\": [\\n {\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"internetEndpoint\\": \\"agentloop.cn-hangzhou.aliyuncs.com\\",\\n \\"vpcEndpoint\\": \\"agentloop.cn-hangzhou.aliyuncs.com\\",\\n \\"localName\\": \\"华东1(杭州)\\"\\n }\\n ],\\n \\"nextToken\\": \\"ydx438PDAW1lYRJZbBn9\\",\\n \\"maxResults\\": 100\\n}","type":"json"}]', + ], + 'ExecuteQuery' => [ + 'path' => '/agentspace/{agentSpace}/dataset/{datasetName}/query', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => true, 'example' => 'sop-agent', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'datasetName', + 'in' => 'path', + 'schema' => ['description' => '数据集名称', 'type' => 'string', 'required' => true, 'example' => 'product_faq_dataset', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体参数。', + 'type' => 'object', + 'properties' => [ + 'type' => ['description' => '语句类型(当前仅支持传SQL)', 'type' => 'string', 'required' => true, 'example' => 'SQL'], + 'query' => ['description' => '用户输入的query', 'type' => 'string', 'required' => true, 'example' => 'select count(*) from product_faq_dataset'], + 'maxOutputLength' => ['type' => 'integer', 'format' => 'int32'], + 'from' => ['type' => 'integer', 'format' => 'int32'], + 'to' => ['type' => 'integer', 'format' => 'int32'], + 'offset' => ['type' => 'integer', 'format' => 'int32'], + 'length' => ['type' => 'integer', 'format' => 'int32'], + 'version' => ['type' => 'string'], + ], + 'required' => false, + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求ID', 'type' => 'string', 'example' => 'EB27D183-8F6C-5C5A-A6A3-E0508AF54F78'], + 'meta' => [ + 'description' => '返回数据meta信息', + 'type' => 'object', + 'properties' => [ + 'affectedRows' => ['description' => '扫描/处理的日志行数', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'elapsedMillisecond' => ['description' => '本次执行消耗的毫秒时间', 'type' => 'integer', 'format' => 'int64', 'example' => '15'], + 'progress' => ['title' => '查询的结果是否完整', 'description' => '查询的结果是否完整', 'type' => 'string', 'example' => 'Complete'], + 'count' => ['title' => '本次查询请求返回的日志行数。', 'description' => '本次查询请求返回的日志行数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'truncation' => [ + 'type' => 'object', + 'properties' => [ + 'truncated' => ['type' => 'boolean'], + 'truncatedColumnIndexes' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'array', + 'items' => ['type' => 'integer', 'format' => 'int32'], + ], + ], + ], + ], + ], + ], + 'columns' => [ + 'description' => '结果列信息', + 'type' => 'array', + 'items' => ['description' => '结果列', 'type' => 'string', 'example' => 'column1'], + ], + 'columnTypes' => [ + 'description' => '结果列类型', + 'type' => 'array', + 'items' => ['description' => '列类型', 'type' => 'string', 'example' => 'double'], + ], + 'rows' => [ + 'description' => '结果行', + 'type' => 'array', + 'items' => [ + 'description' => '结果行', + 'type' => 'array', + 'items' => ['description' => '结果行中某一列', 'type' => 'any', 'example' => '1.2'], + ], + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '执行语句', + 'summary' => '执行查询语句。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:ExecuteQuery', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"EB27D183-8F6C-5C5A-A6A3-E0508AF54F78\\",\\n \\"meta\\": {\\n \\"affectedRows\\": 100,\\n \\"elapsedMillisecond\\": 15,\\n \\"progress\\": \\"Complete\\",\\n \\"count\\": 1,\\n \\"truncation\\": {\\n \\"truncated\\": true,\\n \\"truncatedColumnIndexes\\": [\\n [\\n 0\\n ]\\n ]\\n }\\n },\\n \\"columns\\": [\\n \\"column1\\"\\n ],\\n \\"columnTypes\\": [\\n \\"double\\"\\n ],\\n \\"rows\\": [\\n [\\n \\"1.2\\"\\n ]\\n ]\\n}","type":"json"}]', + ], + 'GetAgentSpace' => [ + 'summary' => '查询AgentSpace', + 'path' => '/agentspace/{agentSpace}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace名称', 'type' => 'string', 'required' => true, 'example' => 'test-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求Id', 'type' => 'string', 'example' => 'D0173835-9E0F-508F-8BFA-9F556E59C302'], + 'agentSpace' => ['description' => 'AgentSpace名称', 'type' => 'string', 'example' => 'test-agent-space'], + 'description' => ['description' => '描述', 'type' => 'string', 'example' => 'test'], + 'cmsWorkspace' => ['description' => 'CMS 工作空间', 'type' => 'string', 'example' => 'test-cms-workspace'], + 'mseNamespace' => [ + 'description' => 'MSE 命名空间', + 'type' => 'object', + 'properties' => [ + 'namespaceName' => ['description' => 'MSE 命名空间名称', 'type' => 'string', 'example' => 'terraform-alicloud-modules'], + 'namespaceId' => ['description' => 'MSE 命名空间ID', 'type' => 'string', 'example' => 'emr-dataware'], + ], + ], + 'slsProject' => ['description' => '日志服务项目名称', 'type' => 'string', 'example' => 'default-cms-1837787111545040-cn-beijing'], + 'regionId' => ['description' => '地域 ID', 'type' => 'string', 'example' => 'cn-hangzhou'], + 'createTime' => ['description' => '创建时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-05-05T12:39:36Z'], + 'updateTime' => ['description' => '更新时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2025-10-20T02:28:14Z'], + 'cmsWorkspaceBindType' => [ + 'description' => '云监控2.0 工作空间绑定类型', + 'type' => 'string', + 'enumValueTitles' => ['AutoCreated' => 'AutoCreated', 'UserSelected' => 'UserSelected'], + 'example' => 'AutoCreated', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询AgentSpace信息', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"D0173835-9E0F-508F-8BFA-9F556E59C302\\",\\n \\"agentSpace\\": \\"test-agent-space\\",\\n \\"description\\": \\"test\\",\\n \\"cmsWorkspace\\": \\"test-cms-workspace\\",\\n \\"mseNamespace\\": {\\n \\"namespaceName\\": \\"terraform-alicloud-modules\\",\\n \\"namespaceId\\": \\"emr-dataware\\"\\n },\\n \\"slsProject\\": \\"default-cms-1837787111545040-cn-beijing\\",\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"createTime\\": \\"2026-05-05T12:39:36Z\\",\\n \\"updateTime\\": \\"2025-10-20T02:28:14Z\\",\\n \\"cmsWorkspaceBindType\\": \\"AutoCreated\\"\\n}","type":"json"}]', + ], + 'GetContextStore' => [ + 'summary' => '查询上下文库', + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,长度 2-64 字符', 'description' => 'AgentSpace 名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '上下文库名称,长度 2-64 字符', 'description' => '上下文库名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-context-store', 'maxLength' => 64, 'minLength' => 2], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + 'contextStoreName' => ['title' => '上下文库名称', 'description' => '上下文库名称', 'type' => 'string', 'example' => 'my-context-store'], + 'agentSpace' => ['title' => '归属的 AgentSpace 名称', 'description' => '归属的 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space'], + 'regionId' => ['title' => '上下文库所在地域 Id', 'description' => '上下文库所在地域 Id', 'type' => 'string', 'example' => 'cn-hangzhou'], + 'contextType' => ['title' => '上下文库类型,例如 experience(经验库)、memory(记忆库)等', 'description' => '上下文库类型,例如 experience(经验库)、memory(记忆库)等', 'type' => 'string', 'example' => 'experience'], + 'description' => ['title' => '上下文库描述', 'description' => '上下文库描述', 'type' => 'string', 'example' => '我的上下文库'], + 'status' => ['title' => '上下文库状态,枚举值,例如 ACTIVE / INITIALIZING / FAILED', 'description' => '上下文库状态,枚举值,例如 ACTIVE / INITIALIZING / FAILED', 'type' => 'string', 'example' => 'ACTIVE'], + 'config' => [ + 'title' => '上下文库配置', + 'description' => '上下文库配置', + 'type' => 'object', + 'properties' => [ + 'source' => [ + 'title' => '用户传入的数据源配置,仅作为数据源根标识', + 'description' => '用户传入的数据源配置,仅作为数据源根标识', + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['title' => 'trace 数据源所在的 AgentSpace;与创建时归属 AgentSpace 一致', 'description' => 'trace 数据源所在的 AgentSpace;与创建时归属 AgentSpace 一致', 'type' => 'string', 'example' => 'my-agent-space'], + 'startTime' => ['title' => '数据回灌起始时间,ISO 8601 UTC 格式', 'description' => '数据回灌起始时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z'], + ], + ], + 'serviceNames' => [ + 'title' => '服务名列表,与 source.agentSpace 协同定位 trace 数据源;本期不可变更', + 'description' => '服务名列表,与 source.agentSpace 协同定位 trace 数据源;本期不可变更', + 'type' => 'array', + 'items' => ['title' => '服务名', 'description' => '服务名', 'type' => 'string', 'example' => 'order-service'], + 'example' => '["order-service","payment-service"]', + ], + 'metadataField' => [ + 'title' => '元数据字段映射,key 为业务字段,value 为存储字段', + 'description' => '元数据字段映射,key 为业务字段,value 为存储字段', + 'type' => 'object', + 'additionalProperties' => ['type' => 'string', 'description' => ''], + 'example' => '{"userId":"user_id","sessionId":"session_id"}', + ], + 'miningInterval' => [ + 'title' => '经验挖掘间隔,可选 1h/6h/12h/1d,默认 1d', + 'description' => '经验挖掘间隔,可选 1h/6h/12h/1d,默认 1d', + 'type' => 'string', + 'example' => '1d', + 'enum' => ['1h', '6h', '12h', '1d'], + ], + ], + ], + 'createTime' => ['title' => '上下文库创建时间,ISO 8601 UTC 格式', 'description' => '上下文库创建时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z'], + 'updateTime' => ['title' => '上下文库最近一次更新时间,ISO 8601 UTC 格式', 'description' => '上下文库最近一次更新时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-02T00:00:00Z'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"contextStoreName\\": \\"my-context-store\\",\\n \\"agentSpace\\": \\"my-agent-space\\",\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"contextType\\": \\"experience\\",\\n \\"description\\": \\"我的上下文库\\",\\n \\"status\\": \\"ACTIVE\\",\\n \\"config\\": {\\n \\"source\\": {\\n \\"agentSpace\\": \\"my-agent-space\\",\\n \\"startTime\\": \\"2026-01-01T00:00:00Z\\"\\n },\\n \\"serviceNames\\": [\\n \\"order-service\\"\\n ],\\n \\"metadataField\\": {\\n \\"key\\": \\"\\"\\n },\\n \\"miningInterval\\": \\"1d\\"\\n },\\n \\"createTime\\": \\"2026-01-01T00:00:00Z\\",\\n \\"updateTime\\": \\"2026-01-02T00:00:00Z\\"\\n}","type":"json"}]', + ], + 'GetContextStoreAPIKey' => [ + 'summary' => '获取 API Key', + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}/apikey/{name}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'description' => 'AgentSpace 名称', 'type' => 'string', 'required' => false, 'example' => 'my-agent-space'], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '上下文库名称', 'description' => '上下文库名称', 'type' => 'string', 'required' => false, 'example' => 'my-context-store'], + ], + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['title' => 'API Key 的显示名称', 'description' => 'API Key 的显示名称', 'type' => 'string', 'required' => false, 'example' => 'my-api-key'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + 'name' => ['title' => 'API Key 的显示名称', 'description' => 'API Key 的显示名称', 'type' => 'string', 'example' => 'my-api-key'], + 'apiKey' => ['title' => 'API Key 脱敏前缀(形如 sk-abcd****),出于安全不回显完整明文', 'description' => 'API Key 脱敏前缀(形如 sk-abcd****),出于安全不回显完整明文', 'type' => 'string', 'example' => 'sk-abcd****'], + 'createTime' => ['title' => 'API Key 创建时间,ISO 8601 UTC 格式', 'description' => 'API Key 创建时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z'], + 'agentSpace' => ['title' => '归属的 AgentSpace 名称', 'description' => '归属的 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space'], + 'contextStoreName' => ['title' => '归属的上下文库名称', 'description' => '归属的上下文库名称', 'type' => 'string', 'example' => 'my-context-store'], + 'regionId' => ['title' => 'API Key 所在地域 Id', 'description' => 'API Key 所在地域 Id', 'type' => 'string', 'example' => 'cn-hangzhou'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetContextStoreAPIKey', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"name\\": \\"my-api-key\\",\\n \\"apiKey\\": \\"sk-abcd****\\",\\n \\"createTime\\": \\"2026-01-01T00:00:00Z\\",\\n \\"agentSpace\\": \\"my-agent-space\\",\\n \\"contextStoreName\\": \\"my-context-store\\",\\n \\"regionId\\": \\"cn-hangzhou\\"\\n}","type":"json"}]', + ], + 'GetDataset' => [ + 'summary' => '查询数据集', + 'path' => '/agentspace/{agentSpace}/dataset/{datasetName}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => true, 'example' => 'sop-agent', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'datasetName', + 'in' => 'path', + 'schema' => ['description' => '数据集名称', 'type' => 'string', 'required' => true, 'example' => 'product_faq_dataset', 'maxLength' => 64, 'minLength' => 2], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'description' => ['description' => '数据集描述', 'type' => 'string', 'example' => 'Product FAQ dataset for semantic search'], + 'createTime' => ['description' => '创建时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-06-15T10:30:00Z'], + 'requestId' => ['description' => '请求ID', 'type' => 'string', 'example' => 'D17DE39E-6C62-50E3-9EB7-FDE41BB0D43D'], + 'updateTime' => ['description' => '更新时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-06-15T11:20:00Z'], + 'agentSpace' => ['description' => '智能体空间名称', 'type' => 'string', 'example' => 'sop-agent'], + 'datasetName' => ['description' => '数据集名称', 'type' => 'string', 'example' => 'product_faq_dataset'], + 'regionId' => ['description' => '地域 ID', 'type' => 'string', 'example' => 'cn-beijing'], + 'schema' => [ + 'description' => '数据集表结构', + 'type' => 'object', + 'additionalProperties' => ['$ref' => '#/components/schemas/IndexKey', 'description' => '数据集表结构'], + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取数据集', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"description\\": \\"Product FAQ dataset for semantic search\\",\\n \\"createTime\\": \\"2026-06-15T10:30:00Z\\",\\n \\"requestId\\": \\"D17DE39E-6C62-50E3-9EB7-FDE41BB0D43D\\",\\n \\"updateTime\\": \\"2026-06-15T11:20:00Z\\",\\n \\"agentSpace\\": \\"sop-agent\\",\\n \\"datasetName\\": \\"product_faq_dataset\\",\\n \\"regionId\\": \\"cn-beijing\\",\\n \\"schema\\": {\\n \\"key\\": {\\n \\"chn\\": true,\\n \\"type\\": \\"\\",\\n \\"embedding\\": \\"\\",\\n \\"jsonKeys\\": {\\n \\"key\\": {\\n \\"type\\": \\"\\",\\n \\"chn\\": true\\n }\\n }\\n }\\n }\\n}","type":"json"}]', + ], + 'GetEvaluationRun' => [ + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}/run/{runId}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + [ + 'name' => 'runId', + 'in' => 'path', + 'schema' => ['description' => '评估运行 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'runId' => ['description' => '运行 ID。', 'type' => 'string', 'example' => 'eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a'], + 'runName' => ['description' => '运行名称。', 'type' => 'string', 'example' => 'trace_task_completion_eval-backfill'], + 'taskId' => ['description' => '评估任务 ID。', 'type' => 'string', 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + 'runType' => [ + 'description' => '运行类型。', + 'type' => 'string', + 'enumValueTitles' => ['continuous' => 'continuous', 'backfill' => 'backfill', 'continuous_parent' => 'continuous_parent'], + 'example' => 'backfill', + ], + 'status' => [ + 'description' => '运行状态。', + 'type' => 'string', + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Running', + ], + 'totalCount' => ['description' => '总评估条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'successCount' => ['description' => '成功条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '96'], + 'failedCount' => ['description' => '失败条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4'], + 'evaluatorProgress' => [ + 'description' => '评估器维度进度列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个评估器进度对象。', + 'type' => 'object', + 'properties' => [ + 'evaluatorName' => ['description' => '评估器名称。', 'type' => 'string', 'example' => 'Builtin.agent_task_completion'], + 'totalCount' => ['description' => '该评估器总条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'successCount' => ['description' => '该评估器成功条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '96'], + 'failedCount' => ['description' => '该评估器失败条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4'], + ], + 'example' => '{"evaluatorName":"Builtin.agent_task_completion"}', + ], + 'example' => '[{"evaluatorName":"Builtin.agent_task_completion","totalCount":100,"successCount":96,"failedCount":4}]', + ], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + 'evaluators' => ['description' => '运行创建时的评估器配置快照,JSON 字符串。', 'type' => 'string', 'example' => '[{"evaluatorRef":"Builtin.agent_task_completion"}]'], + 'dataStartTime' => ['description' => '运行数据窗口起始时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'dataEndTime' => ['description' => '运行数据窗口结束时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782902400'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取评估运行详情', + 'summary' => '获取评估运行详情', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"runId\\": \\"eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a\\",\\n \\"runName\\": \\"trace_task_completion_eval-backfill\\",\\n \\"taskId\\": \\"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25\\",\\n \\"runType\\": \\"backfill\\",\\n \\"status\\": \\"Running\\",\\n \\"totalCount\\": 100,\\n \\"successCount\\": 96,\\n \\"failedCount\\": 4,\\n \\"evaluatorProgress\\": [\\n {\\n \\"evaluatorName\\": \\"Builtin.agent_task_completion\\",\\n \\"totalCount\\": 100,\\n \\"successCount\\": 96,\\n \\"failedCount\\": 4\\n }\\n ],\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600,\\n \\"evaluators\\": \\"[{\\\\\\"evaluatorRef\\\\\\":\\\\\\"Builtin.agent_task_completion\\\\\\"}]\\",\\n \\"dataStartTime\\": 1782816000,\\n \\"dataEndTime\\": 1782902400\\n}","type":"json"}]', + ], + 'GetEvaluationTask' => [ + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'taskId' => ['description' => '评估任务 ID。', 'type' => 'string', 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + 'taskName' => ['description' => '任务名称。', 'type' => 'string', 'example' => 'trace_task_completion_eval'], + 'agentSpace' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'example' => 'prod-agentspace'], + 'taskMode' => [ + 'description' => '评估任务模式。', + 'type' => 'string', + 'enumValueTitles' => ['batch' => 'batch'], + 'example' => 'batch', + ], + 'dataType' => [ + 'description' => '评估对象的数据来源类型。', + 'type' => 'string', + 'enumValueTitles' => ['trace' => 'trace', 'log' => 'log', 'atif' => 'atif', 'dataset' => 'dataset'], + 'example' => 'trace', + ], + 'evaluators' => [ + 'description' => '评估器配置列表。', + 'type' => 'array', + 'items' => ['description' => '单个评估器配置对象。', 'example' => '{"evaluatorRef":"Builtin.agent_task_completion"}', '$ref' => '#/components/schemas/Evaluator'], + 'example' => '[{"evaluatorRef":"Builtin.agent_task_completion","resultName":"agent_task_completion","resultType":"score","variableMapping":{"input":"trace.input","output":"trace.output","agent_trajectory":"trace.agent_trajectory"}}]', + ], + 'status' => [ + 'description' => '评估任务状态。', + 'type' => 'string', + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Scheduling' => 'Scheduling', 'Deleted' => 'Deleted', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Running', + ], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '最近更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + 'dataFilter' => ['description' => '评估数据筛选条件,后端以 JSON 字符串形式返回。', 'type' => 'string', 'example' => '{"query":"serviceName=\'checkout-service\'","maxRecords":10,"samplingRate":100}'], + 'channel' => [ + 'description' => '任务来源。', + 'type' => 'string', + 'enumValueTitles' => ['default' => 'default'], + 'example' => 'default', + ], + 'config' => [ + 'description' => '数据源和执行配置。`dataType=trace` 任务通常包含后端补齐的 `project`、`storeName` 和 `dataScope`。', + 'type' => 'object', + 'additionalProperties' => ['type' => 'string', 'example' => 'trace', 'description' => '单个配置项的值,键名由具体字段约定决定。'], + 'example' => '{"project":"agentspace-project","storeName":"logstore-tracing","dataScope":"trace"}', + ], + 'tags' => [ + 'description' => '任务标签键值对。未设置时为空。', + 'type' => 'object', + 'additionalProperties' => ['type' => 'string', 'description' => '单个任务标签值,键名按业务维度自定义。', 'example' => 'prod'], + 'example' => '{"serviceId":"checkout-service","env":"prod"}', + ], + 'regionId' => ['description' => '任务所属地域。', 'type' => 'string', 'example' => 'cn-hangzhou'], + 'runStrategyConfig' => ['description' => '运行策略结构化配置,解析后的回填策略和持续评估策略。', 'example' => '{"backfill":{"enabled":true,"startTime":1782816000000,"endTime":1782902400000},"continuous":{"enabled":true,"intervalUnit":"HOUR","intervalValue":1,"dataDelayMinutes":5}}', '$ref' => '#/components/schemas/RunStrategies'], + 'description' => ['description' => '评估任务描述。', 'type' => 'string', 'example' => '评估线上 Agent 链路任务完成度'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询评估任务详情', + 'summary' => '获取评估任务详情', + 'responseParamsDescription' => '镇元最新契约中,查询响应不再返回 runStrategies 原始 JSON 字符串字段,调用方应读取 runStrategyConfig 获取结构化运行策略。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"taskId\\": \\"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25\\",\\n \\"taskName\\": \\"trace_task_completion_eval\\",\\n \\"agentSpace\\": \\"prod-agentspace\\",\\n \\"taskMode\\": \\"batch\\",\\n \\"dataType\\": \\"trace\\",\\n \\"evaluators\\": [\\n {\\n \\"evaluatorRef\\": \\"Builtin.agent_task_completion\\",\\n \\"name\\": \\"agent_task_completion\\",\\n \\"type\\": \\"AGENT\\",\\n \\"resultName\\": \\"agent_task_completion\\",\\n \\"resultType\\": \\"score\\",\\n \\"config\\": {\\n \\"version\\": \\"1.0.0\\"\\n },\\n \\"filters\\": {\\n \\"query\\": \\"serviceName=\'checkout-service\'\\"\\n },\\n \\"variableMapping\\": {\\n \\"key\\": \\"trace.input\\"\\n }\\n }\\n ],\\n \\"status\\": \\"Running\\",\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600,\\n \\"dataFilter\\": \\"{\\\\\\"query\\\\\\":\\\\\\"serviceName=\'checkout-service\'\\\\\\",\\\\\\"maxRecords\\\\\\":10,\\\\\\"samplingRate\\\\\\":100}\\",\\n \\"channel\\": \\"default\\",\\n \\"config\\": {\\n \\"key\\": \\"trace\\"\\n },\\n \\"tags\\": {\\n \\"key\\": \\"prod\\"\\n },\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"runStrategyConfig\\": {\\n \\"backfill\\": {\\n \\"enabled\\": true,\\n \\"startTime\\": 1782816000000,\\n \\"endTime\\": 1782902400000\\n },\\n \\"continuous\\": {\\n \\"enabled\\": true,\\n \\"intervalUnit\\": \\"HOUR\\",\\n \\"intervalValue\\": 1,\\n \\"dataDelayMinutes\\": 5\\n }\\n },\\n \\"description\\": \\"评估线上 Agent 链路任务完成度\\"\\n}","type":"json"}]', + ], + 'GetEvaluator' => [ + 'summary' => '获取评估器详情。', + 'path' => '/api/v1/evaluators/{agentSpace}/{name}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'version', + 'in' => 'query', + 'schema' => ['description' => '目标版本号。不传则使用最新版本。', 'type' => 'string', 'required' => false, 'example' => '1.0.0'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'evaluator' => [ + 'description' => '评估器详情。', + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'example' => 'prod-agentspace'], + 'name' => ['description' => '评估器名称。', 'type' => 'string', 'example' => 'trace_task_completion'], + 'displayName' => ['description' => '显示名称。', 'type' => 'string', 'example' => '链路任务完成度'], + 'metricName' => ['description' => '评估指标名称。', 'type' => 'string', 'example' => 'agent_task_completion'], + 'type' => [ + 'description' => '评估器类型。', + 'type' => 'string', + 'enumValueTitles' => ['AGENT' => 'AGENT', 'CODE' => 'CODE', 'LLM' => 'LLM'], + 'example' => 'AGENT', + ], + 'description' => ['description' => '评估器描述。', 'type' => 'string', 'example' => '判断 Agent 是否完成用户任务'], + 'latestVersion' => ['description' => '最新版本号。', 'type' => 'string', 'example' => '1.0.0'], + 'currentVersion' => ['description' => '当前返回的版本号。', 'type' => 'string', 'example' => '1.0.0'], + 'config' => ['description' => '当前版本配置。', 'type' => 'object', 'example' => '{"prompt":"请评估任务完成度"}'], + 'properties' => ['description' => '评估器属性。', 'type' => 'object', 'example' => '{"agentEvaluatorMode":"raw_prompt"}'], + 'versions' => [ + 'description' => '版本列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个版本对象。', + 'type' => 'object', + 'properties' => [ + 'version' => ['description' => '版本号。', 'type' => 'string', 'example' => '1.0.0'], + 'versionDescription' => ['description' => '版本描述。', 'type' => 'string', 'example' => '初始版本'], + 'createdAt' => ['description' => '版本创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + ], + 'example' => '{"version":"1.0.0"}', + ], + 'example' => '[{"version":"1.0.0"}]', + ], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + 'annotations' => [ + 'description' => '注解标记列表。', + 'type' => 'array', + 'items' => ['description' => '单个注解标记。', 'type' => 'string', 'example' => '__en'], + 'example' => '["__en"]', + ], + ], + 'example' => '{"name":"trace_task_completion","type":"AGENT","currentVersion":"1.0.0"}', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取评估器详情', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"evaluator\\": {\\n \\"agentSpace\\": \\"prod-agentspace\\",\\n \\"name\\": \\"trace_task_completion\\",\\n \\"displayName\\": \\"链路任务完成度\\",\\n \\"metricName\\": \\"agent_task_completion\\",\\n \\"type\\": \\"AGENT\\",\\n \\"description\\": \\"判断 Agent 是否完成用户任务\\",\\n \\"latestVersion\\": \\"1.0.0\\",\\n \\"currentVersion\\": \\"1.0.0\\",\\n \\"config\\": {\\n \\"prompt\\": \\"请评估任务完成度\\"\\n },\\n \\"properties\\": {\\n \\"agentEvaluatorMode\\": \\"raw_prompt\\"\\n },\\n \\"versions\\": [\\n {\\n \\"version\\": \\"1.0.0\\",\\n \\"versionDescription\\": \\"初始版本\\",\\n \\"createdAt\\": 1782816000\\n }\\n ],\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600,\\n \\"annotations\\": [\\n \\"__en\\"\\n ]\\n }\\n}","type":"json"}]', + ], + 'GetEvaluatorSkill' => [ + 'path' => '/api/v1/evaluator/{name}/skill/{skillName}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'skillName', + 'in' => 'path', + 'schema' => ['description' => '技能名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_context_loader'], + ], + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'version', + 'in' => 'query', + 'schema' => ['description' => '技能版本。', 'type' => 'string', 'required' => false, 'example' => '1782816000000'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'skill' => [ + 'description' => '技能详情。', + 'type' => 'object', + 'properties' => [ + 'skillName' => ['description' => '技能名称。', 'type' => 'string', 'example' => 'trace_context_loader'], + 'displayName' => ['description' => '显示名称。', 'type' => 'string', 'example' => 'Trace 上下文读取'], + 'description' => ['description' => '技能描述。', 'type' => 'string', 'example' => '读取链路上下文辅助评估'], + 'enable' => [ + 'description' => '是否启用技能。', + 'type' => 'boolean', + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'true', + ], + 'currentVersion' => ['description' => '当前版本。', 'type' => 'string', 'example' => '1782816000000'], + 'latestVersion' => ['description' => '最新版本。', 'type' => 'string', 'example' => '1782816000000'], + 'files' => [ + 'description' => '技能文件列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个技能文件对象。', + 'type' => 'object', + 'properties' => [ + 'name' => ['description' => '文件名。', 'type' => 'string', 'example' => 'SKILL.md'], + 'content' => ['description' => '文件内容。', 'type' => 'string', 'example' => '# Trace Context Loader'], + 'remark' => ['description' => '文件备注。', 'type' => 'string', 'example' => '主技能说明'], + ], + 'example' => '{"name":"SKILL.md"}', + ], + 'example' => '[{"name":"SKILL.md","content":"# Trace Context Loader","remark":"主技能说明"}]', + ], + 'versions' => [ + 'description' => '技能版本列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个版本对象。', + 'type' => 'object', + 'properties' => [ + 'version' => ['description' => '版本号。', 'type' => 'string', 'example' => '1782816000000'], + 'versionDescription' => ['description' => '版本描述。', 'type' => 'string', 'example' => '首次发布版本'], + 'createdAt' => ['description' => '版本创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + ], + 'example' => '{"version":"1.0.0"}', + ], + 'example' => '[{"version":"1782816000000","versionDescription":"首次发布版本"}]', + ], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + ], + 'example' => '{"skillName":"trace_context_loader","enable":true,"currentVersion":"1782816000000"}', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取评估器技能详情', + 'summary' => '获取评估器技能详情。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"skill\\": {\\n \\"skillName\\": \\"trace_context_loader\\",\\n \\"displayName\\": \\"Trace 上下文读取\\",\\n \\"description\\": \\"读取链路上下文辅助评估\\",\\n \\"enable\\": true,\\n \\"currentVersion\\": \\"1782816000000\\",\\n \\"latestVersion\\": \\"1782816000000\\",\\n \\"files\\": [\\n {\\n \\"name\\": \\"SKILL.md\\",\\n \\"content\\": \\"# Trace Context Loader\\",\\n \\"remark\\": \\"主技能说明\\"\\n }\\n ],\\n \\"versions\\": [\\n {\\n \\"version\\": \\"1782816000000\\",\\n \\"versionDescription\\": \\"首次发布版本\\",\\n \\"createdAt\\": 1782816000\\n }\\n ],\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600\\n }\\n}","type":"json"}]', + ], + 'GetPipeline' => [ + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['type' => 'string', 'example' => 'my-agent-space'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => ''], + 'pipelineName' => ['type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + 'description' => ['type' => 'string', 'example' => '我的流水线', 'description' => ''], + 'regionId' => ['type' => 'string', 'example' => 'cn-hangzhou', 'description' => ''], + 'createTime' => ['type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z', 'description' => ''], + 'updateTime' => ['type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-02T00:00:00Z', 'description' => ''], + 'workspace' => ['type' => 'string', 'example' => 'my-workspace', 'description' => ''], + 'source' => [ + 'type' => 'object', + 'properties' => [ + 'type' => ['type' => 'string', 'example' => 'SLS', 'description' => ''], + 'logstore' => [ + 'type' => 'object', + 'properties' => [ + 'project' => ['type' => 'string', 'example' => 'my-sls-project', 'description' => ''], + 'logstore' => ['type' => 'string', 'example' => 'my-sls-logstore', 'description' => ''], + 'query' => ['type' => 'string', 'example' => '* | SELECT *', 'description' => ''], + ], + 'description' => '', + ], + ], + 'description' => '', + ], + 'pipeline' => [ + 'type' => 'object', + 'properties' => [ + 'nodes' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'id' => ['type' => 'string', 'example' => 'node-1', 'description' => ''], + 'type' => ['type' => 'string', 'example' => 'transform', 'description' => ''], + 'parameters' => [ + 'type' => 'object', + 'additionalProperties' => ['type' => 'any', 'example' => 'value', 'description' => ''], + 'description' => '', + ], + ], + 'description' => '', + ], + 'description' => '', + ], + ], + 'description' => '', + ], + 'sink' => [ + 'type' => 'object', + 'properties' => [ + 'type' => ['type' => 'string', 'example' => 'Dataset', 'description' => ''], + 'dataset' => [ + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['type' => 'string', 'example' => 'my-agent-space'], + 'dataset' => ['type' => 'string', 'example' => 'my-dataset', 'description' => ''], + ], + 'description' => '', + ], + ], + 'description' => '', + ], + 'executePolicy' => [ + 'type' => 'object', + 'properties' => [ + 'mode' => ['type' => 'string', 'example' => 'Scheduled', 'description' => ''], + 'runOnce' => [ + 'type' => 'object', + 'properties' => [ + 'fromTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735660800000', 'description' => ''], + 'toTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735747200000', 'description' => ''], + ], + 'description' => '', + ], + 'scheduled' => [ + 'type' => 'object', + 'properties' => [ + 'interval' => ['type' => 'string', 'example' => '1h', 'description' => ''], + 'fromTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735660800000', 'description' => ''], + ], + 'description' => '', + ], + ], + 'description' => '', + ], + 'scheduleStatus' => ['type' => 'string', 'example' => 'Active'], + 'committedWatermark' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735660800'], + 'nextTriggerTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735661100'], + ], + 'description' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询Pipeline', + 'summary' => '查询流水线', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:GetPipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"description\\": \\"我的流水线\\",\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"createTime\\": \\"2026-01-01T00:00:00Z\\",\\n \\"updateTime\\": \\"2026-01-02T00:00:00Z\\",\\n \\"workspace\\": \\"my-workspace\\",\\n \\"source\\": {\\n \\"type\\": \\"SLS\\",\\n \\"logstore\\": {\\n \\"project\\": \\"my-sls-project\\",\\n \\"logstore\\": \\"my-sls-logstore\\",\\n \\"query\\": \\"* | SELECT *\\"\\n }\\n },\\n \\"pipeline\\": {\\n \\"nodes\\": [\\n {\\n \\"id\\": \\"node-1\\",\\n \\"type\\": \\"transform\\",\\n \\"parameters\\": {\\n \\"key\\": \\"value\\"\\n }\\n }\\n ]\\n },\\n \\"sink\\": {\\n \\"type\\": \\"Dataset\\",\\n \\"dataset\\": {\\n \\"agentSpace\\": \\"my-agent-space\\",\\n \\"dataset\\": \\"my-dataset\\"\\n }\\n },\\n \\"executePolicy\\": {\\n \\"mode\\": \\"Scheduled\\",\\n \\"runOnce\\": {\\n \\"fromTime\\": 1735660800000,\\n \\"toTime\\": 1735747200000\\n },\\n \\"scheduled\\": {\\n \\"interval\\": \\"1h\\",\\n \\"fromTime\\": 1735660800000\\n }\\n },\\n \\"scheduleStatus\\": \\"Active\\",\\n \\"committedWatermark\\": 1735660800,\\n \\"nextTriggerTime\\": 1735661100\\n}","type":"json"}]', + ], + 'GetPipelineRun' => [ + 'summary' => '查询流水线单次执行详情', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/runs/{runId}', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => 'AgentSpace 名称'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + ], + [ + 'name' => 'runId', + 'in' => 'path', + 'schema' => ['title' => '运行 Id', 'type' => 'string', 'example' => 'run-20260101-0001', 'description' => '运行 Id'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + 'runId' => ['title' => 'Run Id', 'type' => 'string', 'example' => 'run-20260101-0001', 'description' => 'Run Id'], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + 'agentSpaceName' => ['title' => '所在 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => '所在 AgentSpace 名称'], + 'fromTime' => ['title' => '数据窗口起始,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800', 'description' => '数据窗口起始,unix 秒'], + 'toTime' => ['title' => '数据窗口结束,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735747200', 'description' => '数据窗口结束,unix 秒'], + 'triggerType' => ['title' => '触发类型:Scheduled / Manual / RunOnce', 'type' => 'string', 'example' => 'Scheduled', 'description' => '触发类型:Scheduled / Manual / RunOnce'], + 'triggerTime' => ['title' => '触发时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00.000Z', 'description' => '触发时间,ISO 8601 UTC 格式'], + 'status' => ['title' => 'Run 状态:Pending / Running / Succeeded / Failed / Cancelled', 'type' => 'string', 'example' => 'Succeeded', 'description' => 'Run 状态:Pending / Running / Succeeded / Failed / Cancelled'], + 'attempt' => ['title' => '当前重试次数', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'description' => '当前重试次数'], + 'maxAttempts' => ['title' => '最大重试次数', 'type' => 'integer', 'format' => 'int32', 'example' => '3', 'description' => '最大重试次数'], + 'startTime' => ['title' => '开始执行时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:01.000Z', 'description' => '开始执行时间,ISO 8601 UTC 格式'], + 'finishTime' => ['title' => '结束时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:10.000Z', 'description' => '结束时间,ISO 8601 UTC 格式'], + 'nextRetryTime' => ['title' => '下次重试时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:01:00.000Z', 'description' => '下次重试时间,ISO 8601 UTC 格式'], + 'stats' => [ + 'title' => '运行统计指标,包含:processedRows(处理行数)、processedBytes(处理字节数)、outputRows(输出行数)、outputBytes(输出字节数)、elapsedMs(耗时毫秒)、cpuSec(CPU 秒)、cpuCores(CPU 核数)、tokenCount(Token 消耗数)', + 'type' => 'object', + 'additionalProperties' => ['type' => 'any', 'description' => ''], + 'description' => '运行统计指标,包含:processedRows(处理行数)、processedBytes(处理字节数)、outputRows(输出行数)、outputBytes(输出字节数)、elapsedMs(耗时毫秒)、cpuSec(CPU 秒)、cpuCores(CPU 核数)、tokenCount(Token 消耗数)', + ], + 'errorMessage' => ['title' => '错误信息', 'type' => 'string', 'example' => '', 'description' => '错误信息'], + 'errorCode' => ['title' => '语义错误码', 'type' => 'string', 'example' => '', 'description' => '语义错误码'], + 'results' => [ + 'title' => '内联运行结果(仅当触发时 output.inline=true 才返回)', + 'type' => 'object', + 'additionalProperties' => ['type' => 'any', 'description' => ''], + 'description' => '内联运行结果(仅当触发时 output.inline=true 才返回)', + ], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:GetPipelineRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"runId\\": \\"run-20260101-0001\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"agentSpaceName\\": \\"my-agent-space\\",\\n \\"fromTime\\": 1735660800,\\n \\"toTime\\": 1735747200,\\n \\"triggerType\\": \\"Scheduled\\",\\n \\"triggerTime\\": \\"2026-01-01T00:00:00.000Z\\",\\n \\"status\\": \\"Succeeded\\",\\n \\"attempt\\": 0,\\n \\"maxAttempts\\": 3,\\n \\"startTime\\": \\"2026-01-01T00:00:01.000Z\\",\\n \\"finishTime\\": \\"2026-01-01T00:00:10.000Z\\",\\n \\"nextRetryTime\\": \\"2026-01-01T00:01:00.000Z\\",\\n \\"stats\\": {\\n \\"key\\": \\"\\"\\n },\\n \\"errorMessage\\": \\"\\",\\n \\"errorCode\\": \\"\\",\\n \\"results\\": {\\n \\"key\\": \\"\\"\\n }\\n}","type":"json"}]', + ], + 'GetPipelineStats' => [ + 'summary' => '查询流水线运行统计', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/stats', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => 'AgentSpace 名称'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + ], + [ + 'name' => 'startTime', + 'in' => 'query', + 'schema' => ['title' => '统计窗口起始时间,Unix 秒,默认 now - 86400', 'type' => 'integer', 'format' => 'int64', 'example' => '1735574400'], + ], + [ + 'name' => 'endTime', + 'in' => 'query', + 'schema' => ['title' => '统计窗口结束时间,Unix 秒,默认 now', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800'], + ], + [ + 'name' => 'granularity', + 'in' => 'query', + 'schema' => ['title' => '统计粒度,枚举:Hour | Day | Week | Month,默认自动推断', 'type' => 'string', 'example' => 'Hour'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + 'startTime' => ['title' => '统计窗口起始时间,Unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735574400'], + 'endTime' => ['title' => '统计窗口结束时间,Unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800'], + 'granularity' => ['title' => '统计粒度', 'type' => 'string', 'example' => 'Hour'], + 'summary' => [ + 'title' => '聚合摘要', + 'type' => 'object', + 'properties' => [ + 'totalRuns' => ['title' => '窗口内运行总数', 'type' => 'integer', 'format' => 'int64', 'example' => '44'], + 'succeededRuns' => ['title' => '成功运行数', 'type' => 'integer', 'format' => 'int64', 'example' => '44'], + 'failedRuns' => ['title' => '失败运行数', 'type' => 'integer', 'format' => 'int64', 'example' => '0'], + 'cancelledRuns' => ['title' => '取消运行数', 'type' => 'integer', 'format' => 'int64', 'example' => '0'], + 'successRate' => ['title' => '成功率(0~1)', 'type' => 'number', 'format' => 'double', 'example' => '1.0'], + 'avgElapsedMs' => ['title' => '平均执行耗时,毫秒', 'type' => 'integer', 'format' => 'int64', 'example' => '2500'], + 'totalProcessedRows' => ['title' => '处理总行数', 'type' => 'integer', 'format' => 'int64', 'example' => '1500000'], + 'totalProcessedBytes' => ['title' => '处理总字节数', 'type' => 'integer', 'format' => 'int64', 'example' => '5368709120'], + 'totalOutputRows' => ['title' => '输出总行数', 'type' => 'integer', 'format' => 'int64', 'example' => '1200000'], + 'totalOutputBytes' => ['title' => '输出总字节数', 'type' => 'integer', 'format' => 'int64', 'example' => '3221225472'], + 'committedWatermark' => ['title' => '已提交水位线,Unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800'], + 'scheduleLagSeconds' => ['title' => '调度滞后秒数(now − watermark)', 'type' => 'integer', 'format' => 'int64', 'example' => '120'], + ], + ], + 'timeSeries' => [ + 'title' => '时间序列数据', + 'type' => 'array', + 'items' => [ + 'title' => '时间序列数据点', + 'type' => 'object', + 'properties' => [ + 'timestamp' => ['title' => '时间桶起始时间戳,Unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735574400'], + 'runs' => ['title' => '运行数', 'type' => 'integer', 'format' => 'int64', 'example' => '5'], + 'succeededRuns' => ['title' => '成功运行数', 'type' => 'integer', 'format' => 'int64', 'example' => '5'], + 'processedRows' => ['title' => '处理行数', 'type' => 'integer', 'format' => 'int64', 'example' => '100000'], + 'processedBytes' => ['title' => '处理字节数', 'type' => 'integer', 'format' => 'int64', 'example' => '536870912'], + 'outputRows' => ['title' => '输出行数', 'type' => 'integer', 'format' => 'int64', 'example' => '80000'], + 'outputBytes' => ['title' => '输出字节数', 'type' => 'integer', 'format' => 'int64', 'example' => '322122547'], + 'avgElapsedMs' => ['title' => '平均执行耗时,毫秒', 'type' => 'integer', 'format' => 'int64', 'example' => '2500'], + ], + ], + ], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:GetPipelineStats', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"startTime\\": 1735574400,\\n \\"endTime\\": 1735660800,\\n \\"granularity\\": \\"Hour\\",\\n \\"summary\\": {\\n \\"totalRuns\\": 44,\\n \\"succeededRuns\\": 44,\\n \\"failedRuns\\": 0,\\n \\"cancelledRuns\\": 0,\\n \\"successRate\\": 1,\\n \\"avgElapsedMs\\": 2500,\\n \\"totalProcessedRows\\": 1500000,\\n \\"totalProcessedBytes\\": 5368709120,\\n \\"totalOutputRows\\": 1200000,\\n \\"totalOutputBytes\\": 3221225472,\\n \\"committedWatermark\\": 1735660800,\\n \\"scheduleLagSeconds\\": 120\\n },\\n \\"timeSeries\\": [\\n {\\n \\"timestamp\\": 1735574400,\\n \\"runs\\": 5,\\n \\"succeededRuns\\": 5,\\n \\"processedRows\\": 100000,\\n \\"processedBytes\\": 536870912,\\n \\"outputRows\\": 80000,\\n \\"outputBytes\\": 322122547,\\n \\"avgElapsedMs\\": 2500\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListAgentSpaces' => [ + 'path' => '/agentspace', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace名称', 'type' => 'string', 'required' => false, 'example' => 'test-agent-space'], + ], + [ + 'name' => 'regionId', + 'in' => 'query', + 'schema' => ['type' => 'string'], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '最大结果数', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '50'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => '翻页token。', 'type' => 'string', 'required' => false, 'example' => 'pEL20OGYeZQez8NdW7ve'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'nextToken' => ['description' => '分页Token,没有下一页则为空', 'type' => 'string', 'example' => 'b5754ef15c784abc8696d82790d2985c'], + 'maxResults' => ['description' => '最大返回数量', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'requestId' => ['description' => '请求Id', 'type' => 'string', 'example' => '4E4AC775-2358-5B52-B6FB-171459D7B14B'], + 'total' => ['description' => '总数', 'type' => 'integer', 'format' => 'int32', 'example' => '13'], + 'agentSpaces' => [ + 'description' => 'agentSpaces信息', + 'type' => 'array', + 'items' => [ + 'description' => 'agentSpaces信息', + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['description' => 'AgentSpace名称', 'type' => 'string', 'example' => 'test-agent-space'], + 'description' => ['description' => '描述', 'type' => 'string', 'example' => 'test'], + 'cmsWorkspace' => ['description' => 'CMS 工作空间', 'type' => 'string', 'example' => 'test-cms-workspace'], + 'mseNamespace' => [ + 'description' => 'MSE 命名空间', + 'type' => 'object', + 'properties' => [ + 'namespaceName' => ['description' => 'MSE 命名空间名称', 'type' => 'string', 'example' => 'terraform-alicloud-modules'], + 'namespaceId' => ['description' => 'MSE 命名空间ID', 'type' => 'string', 'example' => 'phoenixcloud-raw-logs'], + ], + ], + 'slsProject' => ['description' => '日志服务项目名称', 'type' => 'string', 'example' => 'default-cms-1152309027070167-cn-beijing'], + 'regionId' => ['description' => '地域ID', 'type' => 'string', 'example' => 'cn-hangzhou'], + 'createTime' => ['description' => '创建时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2023-08-23T04:06:06Z'], + 'updateTime' => ['description' => '更新时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-02-11T08:40:23Z'], + ], + ], + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询AgentSpaces列表', + 'summary' => '查询AgentSpace列表', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListAgentSpaces', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"nextToken\\": \\"b5754ef15c784abc8696d82790d2985c\\",\\n \\"maxResults\\": 100,\\n \\"requestId\\": \\"4E4AC775-2358-5B52-B6FB-171459D7B14B\\",\\n \\"total\\": 13,\\n \\"agentSpaces\\": [\\n {\\n \\"agentSpace\\": \\"test-agent-space\\",\\n \\"description\\": \\"test\\",\\n \\"cmsWorkspace\\": \\"test-cms-workspace\\",\\n \\"mseNamespace\\": {\\n \\"namespaceName\\": \\"terraform-alicloud-modules\\",\\n \\"namespaceId\\": \\"phoenixcloud-raw-logs\\"\\n },\\n \\"slsProject\\": \\"default-cms-1152309027070167-cn-beijing\\",\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"createTime\\": \\"2023-08-23T04:06:06Z\\",\\n \\"updateTime\\": \\"2026-02-11T08:40:23Z\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListContextStoreAPIKeys' => [ + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}/apikey', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'description' => 'AgentSpace 名称', 'type' => 'string', 'required' => false, 'example' => 'my-agent-space'], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '上下文库名称', 'description' => '上下文库名称', 'type' => 'string', 'required' => false, 'example' => 'my-context-store'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['title' => '分页 Token,传入上一次响应中的 nextToken 翻页;首次请求不传', 'description' => '分页 Token,传入上一次响应中的 nextToken 翻页;首次请求不传', 'type' => 'string', 'required' => false, 'example' => 'MTIzNDU2Nzg5MA=='], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['title' => '本次最多返回的 API Key 条数,默认 20,最大 100', 'description' => '本次最多返回的 API Key 条数,默认 20,最大 100', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + 'nextToken' => ['title' => '下一页 Token,空字符串表示已经是最后一页', 'description' => '下一页 Token,空字符串表示已经是最后一页', 'type' => 'string', 'example' => 'MTIzNDU2Nzg5MA=='], + 'maxResults' => ['title' => '请求时传入的本页最大条数,回显', 'description' => '请求时传入的本页最大条数,回显', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'total' => ['title' => '符合查询条件的 API Key 总数', 'description' => '符合查询条件的 API Key 总数', 'type' => 'integer', 'format' => 'int32', 'example' => '3'], + 'results' => [ + 'title' => 'API Key 列表', + 'description' => 'API Key 列表', + 'type' => 'array', + 'items' => [ + 'title' => 'API Key 条目', + 'description' => 'API Key 条目', + 'type' => 'object', + 'properties' => [ + 'name' => ['title' => 'API Key 的显示名称', 'description' => 'API Key 的显示名称', 'type' => 'string', 'example' => 'my-api-key'], + 'apiKey' => ['title' => 'API Key 完整值(仅创建时返回明文,列表场景按业务约定脱敏)', 'description' => 'API Key 完整值(仅创建时返回明文,列表场景按业务约定脱敏)', 'type' => 'string', 'example' => 'sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], + 'createTime' => ['title' => 'API Key 创建时间,ISO 8601 UTC 格式', 'description' => 'API Key 创建时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z'], + 'agentSpace' => ['title' => '归属的 AgentSpace 名称', 'description' => '归属的 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space'], + 'contextStoreName' => ['title' => '归属的上下文库名称', 'description' => '归属的上下文库名称', 'type' => 'string', 'example' => 'my-context-store'], + ], + ], + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'summary' => '获取 API Key 列表', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListContextStoreAPIKeys', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"nextToken\\": \\"MTIzNDU2Nzg5MA==\\",\\n \\"maxResults\\": 20,\\n \\"total\\": 3,\\n \\"results\\": [\\n {\\n \\"name\\": \\"my-api-key\\",\\n \\"apiKey\\": \\"sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\",\\n \\"createTime\\": \\"2026-01-01T00:00:00Z\\",\\n \\"agentSpace\\": \\"my-agent-space\\",\\n \\"contextStoreName\\": \\"my-context-store\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListContextStores' => [ + 'path' => '/agentspace/{agentSpace}/contextstore', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,长度 2-64 字符', 'description' => 'AgentSpace 名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'query', + 'schema' => ['title' => '按上下文库名称过滤,支持精确匹配;不传表示不过滤', 'description' => '按上下文库名称过滤,支持精确匹配;不传表示不过滤', 'type' => 'string', 'required' => false, 'example' => 'my-context-store'], + ], + [ + 'name' => 'contextType', + 'in' => 'query', + 'schema' => ['title' => '按上下文库类型过滤,例如 experience / memory;不传表示不过滤', 'description' => '按上下文库类型过滤,例如 experience / memory;不传表示不过滤', 'type' => 'string', 'required' => false, 'example' => 'experience'], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['title' => '本次最多返回的上下文库条数,默认 20,最大 100', 'description' => '本次最多返回的上下文库条数,默认 20,最大 100', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['title' => '分页 Token,传入上一次响应中的 nextToken 翻页;首次请求不传', 'description' => '分页 Token,传入上一次响应中的 nextToken 翻页;首次请求不传', 'type' => 'string', 'required' => false, 'example' => 'MTIzNDU2Nzg5MA=='], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + 'nextToken' => ['title' => '下一页 Token,空字符串表示已经是最后一页', 'description' => '下一页 Token,空字符串表示已经是最后一页', 'type' => 'string', 'example' => 'MTIzNDU2Nzg5MA=='], + 'maxResults' => ['title' => '请求时传入的本页最大条数,回显', 'description' => '请求时传入的本页最大条数,回显', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'total' => ['title' => '符合查询条件的上下文库总数', 'description' => '符合查询条件的上下文库总数', 'type' => 'integer', 'format' => 'int32', 'example' => '5'], + 'results' => [ + 'title' => '上下文库列表', + 'description' => '上下文库列表', + 'type' => 'array', + 'items' => [ + 'title' => '上下文库条目', + 'description' => '上下文库条目', + 'type' => 'object', + 'properties' => [ + 'contextStoreName' => ['title' => '上下文库名称', 'description' => '上下文库名称', 'type' => 'string', 'example' => 'my-context-store'], + 'agentSpace' => ['title' => '归属的 AgentSpace 名称', 'description' => '归属的 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space'], + 'regionId' => ['title' => '上下文库所在地域 Id', 'description' => '上下文库所在地域 Id', 'type' => 'string', 'example' => 'cn-hangzhou'], + 'contextType' => ['title' => '上下文库类型,例如 experience / memory', 'description' => '上下文库类型,例如 experience / memory', 'type' => 'string', 'example' => 'experience'], + 'description' => ['title' => '上下文库描述', 'description' => '上下文库描述', 'type' => 'string', 'example' => '我的上下文库'], + 'status' => ['title' => '上下文库状态,枚举值,例如 ACTIVE / INITIALIZING / FAILED', 'description' => '上下文库状态,枚举值,例如 ACTIVE / INITIALIZING / FAILED', 'type' => 'string', 'example' => 'ACTIVE'], + 'serviceNames' => [ + 'title' => '服务名列表(仅 experience 类型有值);与数据源 AgentSpace 协同定位 trace 数据源', + 'description' => '服务名列表(仅 experience 类型有值);与数据源 AgentSpace 协同定位 trace 数据源', + 'type' => 'array', + 'items' => ['title' => '服务名', 'description' => '服务名', 'type' => 'string', 'example' => 'order-service'], + 'example' => '["order-service","payment-service"]', + ], + 'createTime' => ['title' => '上下文库创建时间,ISO 8601 UTC 格式', 'description' => '上下文库创建时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z'], + 'updateTime' => ['title' => '上下文库最近一次更新时间,ISO 8601 UTC 格式', 'description' => '上下文库最近一次更新时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-02T00:00:00Z'], + ], + ], + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'summary' => '查询上下文库列表', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListContextStores', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"nextToken\\": \\"MTIzNDU2Nzg5MA==\\",\\n \\"maxResults\\": 20,\\n \\"total\\": 5,\\n \\"results\\": [\\n {\\n \\"contextStoreName\\": \\"my-context-store\\",\\n \\"agentSpace\\": \\"my-agent-space\\",\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"contextType\\": \\"experience\\",\\n \\"description\\": \\"我的上下文库\\",\\n \\"status\\": \\"ACTIVE\\",\\n \\"serviceNames\\": [\\n \\"order-service\\"\\n ],\\n \\"createTime\\": \\"2026-01-01T00:00:00Z\\",\\n \\"updateTime\\": \\"2026-01-02T00:00:00Z\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListDatasets' => [ + 'summary' => '查询数据集列表', + 'path' => '/agentspace/{agentSpace}/dataset', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => true, 'example' => 'sop-agent', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'datasetName', + 'in' => 'query', + 'schema' => ['description' => '数据集名称', 'type' => 'string', 'required' => false, 'example' => 'product_faq_dataset'], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '最大结果数', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => 'nextToken,首次请求时无需设置;后续请求传入上一次响应返回的 nextToken', 'type' => 'string', 'required' => false, 'example' => 'RsfoUqpOJd5nd0F1e4OquY/7dKNGp1JMgsKtvCagmtY='], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'nextToken' => ['description' => '查询返回结果下一页的令牌。'."\n" + ."\n" + .'当返回结果数据总条数超过maxResults限制,则数据会被截断,您可以使用nextToken查询下一页数据。', 'type' => 'string', 'example' => 'umaQfI7x758Ns4TgWrj8yA3fYlnk7dJgsfhMrSViRY8='], + 'maxResults' => ['description' => '本次请求设置的最大返回条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'requestId' => ['description' => '请求ID'."\n" + ."\n", 'type' => 'string', 'example' => '90F52F93-8800-5A71-8737-18F34BA90166'], + 'total' => ['description' => '总记录数', 'type' => 'integer', 'format' => 'int32', 'example' => '33'], + 'datasets' => [ + 'description' => '结果集', + 'type' => 'array', + 'items' => [ + 'description' => '结果集', + 'type' => 'object', + 'properties' => [ + 'description' => ['description' => '数据集描述', 'type' => 'string', 'example' => 'Product FAQ dataset for semantic search'], + 'createTime' => ['description' => '创建时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-19T02:11:02Z'], + 'updateTime' => ['description' => '更新时间', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-05-18T02:21:32Z'], + 'datasetName' => ['description' => '数据集名称', 'type' => 'string', 'example' => 'product_faq_dataset'], + 'agentSpace' => ['description' => '智能体空间名称', 'type' => 'string', 'example' => 'sop-agent'], + 'regionId' => ['description' => '地域ID', 'type' => 'string', 'example' => 'cn-shanghai'], + ], + ], + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '列出数据集', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListDatasets', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"nextToken\\": \\"umaQfI7x758Ns4TgWrj8yA3fYlnk7dJgsfhMrSViRY8=\\",\\n \\"maxResults\\": 100,\\n \\"requestId\\": \\"90F52F93-8800-5A71-8737-18F34BA90166\\",\\n \\"total\\": 33,\\n \\"datasets\\": [\\n {\\n \\"description\\": \\"Product FAQ dataset for semantic search\\",\\n \\"createTime\\": \\"2026-01-19T02:11:02Z\\",\\n \\"updateTime\\": \\"2026-05-18T02:21:32Z\\",\\n \\"datasetName\\": \\"product_faq_dataset\\",\\n \\"agentSpace\\": \\"sop-agent\\",\\n \\"regionId\\": \\"cn-shanghai\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListEvaluationRuns' => [ + 'summary' => '查询评估运行列表。', + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}/runs', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + [ + 'name' => 'status', + 'in' => 'query', + 'schema' => [ + 'description' => '运行状态过滤条件。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Running', + ], + ], + [ + 'name' => 'runType', + 'in' => 'query', + 'schema' => [ + 'description' => '运行类型过滤条件。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['continuous' => 'continuous', 'backfill' => 'backfill', 'continuous_parent' => 'continuous_parent'], + 'example' => 'backfill', + ], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => '下一页分页 Token。', 'type' => 'string', 'required' => false, 'example' => 'eyJsYXN0SWQiOjEwMX0='], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '每页返回条数。后端默认 20,最大 100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'totalCount' => ['description' => '符合条件的运行总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '3'], + 'maxResults' => ['description' => '本次请求使用的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'nextToken' => ['description' => '下一页分页 Token。为空表示没有下一页。', 'type' => 'string', 'example' => 'eyJsYXN0SWQiOjEyMH0='], + 'evaluationRuns' => [ + 'description' => '运行摘要列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个评估运行摘要对象。', + 'type' => 'object', + 'properties' => [ + 'runId' => ['description' => '运行 ID。', 'type' => 'string', 'example' => 'eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a'], + 'runName' => ['description' => '运行名称。', 'type' => 'string', 'example' => 'trace_task_completion_eval-backfill'], + 'taskId' => ['description' => '评估任务 ID。', 'type' => 'string', 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + 'runType' => [ + 'description' => '运行类型。', + 'type' => 'string', + 'enumValueTitles' => ['continuous' => 'continuous', 'backfill' => 'backfill', 'continuous_parent' => 'continuous_parent'], + 'example' => 'backfill', + ], + 'status' => [ + 'description' => '运行状态。', + 'type' => 'string', + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Running', + ], + 'totalCount' => ['description' => '总评估条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'successCount' => ['description' => '成功条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '96'], + 'failedCount' => ['description' => '失败条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4'], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + 'dataStartTime' => ['description' => '本次运行数据窗口起始时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'dataEndTime' => ['description' => '本次运行数据窗口结束时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782902400'], + ], + 'example' => '{"runId":"eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a"}', + ], + 'example' => '[{"runId":"eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a","runType":"backfill","status":"Running","totalCount":100}]', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询评估运行列表', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"totalCount\\": 3,\\n \\"maxResults\\": 20,\\n \\"nextToken\\": \\"eyJsYXN0SWQiOjEyMH0=\\",\\n \\"evaluationRuns\\": [\\n {\\n \\"runId\\": \\"eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a\\",\\n \\"runName\\": \\"trace_task_completion_eval-backfill\\",\\n \\"taskId\\": \\"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25\\",\\n \\"runType\\": \\"backfill\\",\\n \\"status\\": \\"Running\\",\\n \\"totalCount\\": 100,\\n \\"successCount\\": 96,\\n \\"failedCount\\": 4,\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600,\\n \\"dataStartTime\\": 1782816000,\\n \\"dataEndTime\\": 1782902400\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListEvaluationTasks' => [ + 'path' => '/api/v1/evaluation-tasks', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskName', + 'in' => 'query', + 'schema' => ['description' => '任务名称模糊搜索条件。', 'type' => 'string', 'required' => false, 'example' => 'trace_task_completion_eval'], + ], + [ + 'name' => 'taskMode', + 'in' => 'query', + 'schema' => [ + 'description' => '评估任务模式。不传时后端默认设置为 `batch`。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['batch' => 'batch'], + 'example' => 'batch', + ], + ], + [ + 'name' => 'dataType', + 'in' => 'query', + 'schema' => [ + 'description' => '评估对象的数据来源类型。链路 Trace 评估使用 `trace`。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['trace' => 'trace', 'log' => 'log', 'atif' => 'atif', 'dataset' => 'dataset'], + 'example' => 'trace', + ], + ], + [ + 'name' => 'status', + 'in' => 'query', + 'schema' => [ + 'description' => '评估任务状态过滤条件。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Scheduling' => 'Scheduling', 'Deleted' => 'Deleted', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Running', + ], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => '下一页分页 Token,来自上一次响应。', 'type' => 'string', 'required' => false, 'example' => 'eyJsYXN0SWQiOjEyMywib2Zmc2V0IjoyMH0='], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '每页返回条数。后端默认 20,最大 100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + [ + 'name' => 'channel', + 'in' => 'query', + 'schema' => [ + 'description' => '任务来源过滤条件。不传时查询默认来源任务。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['default' => 'default'], + 'example' => 'default', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'evaluationTasks' => [ + 'description' => '评估任务摘要列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个评估任务摘要对象。', + 'type' => 'object', + 'properties' => [ + 'taskId' => ['description' => '评估任务 ID。', 'type' => 'string', 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + 'taskName' => ['description' => '任务名称。', 'type' => 'string', 'example' => 'trace_task_completion_eval'], + 'taskMode' => [ + 'description' => '评估任务模式。', + 'type' => 'string', + 'enumValueTitles' => ['batch' => 'batch'], + 'example' => 'batch', + ], + 'dataType' => [ + 'description' => '评估对象的数据来源类型。', + 'type' => 'string', + 'enumValueTitles' => ['trace' => 'trace', 'log' => 'log', 'atif' => 'atif', 'dataset' => 'dataset'], + 'example' => 'trace', + ], + 'status' => [ + 'description' => '评估任务状态。', + 'type' => 'string', + 'enumValueTitles' => ['Failed' => 'Failed', 'Running' => 'Running', 'Completed' => 'Completed', 'Scheduling' => 'Scheduling', 'Deleted' => 'Deleted', 'Terminated' => 'Terminated', 'Pending' => 'Pending'], + 'example' => 'Running', + ], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '最近更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + 'evaluators' => ['description' => '评估器配置摘要,JSON 字符串。', 'type' => 'string', 'example' => '[{"evaluatorRef":"Builtin.agent_task_completion"}]'], + 'tags' => [ + 'description' => '任务标签键值对。未设置时为空。', + 'type' => 'object', + 'additionalProperties' => ['type' => 'string', 'example' => 'prod', 'description' => '单个任务标签值,键名按业务维度自定义。'], + 'example' => '{"serviceId":"checkout-service","env":"prod"}', + ], + 'config' => [ + 'description' => '数据源和执行配置摘要。', + 'type' => 'object', + 'additionalProperties' => ['type' => 'string', 'description' => '单个配置项的值,键名由具体字段约定决定。', 'example' => 'trace'], + 'example' => '{"storeName":"logstore-tracing","dataScope":"trace"}', + ], + 'runStrategyConfig' => ['description' => '运行策略结构化配置,解析后的回填策略和持续评估策略。', 'example' => '{"backfill":{"enabled":true,"startTime":1782816000000,"endTime":1782902400000},"continuous":{"enabled":true,"intervalUnit":"HOUR","intervalValue":1,"dataDelayMinutes":5}}', '$ref' => '#/components/schemas/RunStrategies'], + 'description' => ['description' => '评估任务描述。', 'type' => 'string', 'example' => '评估线上 Agent 链路任务完成度'], + ], + 'example' => '{"taskId":"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25"}', + ], + 'example' => '[{"taskId":"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25","taskName":"trace_task_completion_eval","taskMode":"batch","dataType":"trace","status":"Running"}]', + ], + 'nextToken' => ['description' => '下一页分页 Token。为空表示没有下一页。', 'type' => 'string', 'example' => 'eyJsYXN0SWQiOjEwMSwib2Zmc2V0IjoyMH0='], + 'maxResults' => ['description' => '本次请求使用的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'totalCount' => ['description' => '总记录数。后端仅在第一页查询总数,后续页可能为空。', 'type' => 'integer', 'format' => 'int32', 'example' => '126'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询评估任务列表', + 'summary' => '查询评估任务列表', + 'responseParamsDescription' => '镇元最新契约中,列表响应不再返回 runStrategies 原始 JSON 字符串字段,调用方应读取 evaluationTasks[].runStrategyConfig 获取结构化运行策略。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"evaluationTasks\\": [\\n {\\n \\"taskId\\": \\"eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25\\",\\n \\"taskName\\": \\"trace_task_completion_eval\\",\\n \\"taskMode\\": \\"batch\\",\\n \\"dataType\\": \\"trace\\",\\n \\"status\\": \\"Running\\",\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600,\\n \\"evaluators\\": \\"[{\\\\\\"evaluatorRef\\\\\\":\\\\\\"Builtin.agent_task_completion\\\\\\"}]\\",\\n \\"tags\\": {\\n \\"key\\": \\"prod\\"\\n },\\n \\"config\\": {\\n \\"key\\": \\"trace\\"\\n },\\n \\"runStrategyConfig\\": {\\n \\"backfill\\": {\\n \\"enabled\\": true,\\n \\"startTime\\": 1782816000000,\\n \\"endTime\\": 1782902400000\\n },\\n \\"continuous\\": {\\n \\"enabled\\": true,\\n \\"intervalUnit\\": \\"HOUR\\",\\n \\"intervalValue\\": 1,\\n \\"dataDelayMinutes\\": 5\\n }\\n },\\n \\"description\\": \\"评估线上 Agent 链路任务完成度\\"\\n }\\n ],\\n \\"nextToken\\": \\"eyJsYXN0SWQiOjEwMSwib2Zmc2V0IjoyMH0=\\",\\n \\"maxResults\\": 20,\\n \\"totalCount\\": 126\\n}","type":"json"}]', + ], + 'ListEvaluatorSkills' => [ + 'summary' => '查询评估器技能列表。', + 'path' => '/api/v1/evaluator/{name}/skills', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '每页条数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => '下一页分页 Token。', 'type' => 'string', 'required' => false, 'example' => 'eyJuZXh0IjoiMjAifQ=='], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'total' => ['description' => '技能总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '3'], + 'nextToken' => ['description' => '下一页分页 Token。', 'type' => 'string', 'example' => 'eyJuZXh0IjoiNDAifQ=='], + 'maxResults' => ['description' => '本次请求使用的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'skills' => [ + 'description' => '技能摘要列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个技能摘要对象。', + 'type' => 'object', + 'properties' => [ + 'skillName' => ['description' => '技能名称。', 'type' => 'string', 'example' => 'trace_context_loader'], + 'displayName' => ['description' => '显示名称。', 'type' => 'string', 'example' => 'Trace 上下文读取'], + 'description' => ['description' => '技能描述。', 'type' => 'string', 'example' => '读取链路上下文辅助评估'], + 'enable' => [ + 'description' => '是否启用技能。', + 'type' => 'boolean', + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'true', + ], + 'latestVersion' => ['description' => '最新版本。CloudSpec 声明该字段,当前后端响应未填充。', 'type' => 'string', 'example' => '1782816000000'], + 'createdAt' => ['description' => '创建时间。CloudSpec 声明为 int64,当前后端返回 StarOps `createTime` 字符串字段。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '更新时间。CloudSpec 声明为 int64,当前后端返回 StarOps `updateTime` 字符串字段。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + ], + 'example' => '{"skillName":"trace_context_loader"}', + ], + 'example' => '[{"skillName":"trace_context_loader","displayName":"Trace 上下文读取","enable":true}]', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询评估器技能列表', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"total\\": 3,\\n \\"nextToken\\": \\"eyJuZXh0IjoiNDAifQ==\\",\\n \\"maxResults\\": 20,\\n \\"skills\\": [\\n {\\n \\"skillName\\": \\"trace_context_loader\\",\\n \\"displayName\\": \\"Trace 上下文读取\\",\\n \\"description\\": \\"读取链路上下文辅助评估\\",\\n \\"enable\\": true,\\n \\"latestVersion\\": \\"1782816000000\\",\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListEvaluators' => [ + 'summary' => '查询评估器列表。', + 'path' => '/api/v1/evaluators', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'type', + 'in' => 'query', + 'schema' => [ + 'description' => '评估器类型过滤。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['AGENT' => 'AGENT', 'CODE' => 'CODE', 'LLM' => 'LLM'], + 'example' => 'AGENT', + ], + ], + [ + 'name' => 'name', + 'in' => 'query', + 'schema' => ['description' => '评估器名称模糊搜索条件。', 'type' => 'string', 'required' => false, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'source', + 'in' => 'query', + 'schema' => [ + 'description' => '评估器来源过滤。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['custom' => 'custom', 'builtin' => 'builtin'], + 'example' => 'custom', + ], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['description' => '每页返回条数,默认 20,最大 100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['description' => '下一页分页 Token。', 'type' => 'string', 'required' => false, 'example' => 'eyJsYXN0SWQiOjEyM30='], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + 'total' => ['description' => '符合条件的评估器总数。', 'type' => 'integer', 'format' => 'int32', 'example' => '12'], + 'nextToken' => ['description' => '下一页分页 Token。', 'type' => 'string', 'example' => 'eyJsYXN0SWQiOjEzM30='], + 'maxResults' => ['description' => '本次请求使用的每页条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'evaluators' => [ + 'description' => '评估器摘要列表。', + 'type' => 'array', + 'items' => [ + 'description' => '单个评估器配置对象。', + 'type' => 'object', + 'properties' => [ + 'name' => ['description' => '评估器名称。', 'type' => 'string', 'example' => 'trace_task_completion'], + 'displayName' => ['description' => '显示名称。', 'type' => 'string', 'example' => '链路任务完成度'], + 'metricName' => ['description' => '指标名称。', 'type' => 'string', 'example' => 'agent_task_completion'], + 'type' => [ + 'description' => '评估器类型。', + 'type' => 'string', + 'enumValueTitles' => ['AGENT' => 'AGENT', 'CODE' => 'CODE', 'LLM' => 'LLM'], + 'example' => 'AGENT', + ], + 'description' => ['description' => '评估器描述。', 'type' => 'string', 'example' => '判断 Agent 是否完成用户任务'], + 'latestVersion' => ['description' => '最新版本号。', 'type' => 'string', 'example' => '1.0.0'], + 'properties' => ['description' => '评估器属性。', 'type' => 'object', 'example' => '{"agentEvaluatorMode":"raw_prompt"}'], + 'annotations' => [ + 'description' => '注解标记列表。', + 'type' => 'array', + 'items' => ['description' => '单个注解标记。', 'type' => 'string', 'example' => '__en'], + 'example' => '["__en"]', + ], + 'createdAt' => ['description' => '创建时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816000'], + 'updatedAt' => ['description' => '更新时间,秒级 Unix 时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1782816600'], + ], + 'example' => '{"evaluatorRef":"Builtin.agent_task_completion"}', + ], + 'example' => '[{"name":"trace_task_completion","type":"AGENT","latestVersion":"1.0.0"}]', + ], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询评估器列表', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\",\\n \\"total\\": 12,\\n \\"nextToken\\": \\"eyJsYXN0SWQiOjEzM30=\\",\\n \\"maxResults\\": 20,\\n \\"evaluators\\": [\\n {\\n \\"name\\": \\"trace_task_completion\\",\\n \\"displayName\\": \\"链路任务完成度\\",\\n \\"metricName\\": \\"agent_task_completion\\",\\n \\"type\\": \\"AGENT\\",\\n \\"description\\": \\"判断 Agent 是否完成用户任务\\",\\n \\"latestVersion\\": \\"1.0.0\\",\\n \\"properties\\": {\\n \\"agentEvaluatorMode\\": \\"raw_prompt\\"\\n },\\n \\"annotations\\": [\\n \\"__en\\"\\n ],\\n \\"createdAt\\": 1782816000,\\n \\"updatedAt\\": 1782816600\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListPipelineRuns' => [ + 'summary' => '查询流水线执行历史列表', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/runs', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => 'AgentSpace 名称'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + ], + [ + 'name' => 'status', + 'in' => 'query', + 'schema' => ['title' => '按 Run 状态过滤:Pending / Running / Succeeded / Failed / Cancelled;不传不过滤', 'type' => 'string', 'example' => 'Succeeded', 'description' => '按 Run 状态过滤:Pending / Running / Succeeded / Failed / Cancelled;不传不过滤'], + ], + [ + 'name' => 'triggerType', + 'in' => 'query', + 'schema' => ['title' => '按触发类型过滤:Manual / Scheduled / RunOnce;不传不过滤', 'type' => 'string', 'example' => 'Scheduled', 'description' => '按触发类型过滤:Manual / Scheduled / RunOnce;不传不过滤'], + ], + [ + 'name' => 'startTime', + 'in' => 'query', + 'schema' => ['title' => '按触发时间过滤下界(triggered_at >= startTime),unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735574400'], + ], + [ + 'name' => 'endTime', + 'in' => 'query', + 'schema' => ['title' => '按触发时间过滤上界(triggered_at <= endTime),unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['title' => '分页 Token,传入上一次响应中的 nextToken 翻页;首次请求不传', 'type' => 'string', 'example' => 'MTIzNDU2Nzg5MA==', 'description' => '分页 Token,传入上一次响应中的 nextToken 翻页;首次请求不传'], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['title' => '本次最多返回的条数,默认 50,最大 200', 'type' => 'integer', 'format' => 'int32', 'example' => '50', 'description' => '本次最多返回的条数,默认 50,最大 200'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + 'nextToken' => ['title' => '下一页 Token,空字符串表示已经是最后一页', 'type' => 'string', 'example' => 'MTIzNDU2Nzg5MA==', 'description' => '下一页 Token,空字符串表示已经是最后一页'], + 'maxResults' => ['title' => '请求时传入的本页最大条数,回显', 'type' => 'integer', 'format' => 'int32', 'example' => '50', 'description' => '请求时传入的本页最大条数,回显'], + 'totalCount' => ['title' => '满足过滤条件的 Pipeline Run 总数', 'type' => 'integer', 'format' => 'int32', 'example' => '100', 'description' => '满足过滤条件的 Pipeline Run 总数'], + 'runs' => [ + 'title' => '运行列表', + 'type' => 'array', + 'items' => [ + 'title' => '单次运行记录', + 'type' => 'object', + 'properties' => [ + 'runId' => ['title' => 'Run Id', 'type' => 'string', 'example' => 'run-20260101-0001', 'description' => 'Run Id'], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + 'agentSpaceName' => ['title' => '所在 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => '所在 AgentSpace 名称'], + 'fromTime' => ['title' => '数据窗口起始,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800', 'description' => '数据窗口起始,unix 秒'], + 'toTime' => ['title' => '数据窗口结束,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735747200', 'description' => '数据窗口结束,unix 秒'], + 'triggerType' => ['title' => '触发类型:Scheduled / Manual / RunOnce', 'type' => 'string', 'example' => 'Scheduled', 'description' => '触发类型:Scheduled / Manual / RunOnce'], + 'triggerTime' => ['title' => '触发时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00.000Z', 'description' => '触发时间,ISO 8601 UTC 格式'], + 'status' => ['title' => 'Run 状态:Pending / Running / Succeeded / Failed / Cancelled', 'type' => 'string', 'example' => 'Succeeded', 'description' => 'Run 状态:Pending / Running / Succeeded / Failed / Cancelled'], + 'attempt' => ['title' => '当前重试次数', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'description' => '当前重试次数'], + 'maxAttempts' => ['title' => '最大重试次数', 'type' => 'integer', 'format' => 'int32', 'example' => '3', 'description' => '最大重试次数'], + 'startTime' => ['title' => '开始执行时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:01.000Z', 'description' => '开始执行时间,ISO 8601 UTC 格式'], + 'finishTime' => ['title' => '结束时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:10.000Z', 'description' => '结束时间,ISO 8601 UTC 格式'], + 'nextRetryTime' => ['title' => '下次重试时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:01:00.000Z', 'description' => '下次重试时间,ISO 8601 UTC 格式'], + 'stats' => [ + 'title' => '运行统计指标,包含:processedRows(处理行数)、processedBytes(处理字节数)、outputRows(输出行数)、outputBytes(输出字节数)、elapsedMs(耗时毫秒)、cpuSec(CPU 秒)、cpuCores(CPU 核数)、tokenCount(Token 消耗数)', + 'type' => 'object', + 'additionalProperties' => ['type' => 'any', 'description' => ''], + 'description' => '运行统计指标,包含:processedRows(处理行数)、processedBytes(处理字节数)、outputRows(输出行数)、outputBytes(输出字节数)、elapsedMs(耗时毫秒)、cpuSec(CPU 秒)、cpuCores(CPU 核数)、tokenCount(Token 消耗数)', + ], + 'errorMessage' => ['title' => '错误信息', 'type' => 'string', 'example' => '', 'description' => '错误信息'], + 'errorCode' => ['title' => '语义错误码', 'type' => 'string', 'example' => '', 'description' => '语义错误码'], + ], + 'description' => '单次运行记录', + ], + 'description' => '运行列表', + ], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListPipelineRuns', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"nextToken\\": \\"MTIzNDU2Nzg5MA==\\",\\n \\"maxResults\\": 50,\\n \\"totalCount\\": 100,\\n \\"runs\\": [\\n {\\n \\"runId\\": \\"run-20260101-0001\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"agentSpaceName\\": \\"my-agent-space\\",\\n \\"fromTime\\": 1735660800,\\n \\"toTime\\": 1735747200,\\n \\"triggerType\\": \\"Scheduled\\",\\n \\"triggerTime\\": \\"2026-01-01T00:00:00.000Z\\",\\n \\"status\\": \\"Succeeded\\",\\n \\"attempt\\": 0,\\n \\"maxAttempts\\": 3,\\n \\"startTime\\": \\"2026-01-01T00:00:01.000Z\\",\\n \\"finishTime\\": \\"2026-01-01T00:00:10.000Z\\",\\n \\"nextRetryTime\\": \\"2026-01-01T00:01:00.000Z\\",\\n \\"stats\\": {\\n \\"key\\": \\"\\"\\n },\\n \\"errorMessage\\": \\"\\",\\n \\"errorCode\\": \\"\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'ListPipelines' => [ + 'path' => '/agentspace/{agentSpace}/pipeline', + 'methods' => ['get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['type' => 'string', 'example' => 'my-agent-space'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'query', + 'schema' => ['type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + ], + [ + 'name' => 'scheduleType', + 'in' => 'query', + 'schema' => ['type' => 'string', 'example' => 'RunOnce'], + ], + [ + 'name' => 'scheduleStatus', + 'in' => 'query', + 'schema' => ['type' => 'string', 'example' => 'Active'], + ], + [ + 'name' => 'nextToken', + 'in' => 'query', + 'schema' => ['type' => 'string', 'example' => 'MTIzNDU2Nzg5MA==', 'description' => ''], + ], + [ + 'name' => 'maxResults', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'example' => '20', 'description' => ''], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => ''], + 'nextToken' => ['type' => 'string', 'example' => 'MTIzNDU2Nzg5MA==', 'description' => ''], + 'maxResults' => ['type' => 'integer', 'format' => 'int32', 'example' => '20', 'description' => ''], + 'totalCount' => ['type' => 'integer', 'format' => 'int32', 'example' => '100'], + 'pipelines' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'pipelineName' => ['type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + 'description' => ['type' => 'string', 'example' => '我的流水线', 'description' => ''], + 'regionId' => ['type' => 'string', 'example' => 'cn-hangzhou', 'description' => ''], + 'createTime' => ['type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00Z', 'description' => ''], + 'updateTime' => ['type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-02T00:00:00Z', 'description' => ''], + 'workspace' => ['type' => 'string', 'example' => 'my-workspace', 'description' => ''], + 'executePolicy' => [ + 'type' => 'object', + 'properties' => [ + 'mode' => ['type' => 'string', 'example' => 'RunOnce'], + 'runOnce' => [ + 'type' => 'object', + 'properties' => [ + 'fromTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735660800000'], + 'toTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735747200000'], + ], + ], + 'scheduled' => [ + 'type' => 'object', + 'properties' => [ + 'fromTime' => ['type' => 'integer', 'format' => 'int64', 'example' => '1735660800000'], + 'interval' => ['type' => 'string', 'example' => '1h'], + ], + ], + ], + ], + 'scheduleType' => ['type' => 'string', 'example' => 'RunOnce'], + 'scheduleStatus' => ['type' => 'string', 'example' => 'None'], + ], + 'description' => '', + ], + 'description' => '', + ], + ], + 'description' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询Pipeline 列表', + 'summary' => '查询流水线列表', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListPipelines', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"nextToken\\": \\"MTIzNDU2Nzg5MA==\\",\\n \\"maxResults\\": 20,\\n \\"totalCount\\": 100,\\n \\"pipelines\\": [\\n {\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"description\\": \\"我的流水线\\",\\n \\"regionId\\": \\"cn-hangzhou\\",\\n \\"createTime\\": \\"2026-01-01T00:00:00Z\\",\\n \\"updateTime\\": \\"2026-01-02T00:00:00Z\\",\\n \\"workspace\\": \\"my-workspace\\",\\n \\"executePolicy\\": {\\n \\"mode\\": \\"RunOnce\\",\\n \\"runOnce\\": {\\n \\"fromTime\\": 1735660800000,\\n \\"toTime\\": 1735747200000\\n },\\n \\"scheduled\\": {\\n \\"fromTime\\": 1735660800000,\\n \\"interval\\": \\"1h\\"\\n }\\n },\\n \\"scheduleType\\": \\"RunOnce\\",\\n \\"scheduleStatus\\": \\"None\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'PausePipeline' => [ + 'summary' => '暂停流水线', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/pause', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,定位流水线所在的 AgentSpace', 'type' => 'string', 'example' => 'my-agent-space', 'description' => 'AgentSpace 名称,定位流水线所在的 AgentSpace'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '待暂停的流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '待暂停的流水线名称'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '请求体', + 'type' => 'object', + 'properties' => [ + 'reason' => ['title' => '暂停原因', 'type' => 'string', 'example' => 'manual maintenance', 'description' => '暂停原因'], + ], + 'description' => '请求体', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + 'agentSpaceName' => ['title' => '所在 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => '所在 AgentSpace 名称'], + 'scheduleStatus' => ['title' => '调度状态,固定为 Paused', 'type' => 'string', 'example' => 'Paused', 'description' => '调度状态,固定为 Paused'], + 'pauseTime' => ['title' => '暂停时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00.000Z', 'description' => '暂停时间,ISO 8601 UTC 格式'], + 'pausedReason' => ['title' => '暂停原因', 'type' => 'string', 'example' => 'manual maintenance', 'description' => '暂停原因'], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:PausePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"agentSpaceName\\": \\"my-agent-space\\",\\n \\"scheduleStatus\\": \\"Paused\\",\\n \\"pauseTime\\": \\"2026-01-01T00:00:00.000Z\\",\\n \\"pausedReason\\": \\"manual maintenance\\"\\n}","type":"json"}]', + ], + 'ResumePipeline' => [ + 'summary' => '恢复流水线', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/resume', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,定位流水线所在的 AgentSpace', 'type' => 'string', 'example' => 'my-agent-space', 'description' => 'AgentSpace 名称,定位流水线所在的 AgentSpace'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '待恢复的流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '待恢复的流水线名称'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => '流水线名称'], + 'agentSpaceName' => ['title' => '所在 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => '所在 AgentSpace 名称'], + 'scheduleStatus' => ['title' => '调度状态,固定为 Active', 'type' => 'string', 'example' => 'Active', 'description' => '调度状态,固定为 Active'], + 'committedWatermark' => ['title' => '已提交水位线,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800', 'description' => '已提交水位线,unix 秒'], + 'nextTriggerTime' => ['title' => '下次调度触发时间,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735664400', 'description' => '下次调度触发时间,unix 秒'], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:ResumePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"agentSpaceName\\": \\"my-agent-space\\",\\n \\"scheduleStatus\\": \\"Active\\",\\n \\"committedWatermark\\": 1735660800,\\n \\"nextTriggerTime\\": 1735664400\\n}","type":"json"}]', + ], + 'RunPipeline' => [ + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/run', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,定位流水线所在的 AgentSpace', 'type' => 'string', 'example' => 'my-agent-space', 'description' => ''], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '待触发的流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '请求体', + 'type' => 'object', + 'properties' => [ + 'fromTime' => ['title' => '数据处理窗口起始,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735660800', 'description' => ''], + 'toTime' => ['title' => '数据处理窗口结束,unix 秒', 'type' => 'integer', 'format' => 'int64', 'example' => '1735747200', 'description' => ''], + 'output' => [ + 'title' => '输出控制', + 'type' => 'object', + 'properties' => [ + 'dataset' => ['title' => '是否写入目标 Dataset,默认 true', 'type' => 'boolean', 'example' => 'true', 'description' => ''], + 'inline' => ['title' => '是否在响应中返回内联结果,默认 false', 'type' => 'boolean', 'example' => 'false', 'description' => ''], + ], + 'description' => '', + ], + ], + 'description' => '', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => ''], + 'runId' => ['title' => '本次触发创建的 Run Id', 'type' => 'string', 'example' => 'run-20260101-0001', 'description' => ''], + 'status' => ['title' => 'Run 当前状态,入队后通常为 Pending', 'type' => 'string', 'example' => 'Pending', 'description' => ''], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + 'agentSpaceName' => ['title' => '所在 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => ''], + ], + 'description' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'summary' => '手动触发流水线执行', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:RunPipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"runId\\": \\"run-20260101-0001\\",\\n \\"status\\": \\"Pending\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"agentSpaceName\\": \\"my-agent-space\\"\\n}","type":"json"}]', + ], + 'SearchContext' => [ + 'summary' => '搜索上下文', + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}/context/search', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,长度 2-64 字符', 'description' => 'AgentSpace 名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '上下文库名称,长度 2-64 字符', 'description' => '上下文库名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-context-store', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '检索请求体', + 'description' => '检索请求体', + 'type' => 'object', + 'properties' => [ + 'query' => ['title' => '检索查询文本,支持自然语言', 'description' => '检索查询文本,支持自然语言', 'type' => 'string', 'required' => true, 'example' => '用户最近的偏好设置'], + 'formatted' => ['title' => '是否对返回结果做结构化格式化', 'description' => '是否对返回结果做结构化格式化', 'type' => 'boolean', 'required' => false, 'example' => 'true'], + 'filter' => [ + 'title' => '结构化过滤条件,key 为字段名,value 为期望匹配的值', + 'description' => '结构化过滤条件,key 为字段名,value 为期望匹配的值', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['title' => '过滤条件的值,类型随字段而定', 'description' => '过滤条件的值,类型随字段而定', 'type' => 'any', 'example' => 'alice'], + 'example' => '{"userId":"alice"}', + ], + 'limit' => ['title' => '返回结果数量上限(相似度 Top-N)', 'description' => '返回结果数量上限(相似度 Top-N)', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], + 'threshold' => ['title' => '相似度阈值,低于该值的结果将被过滤,取值范围 0-1', 'description' => '相似度阈值,低于该值的结果将被过滤,取值范围 0-1', 'type' => 'number', 'format' => 'double', 'required' => false, 'example' => '0.5'], + 'retrievalOption' => ['title' => '检索选项,控制检索策略', 'description' => '检索选项,控制检索策略', 'type' => 'string', 'required' => false, 'example' => 'semantic'], + ], + 'required' => false, + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + 'results' => [ + 'title' => '检索结果列表,按相似度从高到低排序', + 'description' => '检索结果列表,按相似度从高到低排序', + 'type' => 'array', + 'items' => [ + 'title' => '单条检索结果,结构与上下文库存储字段对齐', + 'description' => '单条检索结果,结构与上下文库存储字段对齐', + 'type' => 'object', + 'additionalProperties' => ['title' => '检索结果各字段的值,类型随字段而定', 'description' => '检索结果各字段的值,类型随字段而定', 'type' => 'any', 'example' => '用户偏好:简洁回答'], + ], + ], + ], + 'description' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:SearchContext', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"results\\": [\\n {\\n \\"key\\": \\"用户偏好:简洁回答\\"\\n }\\n ]\\n}","type":"json"}]', + ], + 'TerminatePipeline' => [ + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}/terminate', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,定位流水线所在的 AgentSpace', 'type' => 'string', 'example' => 'my-agent-space', 'description' => ''], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['title' => '待终止的流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '请求体', + 'type' => 'object', + 'properties' => [ + 'reason' => ['title' => '终止原因', 'type' => 'string', 'example' => 'project deprecated', 'description' => ''], + ], + 'description' => '', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => ''], + 'pipelineName' => ['title' => '流水线名称', 'type' => 'string', 'example' => 'my-pipeline', 'description' => ''], + 'agentSpaceName' => ['title' => '所在 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space', 'description' => ''], + 'scheduleStatus' => ['title' => '调度状态,固定为 Terminated(不可逆终态)', 'type' => 'string', 'example' => 'Terminated', 'description' => ''], + 'terminateTime' => ['title' => '终止时间,ISO 8601 UTC 格式', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-01T00:00:00.000Z', 'description' => ''], + 'terminatedReason' => ['title' => '终止原因', 'type' => 'string', 'example' => 'project deprecated', 'description' => ''], + ], + 'description' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'summary' => '终止流水线', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:TerminatePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\",\\n \\"pipelineName\\": \\"my-pipeline\\",\\n \\"agentSpaceName\\": \\"my-agent-space\\",\\n \\"scheduleStatus\\": \\"Terminated\\",\\n \\"terminateTime\\": \\"2026-01-01T00:00:00.000Z\\",\\n \\"terminatedReason\\": \\"project deprecated\\"\\n}","type":"json"}]', + ], + 'UpdateAgentSpace' => [ + 'summary' => '更新AgentSpace', + 'path' => '/agentspace/{agentSpace}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace名称', 'type' => 'string', 'required' => true, 'example' => 'test-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求Body', + 'type' => 'object', + 'properties' => [ + 'description' => ['description' => '描述', 'type' => 'string', 'required' => false, 'example' => 'test'], + 'cmsWorkspace' => ['description' => '云监控2.0 工作空间', 'type' => 'string', 'required' => false, 'example' => 'my-workspace'], + ], + 'required' => false, + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求Id', 'type' => 'string', 'example' => 'AA689779-61AB-5077-BD91-9F7EA1205D68'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新AgentSpace', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"AA689779-61AB-5077-BD91-9F7EA1205D68\\"\\n}","type":"json"}]', + ], + 'UpdateContextStore' => [ + 'summary' => '修改上下文库配置', + 'path' => '/agentspace/{agentSpace}/contextstore/{contextStoreName}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,长度 2-64 字符', 'description' => 'AgentSpace 名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-agent-space', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'contextStoreName', + 'in' => 'path', + 'schema' => ['title' => '待更新的上下文库名称,长度 2-64 字符', 'description' => '待更新的上下文库名称,长度 2-64 字符', 'type' => 'string', 'required' => true, 'example' => 'my-context-store', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '请求体', + 'description' => '请求体', + 'type' => 'object', + 'properties' => [ + 'description' => ['title' => '上下文库描述,便于业务方理解用途', 'description' => '上下文库描述,便于业务方理解用途', 'type' => 'string', 'required' => false, 'example' => '我的上下文库'], + 'config' => [ + 'title' => '上下文库配置,传入即整体覆盖;不传则保持原配置', + 'description' => '上下文库配置,传入即整体覆盖;不传则保持原配置', + 'type' => 'object', + 'properties' => [ + 'metadataField' => [ + 'title' => '元数据字段映射,key 为业务字段,value 为存储字段', + 'description' => '元数据字段映射,key 为业务字段,value 为存储字段', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'description' => ''], + 'example' => '{"userId":"user_id","sessionId":"session_id"}', + ], + 'source' => [ + 'title' => '数据源配置,仅作为数据源根标识', + 'description' => '数据源配置,仅作为数据源根标识', + 'type' => 'object', + 'properties' => [ + 'startTime' => ['title' => '数据回灌起始时间,ISO 8601 UTC 格式', 'description' => '数据回灌起始时间,ISO 8601 UTC 格式', 'type' => 'string', 'required' => false, 'example' => '2026-01-01T00:00:00Z'], + 'agentSpace' => ['title' => 'trace 数据源所在的 AgentSpace;本期不支持跨 AgentSpace,若传入必须等于 path AgentSpace,否则返回 400 参数错误。AgentSpace 创建后不可变更', 'description' => 'trace 数据源所在的 AgentSpace;本期不支持跨 AgentSpace,若传入必须等于 path AgentSpace,否则返回 400 参数错误。AgentSpace 创建后不可变更', 'type' => 'string', 'required' => false, 'example' => 'my-agent-space'], + ], + 'required' => false, + ], + ], + 'required' => false, + ], + 'contextType' => ['title' => '上下文库类型;创建后通常不可变更,提供该字段仅用于异常修正', 'description' => '上下文库类型;创建后通常不可变更,提供该字段仅用于异常修正', 'type' => 'string', 'required' => false, 'example' => 'experience'], + ], + 'required' => false, + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'description' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\"\\n}","type":"json"}]', + ], + 'UpdateDataset' => [ + 'summary' => '更新数据集', + 'path' => '/agentspace/{agentSpace}/dataset/{datasetName}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => '智能体空间名称', 'type' => 'string', 'required' => true, 'example' => 'sop-agent', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'datasetName', + 'in' => 'path', + 'schema' => ['description' => '数据集名称', 'type' => 'string', 'required' => true, 'example' => 'product_faq_dataset', 'maxLength' => 64, 'minLength' => 2], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求参数。', + 'type' => 'object', + 'properties' => [ + 'description' => ['description' => '数据集描述', 'type' => 'string', 'required' => false, 'example' => 'backend by serverless devs'], + 'schema' => [ + 'description' => '数据集表结构', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['$ref' => '#/components/schemas/IndexKey', 'description' => '数据集表结构'], + ], + ], + 'required' => false, + 'example' => '{'."\n" + .' "description": "Backend knowledge base maintained by serverless developers",'."\n" + .' "schema": {'."\n" + .' "title": {'."\n" + .' "type": "string",'."\n" + .' "chn": false,'."\n" + .' "embedding": "false"'."\n" + .' },'."\n" + .' "summary": {'."\n" + .' "type": "string",'."\n" + .' "chn": false,'."\n" + .' "embedding": "false"'."\n" + .' },'."\n" + .' "content": {'."\n" + .' "type": "string",'."\n" + .' "chn": false,'."\n" + .' "embedding": "true"'."\n" + .' },'."\n" + .' "category": {'."\n" + .' "type": "string",'."\n" + .' "chn": false,'."\n" + .' "embedding": "false"'."\n" + .' },'."\n" + .' "metadata": {'."\n" + .' "type": "json",'."\n" + .' "chn": false,'."\n" + .' "embedding": "false",'."\n" + .' "jsonKeys": {'."\n" + .' "owner": {'."\n" + .' "type": "string",'."\n" + .' "chn": false'."\n" + .' },'."\n" + .' "service": {'."\n" + .' "type": "string",'."\n" + .' "chn": false'."\n" + .' },'."\n" + .' "lastReviewedAt": {'."\n" + .' "type": "string",'."\n" + .' "chn": false'."\n" + .' }'."\n" + .' }'."\n" + .' }'."\n" + .' }'."\n" + .'}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'description' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'BC5B6F62-6FA2-57FC-8285-99753BD34B6D'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新数据集', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"BC5B6F62-6FA2-57FC-8285-99753BD34B6D\\"\\n}","type":"json"}]', + ], + 'UpdateEvaluationRun' => [ + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}/run/{runId}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + [ + 'name' => 'runId', + 'in' => 'path', + 'schema' => ['description' => '评估运行 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-run-4fd47f3d7e684e15b1d3d178c6a5b81a'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。', + 'type' => 'object', + 'properties' => [ + 'status' => [ + 'description' => '目标状态。当前仅支持停止类状态。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['Stopped' => 'Stopped', 'Terminated' => 'Terminated'], + 'example' => 'Terminated', + ], + ], + 'required' => false, + 'example' => '{"status":"Terminated"}', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新评估运行', + 'summary' => '更新评估运行。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'UpdateEvaluationTask' => [ + 'path' => '/api/v1/evaluation-task/{agentSpace}/{taskId}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => false, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'taskId', + 'in' => 'path', + 'schema' => ['description' => '评估任务 ID。', 'type' => 'string', 'required' => false, 'example' => 'eval-task-8b36f2e2b1f94f9c91ce7a4b0f6d9c25'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。', + 'type' => 'object', + 'properties' => [ + 'dataFilter' => ['description' => '评估数据筛选条件,支持 JSON 对象或 JSON 字符串。', 'type' => 'string', 'required' => false, 'example' => '{"query":"serviceName=\'checkout-service\' AND status=\'OK\'","maxRecords":10,"samplingRate":50}'], + 'evaluators' => [ + 'description' => '新的评估器配置列表。传入时会整体替换任务评估器列表,并重新校验评估器唯一性和变量映射。', + 'type' => 'array', + 'items' => ['description' => '单个评估器配置对象。', 'required' => false, '$ref' => '#/components/schemas/Evaluator'], + 'required' => false, + 'example' => '[{"evaluatorRef":"Builtin.agent_task_completion","resultName":"agent_task_completion","resultType":"score","variableMapping":{"input":"trace.input","output":"trace.output","agent_trajectory":"trace.agent_trajectory"}}]', + ], + 'status' => [ + 'description' => '任务状态。当前后端只允许用户主动设置为 `Terminated`;其他状态由系统推进。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['Terminated' => 'Terminated'], + 'example' => 'Terminated', + ], + 'tags' => [ + 'description' => '任务标签键值对。默认无需传递;仅在需要按业务标签关联或过滤任务时传入。', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'example' => 'prod', 'description' => '单个任务标签值,键名按业务维度自定义。'], + 'example' => '{"env":"prod","serviceId":"checkout-service","planId":"plan-20260703"}', + ], + 'config' => [ + 'description' => '新的任务配置。部分创建期字段不可修改。', + 'type' => 'object', + 'required' => false, + 'additionalProperties' => ['type' => 'string', 'description' => '单个配置项的值,键名由具体字段约定决定。', 'example' => 'trace'], + 'example' => '{"dataScope":"trace"}', + ], + 'runStrategies' => ['description' => '新的任务执行策略,支持 JSON 对象或 JSON 字符串。若任务处于 `Completed`、`Terminated` 或 `Failed`,并且新策略启用了 backfill 或 continuous,后端会把任务恢复为 `Pending` 并触发编排。', 'required' => false, '$ref' => '#/components/schemas/RunStrategies'], + 'description' => ['description' => '评估任务描述。', 'type' => 'string', 'required' => false, 'example' => '更新后的链路 Trace 任务完成度评估'], + ], + 'required' => false, + 'example' => '{"dataFilter":{"query":"serviceName=\'checkout-service\' AND status=\'OK\'","maxRecords":10},"runStrategies":{"continuous":{"enabled":true,"intervalUnit":"HOUR","intervalValue":1,"dataDelayMinutes":5}}}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'description' => '幂等 Token。CloudSpec 声明了该查询参数,当前后端未做幂等比对。', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => 'Id of the request', 'description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新评估任务', + 'summary' => '更新评估任务。', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'UpdateEvaluator' => [ + 'summary' => '更新评估器。', + 'path' => '/api/v1/evaluators/{agentSpace}/{name}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。不传 `version` 时更新评估器属性,传入 `version` 时新增一个评估器版本。', + 'type' => 'object', + 'properties' => [ + 'displayName' => ['description' => '显示名称。', 'type' => 'string', 'required' => false, 'example' => '链路任务完成度'], + 'description' => ['description' => '评估器描述。', 'type' => 'string', 'required' => false, 'example' => '判断 Agent 是否完成用户任务'], + 'version' => ['description' => '新版本号。传入时新增版本。', 'type' => 'string', 'required' => false, 'example' => '1.1.0'], + 'versionDescription' => ['description' => '版本描述。', 'type' => 'string', 'required' => false, 'example' => '优化评分说明'], + 'config' => ['description' => '新版本配置。传入 `version` 时通常必填。', 'type' => 'object', 'required' => false, 'example' => '{"prompt":"请更严格地评估任务完成度"}'], + 'annotations' => [ + 'description' => '注解标记列表。', + 'type' => 'array', + 'items' => ['description' => '单个注解标记。', 'type' => 'string', 'required' => false, 'example' => '__en'], + 'required' => false, + 'example' => '["__en"]', + ], + 'properties' => ['description' => '评估器属性。', 'type' => 'object', 'required' => false, 'example' => '{"agentEvaluatorMode":"raw_prompt"}'], + ], + 'required' => false, + 'example' => '{"displayName":"链路任务完成度","version":"1.1.0","config":{"prompt":"请更严格地评估任务完成度"}}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'description' => '幂等 Token。CloudSpec 声明了该查询参数,当前后端未做幂等比对。', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新评估器', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'UpdateEvaluatorSkill' => [ + 'summary' => '更新评估器技能。', + 'path' => '/api/v1/evaluator/{name}/skill/{skillName}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'tenant'], + 'parameters' => [ + [ + 'name' => 'name', + 'in' => 'path', + 'schema' => ['description' => '评估器名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_task_completion'], + ], + [ + 'name' => 'skillName', + 'in' => 'path', + 'schema' => ['description' => '技能名称。', 'type' => 'string', 'required' => true, 'example' => 'trace_context_loader'], + ], + [ + 'name' => 'agentSpace', + 'in' => 'query', + 'schema' => ['description' => 'AgentSpace 名称。', 'type' => 'string', 'required' => true, 'example' => 'prod-agentspace'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求体。', + 'type' => 'object', + 'properties' => [ + 'displayName' => ['description' => '技能显示名称。', 'type' => 'string', 'required' => false, 'example' => 'Trace 上下文读取'], + 'description' => ['description' => '技能描述。', 'type' => 'string', 'required' => false, 'example' => '读取链路上下文辅助评估'], + 'enable' => [ + 'description' => '是否启用技能。', + 'type' => 'boolean', + 'required' => false, + 'enumValueTitles' => ['true' => 'true', 'false' => 'false'], + 'example' => 'true', + ], + 'files' => [ + 'description' => '技能文件列表。传入时更新技能文件内容。', + 'type' => 'array', + 'items' => [ + 'description' => '单个技能文件对象。', + 'type' => 'object', + 'properties' => [ + 'name' => ['description' => '技能文件名。', 'type' => 'string', 'required' => true, 'example' => 'SKILL.md'], + 'content' => ['description' => '技能文件内容。', 'type' => 'string', 'required' => true, 'example' => '# Trace Context Loader'], + 'remark' => ['description' => '文件备注。', 'type' => 'string', 'required' => false, 'example' => '主技能说明'], + ], + 'required' => false, + 'example' => '{"name":"SKILL.md"}', + ], + 'required' => false, + 'example' => '[{"name":"SKILL.md","content":"# Trace Context Loader","remark":"主技能说明"}]', + ], + ], + 'required' => false, + 'example' => '{"displayName":"Trace 上下文读取","enable":true,"files":[{"name":"SKILL.md","content":"# Trace Context Loader"}]}', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'description' => '幂等 Token。CloudSpec 声明了该查询参数,当前后端未做幂等比对。', 'type' => 'string', 'required' => false, 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['description' => '请求 ID。', 'type' => 'string', 'example' => '3FE4CD1E-FF41-56BE-B590-7A021D9C1524'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新评估器技能', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"3FE4CD1E-FF41-56BE-B590-7A021D9C1524\\"\\n}","type":"json"}]', + ], + 'UpdatePipeline' => [ + 'summary' => '更新流水线', + 'path' => '/agentspace/{agentSpace}/pipeline/{pipelineName}', + 'methods' => ['put'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'agentSpace', + 'in' => 'path', + 'schema' => ['title' => 'AgentSpace 名称,定位待更新流水线所在的 AgentSpace', 'type' => 'string', 'example' => 'my-agent-space'], + ], + [ + 'name' => 'pipelineName', + 'in' => 'path', + 'schema' => ['type' => 'string', 'title' => '待更新的流水线名称', 'example' => 'my-pipeline', 'description' => '待更新的流水线名称'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'description' => ['type' => 'string', 'title' => '流水线描述,便于业务方理解用途', 'example' => '我的流水线', 'description' => '流水线描述,便于业务方理解用途'], + 'source' => [ + 'type' => 'object', + 'properties' => [ + 'type' => ['type' => 'string', 'title' => '数据源类型,例如 SLS', 'example' => 'SLS', 'description' => '数据源类型,例如 SLS'], + 'logstore' => [ + 'type' => 'object', + 'properties' => [ + 'logstore' => ['type' => 'string', 'title' => 'SLS Logstore 名称', 'example' => 'my-sls-logstore', 'description' => 'SLS Logstore 名称'], + 'query' => ['type' => 'string', 'title' => '数据筛选查询语句(SLS 查询/分析语法)', 'example' => '* | SELECT *', 'description' => '数据筛选查询语句(SLS 查询/分析语法)'], + ], + 'title' => 'SLS Logstore 数据源配置', + 'description' => 'SLS Logstore 数据源配置', + ], + ], + 'title' => 'Pipeline 数据源,传入即整体覆盖', + 'description' => 'Pipeline 数据源,传入即整体覆盖', + ], + 'pipeline' => [ + 'type' => 'object', + 'properties' => [ + 'nodes' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'id' => ['type' => 'string', 'title' => '节点 Id', 'example' => 'node-1', 'description' => '节点 Id'], + 'type' => ['type' => 'string', 'title' => '节点类型', 'example' => 'transform', 'description' => '节点类型'], + 'parameters' => [ + 'type' => 'object', + 'additionalProperties' => ['type' => 'any', 'title' => '节点参数值', 'example' => 'value', 'description' => '节点参数值'], + 'title' => '节点参数,键值结构,随节点类型而定', + 'description' => '节点参数,键值结构,随节点类型而定', + ], + ], + 'title' => '单个节点配置', + 'description' => '单个节点配置', + ], + 'title' => '节点列表', + 'description' => '节点列表', + ], + ], + 'title' => 'Pipeline 配置(节点编排),传入即整体覆盖', + 'description' => 'Pipeline 配置(节点编排),传入即整体覆盖', + ], + 'sink' => [ + 'type' => 'object', + 'properties' => [ + 'type' => ['type' => 'string', 'title' => '目标类型,例如 Dataset', 'example' => 'Dataset', 'description' => '目标类型,例如 Dataset'], + 'dataset' => [ + 'type' => 'object', + 'properties' => [ + 'agentSpace' => ['title' => '目标数据集所属 AgentSpace 名称', 'type' => 'string', 'example' => 'my-agent-space'], + 'dataset' => ['type' => 'string', 'title' => '目标数据集名称', 'example' => 'my-dataset', 'description' => '目标数据集名称'], + ], + 'title' => '目标数据集配置', + 'description' => '目标数据集配置', + ], + ], + 'title' => 'Pipeline 目标(数据写入目标),传入即整体覆盖', + 'description' => 'Pipeline 目标(数据写入目标),传入即整体覆盖', + ], + 'executePolicy' => [ + 'type' => 'object', + 'properties' => [ + 'mode' => ['type' => 'string', 'title' => '调度模式,例如 Scheduled(定时)/ RunOnce(仅执行一次)', 'example' => 'Scheduled', 'description' => '调度模式,例如 Scheduled(定时)/ RunOnce(仅执行一次)'], + 'runOnce' => [ + 'type' => 'object', + 'properties' => [ + 'fromTime' => ['type' => 'integer', 'format' => 'int64', 'title' => '数据处理起始时间,Unix 毫秒时间戳', 'example' => '1735660800000', 'description' => '数据处理起始时间,Unix 毫秒时间戳'], + 'toTime' => ['type' => 'integer', 'format' => 'int64', 'title' => '数据处理结束时间,Unix 毫秒时间戳', 'example' => '1735747200000', 'description' => '数据处理结束时间,Unix 毫秒时间戳'], + ], + 'title' => '仅执行一次的配置', + 'description' => '仅执行一次的配置', + ], + 'scheduled' => [ + 'type' => 'object', + 'properties' => [ + 'interval' => ['type' => 'string', 'title' => '调度间隔,例如 1h', 'example' => '1h', 'description' => '调度间隔,例如 1h'], + 'fromTime' => ['type' => 'integer', 'format' => 'int64', 'title' => '调度起始时间,Unix 毫秒时间戳', 'example' => '1735660800000', 'description' => '调度起始时间,Unix 毫秒时间戳'], + ], + 'title' => '定时调度配置', + 'description' => '定时调度配置', + ], + ], + 'title' => '调度方式,传入即整体覆盖', + 'description' => '调度方式,传入即整体覆盖', + ], + ], + 'title' => '请求体', + 'description' => '请求体', + ], + ], + [ + 'name' => 'clientToken', + 'in' => 'query', + 'schema' => ['title' => '幂等 Token,客户端生成的唯一字符串,保证更新操作幂等', 'type' => 'string', 'example' => 'a1b2c3d4-1234-5678-90ab-cdef12345678'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'requestId' => ['title' => '请求 Id,用于排查问题时定位本次请求', 'type' => 'string', 'example' => '9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M', 'description' => '请求 Id,用于排查问题时定位本次请求'], + ], + 'description' => '响应数据', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '更新Pipeline', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:UpdatePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M\\"\\n}","type":"json"}]', + ], + ], + 'endpoints' => [ + ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-shenzhen.aliyuncs.com', 'endpoint' => 'agentloop.cn-shenzhen.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-shenzhen.aliyuncs.com'], + ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-beijing.aliyuncs.com', 'endpoint' => 'agentloop.cn-beijing.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-shanghai.aliyuncs.com', 'endpoint' => 'agentloop.cn-shanghai.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-guangzhou', 'regionName' => '华南3(广州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-guangzhou.aliyuncs.com', 'endpoint' => 'agentloop.cn-guangzhou.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-guangzhou.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-hongkong.aliyuncs.com', 'endpoint' => 'agentloop.cn-hongkong.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-hongkong.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.ap-southeast-1.aliyuncs.com', 'endpoint' => 'agentloop.ap-southeast-1.aliyuncs.com', 'vpc' => 'agentloop-vpc.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'cn-zhangjiakou', 'regionName' => '华北3(张家口)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-zhangjiakou.aliyuncs.com', 'endpoint' => 'agentloop.cn-zhangjiakou.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-zhangjiakou.aliyuncs.com'], + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-hangzhou.aliyuncs.com', 'endpoint' => 'agentloop.cn-hangzhou.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-hangzhou.aliyuncs.com'], + ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'agentloop.cn-chengdu.aliyuncs.com', 'endpoint' => 'agentloop.cn-chengdu.aliyuncs.com', 'vpc' => 'agentloop-vpc.cn-chengdu.aliyuncs.com'], + ], + 'errorCodes' => [], + 'changeSet' => [], + 'ram' => [ + 'productCode' => 'AgentLoop', + 'productName' => 'Agent 观测与优化 AgentLoop', + 'ramCodes' => ['agentloop'], + 'ramLevel' => '资源级', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'ExecuteQuery', + 'description' => '执行语句', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:ExecuteQuery', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + [ + 'apiName' => 'CreateEvaluatorSkill', + 'description' => '创建评估器技能', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateEvaluatorSkill', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}'], + ], + ], + ], + [ + 'apiName' => 'CreateEvaluationTask', + 'description' => '创建评估任务', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateEvaluationTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Workspace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteEvaluationTask', + 'description' => '删除评估任务', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteEvaluationTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + [ + 'apiName' => 'DeleteEvaluatorSkill', + 'description' => '删除评估器技能', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteEvaluatorSkill', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluatorSkill', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}/skill/{#SkillName}'], + ], + ], + ], + [ + 'apiName' => 'CreateEvaluator', + 'description' => '创建评估器', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateEvaluator', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Workspace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + [ + 'apiName' => 'CreateDataset', + 'description' => '创建数据集', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + [ + 'apiName' => 'UpdatePipeline', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:UpdatePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'ListContextStoreAPIKeys', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListContextStoreAPIKeys', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'GetEvaluatorSkill', + 'description' => '获取评估器技能详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetEvaluatorSkill', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluatorSkill', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}/skill/{#SkillName}'], + ], + ], + ], + [ + 'apiName' => 'UpdateContextStore', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'GetAgentSpace', + 'description' => '查询AgentSpace信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + [ + 'apiName' => 'ListDatasets', + 'description' => '列出数据集', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListDatasets', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/*'], + ], + ], + ], + [ + 'apiName' => 'CreateContextStoreAPIKey', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateContextStoreAPIKey', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'ListEvaluationTasks', + 'description' => '查询评估任务列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListEvaluationTasks', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/*'], + ], + ], + ], + [ + 'apiName' => 'PausePipeline', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:PausePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'UpdateDataset', + 'description' => '更新数据集', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + [ + 'apiName' => 'GetContextStore', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteAgentSpace', + 'description' => '删除AgentSpace', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + [ + 'apiName' => 'ListAgentSpaces', + 'description' => '查询AgentSpaces列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListAgentSpaces', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/*'], + ], + ], + ], + [ + 'apiName' => 'CancelPipelineRun', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:CancelPipelineRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'GetPipeline', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:GetPipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'GetContextStoreAPIKey', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetContextStoreAPIKey', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteContextStoreAPIKey', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteContextStoreAPIKey', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'ResumePipeline', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:ResumePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'TerminatePipeline', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:TerminatePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'UpdateEvaluationRun', + 'description' => '更新评估运行', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateEvaluationRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + [ + 'apiName' => 'ListEvaluators', + 'description' => '查询评估器列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListEvaluators', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/*'], + ], + ], + ], + [ + 'apiName' => 'GetEvaluationRun', + 'description' => '获取评估运行详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetEvaluationRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + [ + 'apiName' => 'ListContextStores', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListContextStores', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/*'], + ], + ], + ], + [ + 'apiName' => 'ListEvaluatorSkills', + 'description' => '查询评估器技能列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListEvaluatorSkills', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluatorSkill', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}/skill/*'], + ], + ], + ], + [ + 'apiName' => 'GetDataset', + 'description' => '获取数据集', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteDataset', + 'description' => '删除数据集', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteDataset', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ], + ], + ], + [ + 'apiName' => 'GetPipelineStats', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:GetPipelineStats', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'AddDatasetData', + 'description' => '添加数据集数据', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:AddDatasetData', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpace}/dataset/{#DatasetName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteContextStore', + 'description' => '', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'UpdateEvaluator', + 'description' => '更新评估器', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateEvaluator', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}'], + ], + ], + ], + [ + 'apiName' => 'GetEvaluator', + 'description' => '获取评估器详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetEvaluator', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}'], + ], + ], + ], + [ + 'apiName' => 'GetPipelineRun', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:GetPipelineRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'UpdateEvaluatorSkill', + 'description' => '更新评估器技能', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateEvaluatorSkill', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluatorSkill', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}/skill/{#SkillName}'], + ], + ], + ], + [ + 'apiName' => 'ListPipelineRuns', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListPipelineRuns', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'SearchContext', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:SearchContext', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteEvaluationRun', + 'description' => '删除评估运行', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteEvaluationRun', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + [ + 'apiName' => 'GetEvaluationTask', + 'description' => '查询评估任务详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'agentloop:GetEvaluationTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + [ + 'apiName' => 'CreateContextStore', + 'description' => '', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateContextStore', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ], + ], + ], + [ + 'apiName' => 'DeletePipeline', + 'description' => '删除Pipeline', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeletePipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'UpdateEvaluationTask', + 'description' => '更新评估任务', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateEvaluationTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + [ + 'apiName' => 'CreateAgentSpace', + 'description' => '创建AgentSpace', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'agentloop:CreateAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + [ + 'apiName' => 'ListPipelines', + 'description' => '', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListPipelines', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/*'], + ], + ], + ], + [ + 'apiName' => 'UpdateAgentSpace', + 'description' => '更新AgentSpace', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'agentloop:UpdateAgentSpace', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ], + ], + ], + [ + 'apiName' => 'DeleteEvaluator', + 'description' => '删除评估器', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'agentloop:DeleteEvaluator', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}'], + ], + ], + ], + [ + 'apiName' => 'RunPipeline', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'agentloop:RunPipeline', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ], + ], + ], + [ + 'apiName' => 'ListEvaluationRuns', + 'description' => '查询评估运行列表', + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'agentloop:ListEvaluationRuns', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'AgentLoop', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ], + ], + ], + ], + 'resourceTypes' => [ + ['validationType' => 'always', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/{#DatasetName}'], + ['validationType' => 'always', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}'], + ['validationType' => 'always', 'resourceType' => 'Workspace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ['validationType' => 'always', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/{#TaskId}'], + ['validationType' => 'always', 'resourceType' => 'EvaluatorSkill', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}/skill/{#SkillName}'], + ['validationType' => 'always', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/{#PipelineName}'], + ['validationType' => 'always', 'resourceType' => 'ContextStoreAPIKey', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ['validationType' => 'always', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/{#ContextStoreName}'], + ['validationType' => 'always', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}'], + ['validationType' => 'always', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/dataset/*'], + ['validationType' => 'always', 'resourceType' => 'EvaluationTask', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluationtask/*'], + ['validationType' => 'always', 'resourceType' => 'AgentSpace', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/*'], + ['validationType' => 'always', 'resourceType' => 'Evaluator', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/*'], + ['validationType' => 'always', 'resourceType' => 'ContextStore', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/contextstore/*'], + ['validationType' => 'always', 'resourceType' => 'EvaluatorSkill', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/evaluator/{#EvaluatorName}/skill/*'], + ['validationType' => 'always', 'resourceType' => 'Dataset', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpace}/dataset/{#DatasetName}'], + ['validationType' => 'always', 'resourceType' => 'Pipeline', 'arn' => 'acs:agentloop:{#regionId}:{#accountId}:agentspace/{#AgentSpaceName}/pipeline/*'], + ], + ], +]; |
