ai-web-research.workflow.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. "schema_version": "workflow/v1",
  3. "workflow_key": "ai-web-research",
  4. "name": "AI 多轮网页搜索研究",
  5. "description": "AI 制定搜索计划,使用视觉浏览器多轮研究,并按调用方提供的 JSON Schema 返回结果。",
  6. "variables": {
  7. "objective": {
  8. "type": "string",
  9. "default": "",
  10. "description": "要搜索和研究的目标"
  11. },
  12. "output_schema": {
  13. "type": "object",
  14. "default": {
  15. "type": "object",
  16. "required": ["summary", "facts"],
  17. "properties": {
  18. "summary": {"type": "string"},
  19. "facts": {"type": "array", "items": {"type": "string"} }
  20. },
  21. "additionalProperties": false
  22. },
  23. "description": "最终 data 字段必须满足的 JSON Schema"
  24. },
  25. "constraints": {
  26. "type": "object",
  27. "default": {"language": "zh-CN", "min_sources": 1},
  28. "description": "来源、语言、时间范围等研究约束"
  29. },
  30. "max_attempts": {
  31. "type": "number",
  32. "default": 3,
  33. "description": "AI 评估未达标时最多执行的搜索轮数"
  34. }
  35. },
  36. "settings": {
  37. "max_steps": 10,
  38. "default_timeout_ms": 1800000,
  39. "on_unhandled_error": "pause_for_user",
  40. "return": {"node_id": "research"}
  41. },
  42. "nodes": [
  43. {
  44. "id": "start",
  45. "type": "flow.start",
  46. "title": "开始",
  47. "position": {"x": 80, "y": 180},
  48. "params": {},
  49. "inputs": {}
  50. },
  51. {
  52. "id": "research",
  53. "type": "research.ai_web_research",
  54. "title": "AI 规划并循环研究",
  55. "position": {"x": 360, "y": 180},
  56. "params": {
  57. "search_engine": "bing",
  58. "browser": "edge",
  59. "max_search_pages": 2,
  60. "result_count": 2,
  61. "detail_max_pages": 2,
  62. "click_attempts": 2,
  63. "maximize_browser": true,
  64. "page_load_wait_seconds": 8,
  65. "action_wait_seconds": 1,
  66. "wait_jitter_min_seconds": 0,
  67. "wait_jitter_max_seconds": 0
  68. },
  69. "inputs": {
  70. "objective": {"source": "variable", "name": "objective"},
  71. "output_schema": {"source": "variable", "name": "output_schema"},
  72. "constraints": {"source": "variable", "name": "constraints"},
  73. "max_attempts": {"source": "variable", "name": "max_attempts"}
  74. }
  75. },
  76. {
  77. "id": "end",
  78. "type": "flow.end",
  79. "title": "结束",
  80. "position": {"x": 680, "y": 180},
  81. "params": {},
  82. "inputs": {}
  83. }
  84. ],
  85. "edges": [
  86. {
  87. "id": "start_to_research",
  88. "kind": "control",
  89. "source": "start",
  90. "source_port": "next",
  91. "target": "research",
  92. "target_port": "run"
  93. },
  94. {
  95. "id": "research_to_end",
  96. "kind": "control",
  97. "source": "research",
  98. "source_port": "success",
  99. "target": "end",
  100. "target_port": "run"
  101. },
  102. {
  103. "id": "partial_to_end",
  104. "kind": "control",
  105. "source": "research",
  106. "source_port": "partial",
  107. "target": "end",
  108. "target_port": "run"
  109. }
  110. ]
  111. }