QueryAskLumaLog - 查询智能体查询调用日志

更新时间:
复制 MD 格式

查询自然语言查询历史日志

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

AgentName

string

Agent 名称, 不填则查询全部

demo-luma-agent

After

string

游标, 上一页最后一条的 messageId

eyJ0cyI6MTcxN...

Limit

integer

返回条数, 默认 20, 最大 50

10

返回参数

名称

类型

描述

示例值

object

Message

string

错误信息。

AgentNotFound

RequestId

string

阿里云为该请求生成的唯一标识符。

6FB52207-7621-5292-BDF2-A17E2E984160

Data QueryAskLumaLogResult

返回结果。

true

Code

string

接口返回码:

200:表示成功。

其它:表示错误码。错误码详情,请参见错误码。

Success

Success

boolean

操作成功返回 true。

true

Content.MessageAttachments 补充说明:

  • 仅 Source=CHAT 的记录携带此字段(AGUI 格式的消息列表)

  • Source=MCP 的记录此字段为 null,JSON 序列化时不输出

示例

正常返回示例

JSON格式

{
  "Message": "AgentNotFound",
  "RequestId": "6FB52207-7621-5292-BDF2-A17E2E984160",
  "Data": {
    "Entries": [
      {
        "MessageId": "msg_xxx",
        "ConversationId": "conv_xxx",
        "AgentName": "my-agent",
        "Question": "帮我统计一下最近的订单数据。",
        "Status": "RUNNING, SUCCEEDED, FAILED, TIMEOUT",
        "ClarificationNeeded": false,
        "ClarificationQuestion": "您指的是哪张表?",
        "Content": {
          "TextAttachments": [
            "\"**top 5 城市**: 北京(120)...\""
          ],
          "QueryAttachments": [
            {
              "Query": "\"SELECT city, COUNT(*) AS cnt FROM events GROUP BY city\"",
              "Result": {
                "Schema": [
                  {
                    "Name": "name",
                    "Type": "VARCHAR"
                  }
                ],
                "Rows": "[[\"北京\",120],[\"上海\",98]] ",
                "RowCount": 2,
                "TotalRows": 2,
                "IsTruncated": false
              }
            }
          ],
          "MessageAttachments": [
            {
              "Id": "msg_123456_a1b2c3d4",
              "Role": "assistant",
              "Content": "根据您的问题,我将查询过去7天的事件量...",
              "Metadata": {
                "Attachments": {
                  "Name": "acs:eventbridge:cn-hangzhou:12345:eventhouse/system-rocketmq/namespace/rmq-cn-xxx/table/order",
                  "Type": "inner-resource/event-table"
                }
              },
              "ToolCallId": "call_xxx",
              "ToolCalls": [
                {
                  "Id": "call_xxx",
                  "Type": "function",
                  "Function": {
                    "Name": "discoverMetadata",
                    "Arguments": "{}"
                  }
                }
              ]
            }
          ]
        },
        "IsError": false,
        "ErrorCode": "ExecutionFailed",
        "ErrorMessage": "Agent with name 'xxx' not found for account 1186xxx",
        "CreatedAt": "1717200000000",
        "DurationMs": 3200,
        "Source": "MCP, CHAT"
      }
    ],
    "LastKey": "",
    "HasMore": true
  },
  "Code": "Success",
  "Success": true
}

错误码

HTTP status code

错误码

错误信息

描述

403 ServiceNotEnable Service not enable

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情