{"meta":{"title":"代理的审计日志事件","intro":"了解企业中代理的审核日志事件结构。","product":"GitHub Copilot","breadcrumbs":[{"href":"/zh/enterprise-cloud@latest/copilot","title":"GitHub Copilot"},{"href":"/zh/enterprise-cloud@latest/copilot/reference","title":"参考资料"},{"href":"/zh/enterprise-cloud@latest/copilot/reference/enterprise-administrators","title":"企业管理员"},{"href":"/zh/enterprise-cloud@latest/copilot/reference/enterprise-administrators/agentic-audit-log-events","title":"代理审核日志事件"}],"documentType":"article"},"body":"# 代理的审计日志事件\n\n了解企业中代理的审核日志事件结构。\n\n可以将筛选器应用于 `actor:Copilot` 企业审核日志，以查看过去 180 天内的代理活动。\n\n以下关键字段可帮助你解释代理事件：\n\n| 领域 | Description | 示例值 |\n| --- | --- | --- |\n| `action` | 由代理者执行的操作，例如创建拉取请求。 | `pull_request.create` |\n| `actor_is_agent` | 指示该角色是否为 AI 代理。 这将始终是 `true` 以用于自主审核日志事件。 | `true` |\n| `agent_session_id` | 链接到生成事件的特定代理会话的唯一标识符。 仅当事件是代理会话的结果时，才会显示此字段。 | `012345a6-b7c8-9012-de3f-45gh678i9012` |\n| `user` | 发起活动事件的人员。 | `octocat` |\n\n## 流式传输审计日志事件\n\n>[!NOTE] 此功能在 公开预览 中提供，适用于使用 Enterprise Managed Users 的企业，以及使用启用数据驻留的 GitHub Enterprise Cloud 的企业。\n\n下表显示了每个流式处理 Copilot API 使用情况记录中包含的字段。\n\n每个流式传输记录都是具有以下属性的 JSON 对象：\n\n| 领域 | 类型 | Description |\n| --- | --- | --- |\n| `type` | `string` | 记录类型（`request` 或 `response`）。 |\n| `user_id` | `integer` | 发出请求的用户的 ID。 |\n| `enterprise_id` | `integer` | 企业的 ID。 |\n| `endpoint` | `string` | \nCopilot与使用情况记录交互的 API 终结点。 |\n| `body` | `string` | 请求或响应正文（JSON 编码字符串）。 |\n| `@timestamp` | `integer` | 自 Unix 纪元以来的毫秒数。 |\n| `truncated` | `boolean` | \n`true` 当 `body` 字段已被截断以符合 1 MB 文档大小限制时。 当正文完整传送时，可省略（视为 `false`）。 |\n| `event_id` | `string` | 此流式使用记录的唯一事件标识符。 |\n| `github_request_id` | `string` | \nGitHub 与 Copilot 使用事件关联的请求标识符。 |"}