intent_creator
June 12, 2026 · View on GitHub
intent_creator
Stage 1 of ISE — 4D 结构化意图构造。
Persona × Domain × Task × Complexity:在用户需求的组合空间上采样意图,让训练分布由「用户想要什么」塑造,而不是由「有哪些 API」决定。
English · 简体中文
本仓库是 ISE(Intent → Simulate → Execute)三阶段数据合成范式的 Stage 1。
- 🛠️ Umbrella / 总入口: https://github.com/Valiere01/ISE-Trace
- ⚙️ Stage 2 + 3(多轮模拟 + 真实执行): https://github.com/NairongZheng/openclaw_gen_data
- 📄 论文: arXiv:2606.11520
- 🤗 数据集(ISETrace): https://huggingface.co/datasets/valiere/ISETrace
概述
训练一个能干活的 OS Agent,数据要同时具备三个属性:结构化的用户意图、多轮任务委派、真实落地的工具执行。多数合成流程从 API 目录出发反推任务——任务分布因此镜像工具空间,而不是用户真正想要什么。
intent_creator 解决其中的第一个 gap。它不从工具列表反推任务,而是在四个正交维度上采样,再由 LLM 把每个结构化元组渲染成一条自然语言用户意图:
| 维度 | 含义 | 池子规模(本仓库 ship 的资源) |
|---|---|---|
| Persona | 谁在提需求——角色、行业、专长、经验、沟通风格、工作场景 | 1,000 personas |
| Domain | 落在哪个功能域 | 10 domains |
| Task | 域内的抽象动作类型(语义锚点,非具体查询) | 175 tasks |
| Complexity | 一条意图横跨多少域、调多少任务 | 3 档(simple / medium / complex) |
采样空间是这四个维度的组合:单是「persona × 从 175 个 task 抽 5–6 个」这一步(complex 档),量级就已超过 10¹²——长尾与跨域意图是被「采样」出来的,而不是从一张 API 列表里枚举出来的。
这套池子是 ISE 论文中构建 ISETrace 语料所用 Stage 1 的开源版本。论文里报告的最终发布规模(去重后 43,956 条意图、965 个 persona 等)见 ISE-Trace 总入口 与论文;本仓库聚焦于可复现的生成流程本身。
在整条流水线中的位置
intent_creator openclaw_gen_data
+-------------------+ +-------------------+ +-----------+
| [1] Intent | intents| [2] Simulate | | |
| | .jsonl | [3] Execute | | ISETrace |
| Persona x Domain |------->| role-locked sim |------->| 轨迹语料 |
| x Task x Complex | | + real OS exec | | |
+-------------------+ +-------------------+ +-----------+
Stage I (本仓库) Stage S + E output
Stage 1 产出一份 intents.jsonl,由 Stage 2 + 3(openclaw_gen_data)消费:用 role-locked 用户模拟器驱动多轮交互,并把每个工具调用放到真实 OS 上隔离执行。两个阶段独立运行,通过这一份 jsonl 衔接。
快速开始
git clone https://github.com/NairongZheng/intent_creator
cd intent_creator
pip install -r requirements.txt
# 配置 LLM endpoint
cp .env.example .env # 填入 OPENAI_API_KEY 和 OPENAI_BASE_URL
# 生成意图(异步并发,推荐)
python main.py --count 1000 --max-concurrent 50 --output intents_out
这会把结构化意图边生成边追加到 intents_out/intents.jsonl,每行包含一条 natural_language_intent,以及它采样出的 domain / task / persona / complexity 与辅助 metadata。中途网络断开 / Ctrl-C,已生成的部分不会丢失。
先跑 5 条做 smoke test:
python main.py --count 5 --max-concurrent 1 --output /tmp/smoke
命令行参数
| 参数 | 说明 | 默认 |
|---|---|---|
--count | 生成意图数量 | 10 |
--output | 输出目录(写 intents.jsonl) | examples_test |
--backend | LLM 后端:openai / anthropic | openai |
--max-concurrent | 最大并发请求数(=1 即串行) | 50 |
模型、温度、复杂度分布等在 config.yaml 中配置(默认模型 qwen3.5-35b-a3b,复杂度分布 complex / medium / simple = 50% / 40% / 10%)。
工作原理
-
采样 persona — 从 1,000 人的全局画像池随机抽一个角色。
-
按复杂度定规模 —
complexity决定横跨几个域、抽几个 task:Complexity Domains Tasks simple 1 2–3 medium 2–3 3–4 complex 2–3 5–6 -
采样 domain / task — 在选中的域里抽抽象 task,并汇总这些 task 推荐的
tools/skills作为辅助信号。 -
LLM 渲染 — 把
(persona, domains, tasks, tools, skills, complexity)这个结构化元组交给 LLM,生成一条逻辑自洽、可执行的自然语言用户意图。task / tool / skill 是语义锚点,最终质量以natural_language_intent的可执行性为准。
十个功能域
轨迹在以下 10 个功能域上采样(域定义见 domains/*.json,括号内为本仓库 ship 的 task 数):
| Domain | 描述 | Tasks |
|---|---|---|
| intelligence-core | LLM 任务、文档理解、结构化处理与推理 | 15 |
| code-runtime | Python / Node.js / Bash 等运行时执行环境 | 18 |
| file-io | 文件读写、编辑、补丁应用、差异对比 | 18 |
| source-chain | Git / GitHub / 依赖管理与开发链路 | 20 |
| automation-flow | 工作流编排、定时任务、UI / 节点交互 | 18 |
| web-extraction | Web 搜索、网页抓取、HTTP / API 获取 | 16 |
| comms-social | 消息、邮件、社交平台与跨渠道沟通 | 17 |
| multimedia | 图像、音频、视频等多媒体生成与处理 | 20 |
| agent-memory | 会话管理、历史追踪、记忆检索、多代理协作 | 15 |
| system-infrastructure | 网络、安全、云连接、运行环境基础设施 | 18 |
Persona 池
1,000 个 persona,覆盖 47 个行业与 6 个经验层级。每个 persona 带角色、行业、专长、经验、沟通风格、工作场景等字段(schema 见 libraries/personas/personas.jsonl)。
行业分布(节选,共 47 个):
| 行业 | 数量 | 行业 | 数量 |
|---|---|---|---|
| Technology | 114 | Construction | 76 |
| Healthcare | 96 | Energy | 24 |
| Manufacturing | 91 | Logistics | 15 |
| Finance | 89 | Non-Profit | 9 |
| Retail | 89 | Automotive | 8 |
| Government | 85 | Hospitality | 7 |
| Education | 80 | …(其余 35 个行业) | … |
| Agriculture | 79 | ||
| Arts | 76 |
经验层级(全部 6 档):Senior 312 · Mid-level 283 · Expert 171 · Executive 121 · Junior 112 · Creative 1。
Tool 池
55 个工具,按来源与可见范围分层(定义见 libraries/tools/tools.jsonl,每个工具含 scope / provider / JSON-Schema 参数 / 源码 URL):
| 维度 | 取值(数量) |
|---|---|
| scope | core (24) · external (27) · plugin (4) |
| provider | system (24) · clawdinators (17) · nix-steipete (10) · plugin-sdk (3) · github (1) |
代表性工具(节选):exec、process、apply_patch、read / write / edit、web_search / web_fetch、browser、git / gh、python3 / nodejs_22 / bash、curl / jq / ripgrep、ffmpeg、memory_search、cron …
Skill 池
66 个 skill,用于增强 domain / task 的表达能力(定义见 libraries/skills/skills.jsonl,可复用的 skill 资产在 libraries/skills/skills_collections/)。
代表性 skill(节选,共 66 个):docx / pptx / xlsx / slides、pdf / pdf-text-extractor、data-analysis / chart-visualization / stock-analysis、test-driven-development / debugging-strategies / lint-and-validate、api-design-principles / aspnet-core / docker-essentials、deep-research / github-deep-research / scientific-writing、security-auditor / security-threat-model / credential-manager、torch-geometric / molecular-dynamics / astropy …
Complexity 档位
3 档,决定一条意图横跨多少域、调多少 task;默认采样分布 complex / medium / simple = 50% / 40% / 10%(在 config.yaml 中配置)。
| Complexity | Domains | Tasks | 默认占比 |
|---|---|---|---|
| simple | 1 | 2–3 | 10% |
| medium | 2–3 | 3–4 | 40% |
| complex | 2–3 | 5–6 | 50% |
数据格式
输出意图 — {output_dir}/intents.jsonl
每行一个 JSON 对象:
{
"id": "intent_abc123",
"natural_language_intent": "I need to read the config file and update the API endpoint.",
"domains": ["5369040a-..."],
"tasks": ["1de493eb-..."],
"persona_id": "4782a9ea-...",
"tools_used": ["1909a7ae-..."],
"skills_used": ["skill-id-1"],
"complexity": "simple",
"metadata": {
"persona": { "name": "Aarav Sharma", "role": "Cloud Solutions Architect", "...": "..." },
"domains": [
{ "name": "file-io", "selected_tasks": [{ "name": "Read File", "description": "..." }] }
]
}
}
资源池 — libraries/
| 文件 | 内容 | 规模 |
|---|---|---|
libraries/personas/personas.jsonl | 全局 persona 画像(角色 / 行业 / 专长 / 沟通风格 …) | 1,000 |
libraries/tools/tools.jsonl | 工具定义(scope / provider / JSON-Schema 参数 / 源码 URL) | 55 |
libraries/skills/skills.jsonl | 技能定义(增强 domain / task 表达) | 66 |
domains/*.json | 每文件一个 domain,含其 tasks 及 task 级推荐 tools / skills | 10 |
字段细节(persona / tool / domain / task 的完整 schema)见 docs/architecture.md,示例见 docs/examples.md。
仓库结构
intent_creator/
├── main.py # 入口:采样 + LLM 渲染 + 批量导出
├── config.yaml # 模型 / 温度 / 复杂度分布
├── domains/ # 10 个功能域定义(*.json)
├── libraries/
│ ├── personas/personas.jsonl # 全局 persona 池(1,000)
│ ├── tools/tools.jsonl # 全局 tool 池(55)
│ └── skills/ # 全局 skill 池(66)+ skills_collections
├── src/
│ ├── models/ # Intent / Domain / Persona / Tool / Skill 数据模型
│ ├── libraries/ # 资源加载器
│ ├── builders/ # IntentBuilder:4D 采样
│ ├── generators/ # LLM 渲染(含异步批量)
│ └── validators/ # 意图校验
├── scripts/
│ ├── gen_domain/ # 域 / 任务自动生成
│ └── gen_persona/ # persona 自动生成
└── docs/ # 架构、示例、设计
扩展资源池
- 加 persona / tool / skill: 直接往对应的
libraries/**/*.jsonl追加一行 JSON 即可,下次运行自动加载。 - 加 / 改 domain: 用
scripts/gen_domain/的脚本由 LLM 生成域定义与 tasks(详见scripts/gen_domain/README.md)。Domain 更新频次低,通常只在 tools / skills 有重大变化时重跑。
引用
如果你使用了 ISE-Trace、ISE 范式或 ISETrace 数据集,请引用:
@misc{isetrace2026,
title = {From Intent to Trajectory: Execution-Grounded Multi-Turn Data Synthesis for OS Agents},
author = {Valiere01},
year = {2026},
eprint = {2606.11520},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2606.11520}
}
许可
本项目代码以 MIT License 发布。ISETrace 数据集单独分发,其使用条款见数据集卡片。