agent-traces
收藏资源简介:
Trace Commons — Agent Traces 是一个开源的公共数据集,专门收集编码代理会话数据。这些会话记录了开发者与AI编码代理(如Claude Code、Codex、Pi、Cursor、OpenCode等)之间的完整交互过程,包括用户提示、模型响应、工具调用及其执行结果。所有数据均来自公开的开源代码仓库,由贡献者自愿捐赠,旨在为研究、评估和构建AI编码代理提供真实的交互数据。数据集以原始会话文件形式存储,仅进行了匿名化处理,未对内容进行重构。文件按生成会话的代理类型组织,分别存储在sessions/claude_code/、sessions/codex/、sessions/pi/、sessions/cursor/和sessions/opencode/目录下。数据收集通过可安装到编码代理中的`donate-trace`技能进行,包括确认会话项目属于公开开源仓库、从本地日志定位会话、运行确定性擦除脚本以移除敏感信息(如路径、用户名、常见密钥格式、电子邮件等),并让贡献者审核清理后的轨迹。匿名化过程包括确定性擦除、使用TruffleHog进行扫描器后处理以及人工审核,但匿名化是尽力而为且不完美的,无法保证数据完全不含个人身份信息。数据集整体采用CC-BY-4.0许可证,但其中包含的源代码、文件内容等可能受其原始许可证约束。数据集适用于文本生成、智能体行为分析、工具使用研究等任务,但用户需注意其数据可能存在的偏见以及内容许可证的合规性。
Trace Commons — Agent Traces is an open-source public dataset specifically designed to collect coding agent session data. These sessions record the complete interaction process between developers and AI coding agents (such as Claude Code, Codex, Pi, Cursor, OpenCode, etc.), including user prompts, model responses, tool calls, and their execution results. All data comes from public open-source code repositories and is voluntarily donated by contributors, aiming to provide real interaction data for researching, evaluating, and building AI coding agents. The dataset is stored in the form of raw session files, with only anonymization applied and no content reconstruction. Files are organized by the agent type that generated the session, stored in directories such as sessions/claude_code/, sessions/codex/, sessions/pi/, sessions/cursor/, and sessions/opencode/. Data collection is conducted through the installable `donate-trace` skill, which confirms that the session project belongs to a public open-source repository, locates the current session from the agents local logs, runs a deterministic erasure script to remove sensitive information (such as paths, usernames, common key formats, emails, etc.), and allows contributors to review the cleaned traces. The anonymization process includes deterministic erasure, scanner post-processing using TruffleHog, and manual review, but anonymization is best-effort and imperfect, with no guarantee that the data is completely free of personally identifiable information. The dataset as a whole is licensed under CC-BY-4.0, but the source code, file content, etc., contained within it may be subject to their original licenses. The dataset is suitable for tasks such as text generation, agent behavior analysis, and tool usage research, but users should be aware of potential biases in the data and compliance with content licenses.
数据集概览
- 数据集名称: Trace Commons — Agent Traces
- 许可证: CC-BY-4.0
- 任务类别: 文本生成
- 语言: 英语
- 标签: agent, agent-traces, coding-agent, traces, tool-use, open-data
数据集内容
该数据集包含开发者与AI编码代理之间的交互会话记录,包括提示词、模型响应、工具调用和命令输出。每个会话以其原始、未修改的会话文件形式存储,仅经过匿名化处理。文件按生成它们的代理(工具)组织:
sessions/claude_code/<file>.jsonlsessions/codex/<file>.jsonlsessions/pi/<file>.jsonlsessions/cursor/<file>.jsonlsessions/opencode/<file>.json
所有会话位于单一的数据集表中,通过文件路径和会话字段标识代理工具。claude_code、codex、pi 和 cursor 使用 JSONL 格式,每行一个 JSON 对象;opencode 每个会话一个 JSON 文档。
数据收集方式
会话通过 donate-trace 技能捐赠,该技能可安装到编码代理中。流程包括:
- 确认项目是公开的开源仓库,否则拒绝。
- 从代理本地日志中定位当前会话。
- 本地运行确定性清理脚本 (
scrub.py),去除高置信度泄露信息。 - 要求捐赠者审查移除的内容并查看清理后的会话。
- 在明确确认后,通过 Hugging Face 账户(署名)或匿名方式经由 Trace Commons 摄取服务器提交拉取请求。所有捐赠均需维护者审查后加入数据集。
匿名化处理
匿名化分两个阶段:
- 确定性处理(
scrub.py):去除主目录路径、用户名、常见密钥格式(AWS、GitHub/GitLab、Slack、Google/GCP、OpenAI/Anthropic、Stripe、Twilio、SendGrid、npm/PyPI 令牌、Azure 存储密钥、JWT、PEM 私钥块、KEY=value环境变量密钥、Bearer 令牌、数据库连接字符串、Webhook URL)以及电子邮件地址。 - 扫描回溯(TruffleHog):摄取服务器额外运行 TruffleHog,使用数百个维护的密钥检测器。检测结果不自动拒绝,而是标记捐赠供维护者审查。
- 人工审查:捕获正则表达式无法检测的信息,如人名、公司名、内部主机名、代码名称、工单ID等。
注意:匿名化是尽力而为的,不保证数据完全不含个人信息。
许可证与使用条款
- 数据集合集(结构、元数据)采用 CC-BY-4.0 许可证,使用时需标注 Trace Commons 来源。
- 单个会话可能包含源代码、文件内容等,这些材料有其原始许可。捐赠者认证其有权公开分享,但维护者不验证每条内容的来源或许可。
- 使用者需自行确保对会话中代码或内容的使用符合其原始许可。
- 捐赠者需确保仅捐赠有权分享的公开开源工作内容,并遵守所用编码代理供应商的条款。
隐私与个人数据
数据集中可能包含个人数据(姓名、电子邮件地址、标识符、文件路径等)。匿名化是尽力而为的,数据不被视为已认证匿名,在 GDPR 和 CNIL 指南下被视为非匿名数据。数据发布基于捐赠者同意和维护开放研究共同体的合法利益。如有个人数据存在,可通过下架路径请求删除(包括 GDPR 下的删除权)。
联系与下架
如需移除会话,请在数据集的 Community 讨论页 发起讨论,维护者会及时处理。
重要说明
- 该数据集不是完整或有代表性的代理使用样本,存在自愿捐赠者的选择偏差。
- 不保证不含个人信息,使用者需谨慎对待。




