ai-web-research.workflow.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. },
  63. "inputs": {
  64. "objective": {"source": "variable", "name": "objective"},
  65. "output_schema": {"source": "variable", "name": "output_schema"},
  66. "constraints": {"source": "variable", "name": "constraints"},
  67. "max_attempts": {"source": "variable", "name": "max_attempts"}
  68. }
  69. },
  70. {
  71. "id": "end",
  72. "type": "flow.end",
  73. "title": "结束",
  74. "position": {"x": 680, "y": 180},
  75. "params": {},
  76. "inputs": {}
  77. }
  78. ],
  79. "edges": [
  80. {
  81. "id": "start_to_research",
  82. "kind": "control",
  83. "source": "start",
  84. "source_port": "next",
  85. "target": "research",
  86. "target_port": "run"
  87. },
  88. {
  89. "id": "research_to_end",
  90. "kind": "control",
  91. "source": "research",
  92. "source_port": "success",
  93. "target": "end",
  94. "target_port": "run"
  95. },
  96. {
  97. "id": "partial_to_end",
  98. "kind": "control",
  99. "source": "research",
  100. "source_port": "partial",
  101. "target": "end",
  102. "target_port": "run"
  103. }
  104. ]
  105. }