test10_complex_pipeline.json 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {
  2. "version": "3.15",
  3. "name": "Test10: Complex Multi-stage Pipeline",
  4. "registry": {
  5. "params": ["requirement(STRING)"],
  6. "vars": [
  7. "$plan(OBJECT)",
  8. "$tasks([OBJECT])",
  9. "$implementations([STRING])",
  10. "$report(STRING)"
  11. ],
  12. "files": { "inputs": [], "artifacts": ["Output/*"] }
  13. },
  14. "steps": [
  15. {
  16. "id": "LLM_Plan",
  17. "in": {
  18. "messages": [
  19. { "role": "system", "content": "You are a project planner. Given a requirement, output a plan as JSON." },
  20. { "role": "user", "content": "=requirement" }
  21. ],
  22. "output_config": {
  23. "format": {
  24. "type": "json_schema",
  25. "schema": {
  26. "type": "object",
  27. "properties": {
  28. "title": { "type": "string" },
  29. "tasks": {
  30. "type": "array",
  31. "items": {
  32. "type": "object",
  33. "properties": {
  34. "name": { "type": "string" },
  35. "description": { "type": "string" }
  36. },
  37. "required": ["name", "description"],
  38. "additionalProperties": false
  39. }
  40. }
  41. },
  42. "required": ["title", "tasks"],
  43. "additionalProperties": false
  44. }
  45. }
  46. }
  47. },
  48. "out": {
  49. "$plan": "=_result",
  50. "$tasks": "=_result.tasks"
  51. },
  52. "next": "Loop_Implement"
  53. },
  54. {
  55. "id": "Loop_Implement",
  56. "mode": "parallel",
  57. "source": "=$tasks",
  58. "children": ["LLM_Implement"],
  59. "next": "LLM_Report"
  60. },
  61. {
  62. "id": "LLM_Implement",
  63. "in": {
  64. "messages": [
  65. { "role": "user", "content": "=\"Implement in one sentence: \" + _item.name + \" - \" + _item.description" }
  66. ]
  67. },
  68. "out": { "$implementations[_index]": "=_result" },
  69. "next": "RETURN"
  70. },
  71. {
  72. "id": "LLM_Report",
  73. "in": {
  74. "messages": [
  75. { "role": "user", "content": "=\"Summarize in 2 sentences the project: \" + $plan.title" }
  76. ]
  77. },
  78. "out": "$report",
  79. "next": "Write_Report"
  80. },
  81. {
  82. "id": "Write_Report",
  83. "target": "Output/test10_report.txt",
  84. "value": "=$report",
  85. "next": "Stop_End"
  86. },
  87. { "id": "Stop_End" }
  88. ]
  89. }