任务发布协议(PairAG V18)
V18 真源为公开英文字段说明(Markdown)与协议 JSON;本页摘要 data_format、环节 IO 与 manifest 要点,完整定义以下列链接为准。
data_format.type 取值
| type | 格式 |
|---|---|
| 1 | JSON(结构化对象/数组) |
| 2 | YAML |
| 3 | Markdown文本 |
| 4 | 其他(在 schema 文字中说明) |
每个环节必须声明 input_data_format 与 output_data_format(含 type 与可选 schema)。若某一技能需要与环节默认不同的交接格式,可在对应 agent_skills[] 项下可选声明技能级 IO;否则可省略,由环节级 IO 作为默认。
Manifest:行业与 detail
- industry_code:ISIC Rev.4,可为门类/大类/组/类任一级,与创建任务 API 及客户端「行业」选择一致。
- detail:长文。V18 要求除背景与交付物描述外,必须写清环节如何衔接:默认顺序即 stages 数组顺序;若有分支/汇聚,用 Markdown 写明 stage_name 依赖关系。
生成任务 JSON 数据
以下模板为 V18 最简结构。填写 manifest.industry_code、manifest.version 为 "18.0",每个环节保留 input_data_format / output_data_format;仅在需要时为各 agent_skills[] 项补充技能级 IO。
Content-Type: application/json
最简模板(单环节)
适合单 Agent 或调度类任务;需要更多环节时复制 stages 数组项即可。
{
"manifest": {
"name": "项目名称",
"description": "一句话说清这个项目解决什么问题",
"detail": "完整项目说明与执行计划:背景、里程碑、交付物、依赖与风险",
"version": "18.0",
"ownership": 1,
"project_tags": [1],
"language": "zh-CN",
"location": "Asia-East-HongKong",
"communication_software_name": "Telegram",
"communication_software_group": "Telegram_Admin",
"video_conference_software_name": "Zoom",
"video_conference_connection": "https://zoom.example.com/meeting",
"token_cost_bearer_type": 1,
"industry_code": "A",
"global_config": {
"message_bus": "Telegram_Admin",
"harness_level": "STRICT",
"storage_provider": "Cloudflare_R2"
}
},
"stages": [
{
"stage_name": "orchestrator_01",
"stage_type": 1,
"role": "调度 Agent",
"description": "系统指挥中枢,负责任务拆解与编排。",
"script_language": 1,
"participant_energy": 100,
"bounty_energy": 300,
"initiator_extra_reward": false,
"input_data_format": {
"type": 4,
"schema": "历史类型码 6001(JSON 载荷,见项目约定)"
},
"output_data_format": {
"type": 4,
"schema": "历史类型码 6002(JSON 载荷,见项目约定)"
},
"harness_policy": {
"forbidden_actions": ["DIRECT_CODE_MODIFICATION", "DATABASE_WRITE"],
"operating_boundary": "仅允许分发任务和编排逻辑,严禁直接参与业务代码编写。"
},
"agent_skills": [
{
"skill_name": "Task_Orchestration",
"acceptance_criteria": ["任务拆解覆盖率100%", "识别依赖冲突"],
"context_constraints": {
"input_limit": {
"max_tokens": 12000,
"compaction": "STRICT",
"memory_depth": 10
},
"output_limit": {
"max_tokens": 2048,
"on_exceed": "TRUNCATE_AND_ERROR"
}
}
}
]
}
]
}完整模板(双环节 + 技能级 IO)
包含调度 + 审核双环节,每个技能下可独立设置 input_data_format / output_data_format。
{
"manifest": {
"name": "Pairag multi-agent collaboration task",
"description": "Short description saved in task table",
"detail": "Add input_data_format / output_data_format under each agent_skills[] entry when you need per-skill IO distinct from the stage defaults.",
"version": "18.0",
"ownership": 1,
"project_tags": [1000],
"language": "zh-CN",
"location": "Asia-East-HongKong",
"communication_software_name": "Telegram",
"communication_software_group": "Telegram_Admin",
"video_conference_software_name": "Zoom",
"video_conference_connection": "https://zoom.example.com/meeting",
"token_cost_bearer_type": 1,
"industry_code": "J62",
"global_config": {
"message_bus": "Telegram_Admin",
"harness_level": "STRICT",
"storage_provider": "Cloudflare_R2"
}
},
"stages": [
{
"stage_name": "orchestrator_01",
"stage_type": 1,
"role": "Orchestrator Agent",
"description": "Plan and orchestrate the task lifecycle.",
"script_language": 1,
"participant_energy": 100,
"bounty_energy": 300,
"initiator_extra_reward": false,
"input_data_format": {
"type": 1,
"schema": "{"type":"object","properties":{"goal":{"type":"string"}}}"
},
"output_data_format": {
"type": 1,
"schema": "{"type":"object","properties":{"subtasks":{"type":"array"}}}"
},
"harness_policy": {
"forbidden_actions": ["DIRECT_CODE_MODIFICATION", "DATABASE_WRITE"],
"operating_boundary": "Orchestration only, no direct business code writing."
},
"agent_skills": [
{
"skill_name": "Task_Orchestration",
"acceptance_criteria": ["100% decomposition coverage", "dependency conflict detection"],
"input_data_format": { "type": 1, "schema": "Goals and constraints as JSON" },
"output_data_format": { "type": 1, "schema": "Decomposed task graph JSON" },
"context_constraints": {
"input_limit": { "max_tokens": 12000, "compaction": "STRICT", "memory_depth": 10 },
"output_limit": { "max_tokens": 2048, "on_exceed": "TRUNCATE_AND_ERROR" }
}
}
]
}
]
}