| 83 | type WorkflowAgentInput = z.infer<typeof workflowAgentSchema> |
| 84 | |
| 85 | const inputSchema = () => |
| 86 | z.strictObject({ |
| 87 | workflow_name: z |
| 88 | .string() |
| 89 | .min(1) |
| 90 | .describe('Short stable workflow name used in the task UI'), |
| 91 | objective: z |
| 92 | .string() |
| 93 | .min(1) |
| 94 | .describe('Overall goal of the workflow'), |
| 95 | execution: z |
| 96 | .enum(['sequential', 'parallel']) |
| 97 | .default('sequential') |
| 98 | .describe('Whether the workflow agents should run sequentially or in parallel'), |
| 99 | agents: z |
| 100 | .array(workflowAgentSchema) |
| 101 | .min(1) |
| 102 | .max(8) |
| 103 | .describe('One or more agent runs to execute as part of the workflow'), |
| 104 | }) |
| 105 | type InputSchema = ReturnType<typeof inputSchema> |
| 106 | |
| 107 | type Input = z.infer<InputSchema> |