ox-alpha-pi-traces-emacs-bridge
收藏资源简介:
该数据集是TeichAI/Ox-Alpha-Pi-Traces中agent traces的转换版本,旨在将原始agent工具调用(如write、edit)替换为通过Emacs python-bridge执行的文件操作。数据集包含2246个有效traces,每个trace包含一系列assistant消息中的toolCall块和对应的toolResult消息。转换后提供两种格式:ipython模式(将每个调用表示为prime-agent REPL的代码单元)和tools模式(保留命名工具调用ox_bridge_write和ox_bridge_edit,并附带Python源码)。数据集可用于训练或评估agent在Emacs环境中通过bridge-only方式进行文件创建和编辑的任务,也可用于工具调用基准测试。数据集中还包含一个截断的trace(traces_quarantine/)和少量缺失path参数的调用。
This dataset is a converted version of agent traces from TeichAI/Ox-Alpha-Pi-Traces, aiming to replace original agent tool calls (e.g., write, edit) with file operations executed via the Emacs python-bridge. It contains 2,246 valid traces, each consisting of a series of toolCall blocks in assistant messages and corresponding toolResult messages. After conversion, two formats are provided: ipython mode (representing each call as a code cell in the prime-agent REPL) and tools mode (retaining named tool calls ox_bridge_write and ox_bridge_edit with Python source code). The dataset can be used to train or evaluate agents on file creation and editing tasks in the Emacs environment via bridge-only approach, and also for tool call benchmarking. It also includes a truncated trace (traces_quarantine/) and a few calls missing the path parameter.
数据集概述
Ox-Alpha Pi Agent Coding Traces(oxalpha-emacs-pipeline)是一个文本生成任务的数据集,规模介于100K到1M条记录之间,采用MIT许可证。
该数据集是对 TeichAI/Ox-Alpha-Pi-Traces 中代理轨迹的转换版本,核心特点是将原始的 write 和 edit 工具调用改写为通过 Emacs 的 python-bridge 执行的桥接调用。
转换机制
原始轨迹中的每个代理动作以 toolCall 形式存储,转换器将编辑类工具重写,其余部分保持不变。转换规则如下:
| 原始工具调用 | 转换后调用 |
|---|---|
write(path, content) |
get_emacs_func_result("ox-bridge-write", path, content) |
edit(path, hunk列表) |
get_emacs_func_result("ox-bridge-edit", path, json) |
bash(command) |
ipython 模式下调为 REPL 代码单元,tools 模式保持调用不变 |
数据集提供两种输出模式:
- ipython模式:将每次调用表示为代码单元,匹配 prime-agent 驱动 Emacs 的实际方式
- tools模式:保留命名工具调用(
ox_bridge_write和ox_bridge_edit),附带 Python 源码,适用于工具调用基准测试
数据规模与质量指标
数据集包含 2,246 条有效轨迹。完整转换产生的指标:
| 指标 | 数量 |
|---|---|
转换的 write 调用 |
6,868 |
转换的 edit 调用 |
4,629 |
保留的 bash 调用 |
18,616 |
| tools模式重写的工具结果 | 11,492 |
| ipython模式重写的工具结果 | 30,108 |
结构组成
数据集中包含以下目录和文件:
| 路径 | 说明 |
|---|---|
out_ipython/ |
2,246条 REPL 风格轨迹 |
out_tools/ |
2,246条带命名工具调用的轨迹 |
traces/ |
来自源数据集的2,246条有效原始轨迹 |
traces_quarantine/ |
1条上游解析失败的不完整轨迹 |
convert_traces.py |
转换器命令行工具 |
ox_trace_bridge.el |
注册桥接方法的Emacs辅助文件 |
system_prompt.md |
强制桥接编辑的系统提示词模板 |
已知数据问题
- 一条轨迹(文件名为
2026-08-24T15-04-15-603Z_...jsonl)在上传时出现两行截断,无法解析,已移入隔离区 - 少量源工具调用缺少
path参数,转换器会原样保留这些调用,不进行猜测
使用场景
- 回放验证:将转换后的轨迹对活跃 Emacs 实例进行回放,端到端验证桥接功能
- 模型微调或评估:使用
system_prompt.md作为系统提示,训练代理学习桥接编辑规则




