You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manages multi-step problem-solving processes with support for sequential progression, branching paths, and step revisions.
1
+
# Workflow Tool: Guiding Complex Problem-Solving
2
2
3
-
Use this tool to:
4
-
- Break down complex problems into sequential steps
5
-
- Create alternative solution paths through branching
6
-
- Revise previous steps as your understanding evolves
7
-
- Maintain context across multi-step reasoning processes
3
+
Manages multi-step problem-solving processes with support for sequential progression, branching paths, and step revisions. This tool is designed to help you (the LLM) structure your reasoning, explore alternatives, and adapt your approach as your understanding of a problem evolves.
8
4
9
-
Returns JSON response with workflow status.
5
+
Returns a JSON response detailing the current workflow status, including the last step taken, active branches, and overall progress.
6
+
7
+
## When to Use This Workflow Tool
8
+
9
+
This tool is most effective when you need to:
10
+
11
+
***Deconstruct Complex Problems**: Break down large or multifaceted tasks into a manageable sequence of discrete steps.
12
+
***Plan and Design Iteratively**: Develop plans or designs where initial assumptions might need revision as more information is processed.
13
+
***Explore Multiple Solution Paths**: Investigate different approaches or hypotheses by creating distinct branches in your reasoning process.
14
+
***Perform In-depth Analysis with Course Correction**: Conduct detailed analysis that may require backtracking or revising earlier conclusions.
15
+
***Handle Problems with Unclear Scope**: Tackle tasks where the full extent of steps or requirements isn't known at the outset.
16
+
***Maintain Long-Term Context**: Keep track of progress and decisions across a series of interactions for a multi-step task.
17
+
***Systematically Generate and Verify Hypotheses**: Formulate a potential solution or explanation, then use subsequent steps to test and validate it.
18
+
***Document Your Reasoning Process**: Clearly lay out each step of your thought process for transparency and review.
19
+
20
+
## Best Practices for Using the Workflow Tool
21
+
22
+
To leverage this tool most effectively, please follow these guidelines:
23
+
24
+
1.**Start with an Initial Estimate, Adapt as Needed**: Begin with a reasonable estimate for `total_steps`. However, feel free to adjust this value (up or down) in subsequent steps as your understanding of the task's complexity changes. The tool will accommodate these adjustments.
25
+
2.**Embrace Revisions**: Don't hesitate to use `is_step_revision` and `revises_step` if you realize an earlier step needs correction or refinement. Clearly describe what is being revised and why.
26
+
3.**Utilize Branching for Alternatives**: If multiple approaches seem plausible, use `branch_from_step` and `branch_id` to explore them in parallel without losing the main line of thought. Give your branches descriptive `branch_id`s.
27
+
4.**Be Explicit About Uncertainty**: If you are unsure about a step or a direction, you can note this in the `step_description`.
28
+
5.**Clearly Define Each Step**: Ensure each `step_description` is detailed and clearly states what that specific step accomplishes, any conclusions drawn, or any questions that arise.
29
+
6.**Manage `next_step_needed` and `needs_more_steps` Deliberately**:
30
+
* Set `next_step_needed` to `false` only when the *current specific sequence or sub-task* is complete.
31
+
* Use `needs_more_steps` (optional) to indicate if the *overall problem or workflow* requires further steps, even if the current local sequence (`next_step_needed: false`) is ending. For example, you might finish a branch (`next_step_needed: false`) but still need to return to the main workflow or start a new one (`needs_more_steps: true`). Set `needs_more_steps: false` when you are confident the entire problem is resolved.
32
+
7.**Hypothesis Management**:
33
+
* When appropriate, use a step to explicitly state a hypothesis in the `step_description`.
34
+
* In subsequent steps, describe how you are testing or verifying this hypothesis.
35
+
8.**Sequential Integrity**: Ensure `step_number` increments logically. While you can revise past steps, new steps should generally follow in sequence.
36
+
9.**Final Answer**: When the entire workflow is complete (`next_step_needed: false` and `needs_more_steps: false` (or omitted and implied false)), the final step's description should ideally contain or clearly lead to the final answer or solution.
10
37
11
38
## Parameters
12
39
13
40
### Required
14
-
-`step_description`: Detailed description of what this step accomplishes
15
-
-`step_number`: Current position in the workflow sequence (e.g., 1 for first step)
16
-
-`total_steps`: Estimated total number of steps in the complete workflow
17
-
-`next_step_needed`: Set to true if another step will follow this one, false if this is the final step
41
+
-`step_description` (string): Detailed description of what this step accomplishes, including any reasoning, conclusions, or questions.
42
+
-`step_number` (integer): Current position in the workflow sequence (e.g., 1 for first step). Must be >= 1.
43
+
-`total_steps` (integer): Your current best estimate of the total number of steps needed for the *entire* workflow. Can be adjusted in subsequent steps. Must be >= `step_number`.
44
+
-`next_step_needed` (boolean): Set to `true` if another step is expected to *immediately follow this one* in the current sequence or branch. Set to `false` if this is the last step of the current sequence/branch.
18
45
19
46
### Optional
20
-
-`is_step_revision`: Set to true if this step revises a previous step
21
-
-`revises_step`: If revising a previous step, specify which step number is being revised
22
-
-`branch_from_step`: If creating a branch, specify which step number this branch starts from
23
-
-`branch_id`: A unique identifier for this branch (required when creating a branch)
24
-
-`needs_more_steps`: Indicates whether additional steps are required to complete the workflow
25
-
26
-
## Features
47
+
-`is_step_revision` (boolean): Set to `true` if this step revises or corrects a previous step.
48
+
-`revises_step` (integer): If `is_step_revision` is true, specify the `step_number` of the step being revised. Must be a valid, existing step number.
49
+
-`branch_from_step` (integer): If creating a new branch, specify the `step_number` from which this new branch originates. Must be a valid, existing step number.
50
+
-`branch_id` (string): A unique and descriptive identifier for the branch being created or continued (e.g., "explore-alternative-api", "deep-dive-cause-analysis"). Required if `branch_from_step` is provided for a new branch, or if continuing an existing branch.
51
+
-`needs_more_steps` (boolean): Set to `true` if you anticipate more steps are needed to fully resolve the *overall problem*, even if `next_step_needed` is `false` for the current step (e.g., you've completed a branch but need to return to the main flow or analyze another aspect). If omitted, the system may infer based on `next_step_needed` and `total_steps`. Set explicitly to `false` when the entire problem is solved.
27
52
28
-
-**Sequential Progression**: Track steps in order with automatic numbering
29
-
-**Branching**: Create alternative solution paths from any step
30
-
-**Step Revision**: Update and improve previous steps as understanding evolves
53
+
## Features Summary
31
54
32
-
-**Context Preservation**: Maintain workflow state across multiple interactions
33
-
-**Validation**: Automatic validation of step relationships and branching logic
55
+
-**Sequential Progression**: Steps are tracked in order.
56
+
-**Dynamic `total_steps`**: The `total_steps` can be adjusted by you as the workflow progresses.
57
+
-**Branching**: Create and switch between alternative solution paths.
58
+
-**Step Revision**: Mark steps that update or correct prior steps.
59
+
-**Context Preservation**: Workflow state (history, branches) is maintained across calls.
60
+
-**Input Validation**: Ensures logical consistency of parameters.
34
61
35
62
## Output
36
63
37
-
Returns a JSON response containing:
38
-
- Current step information and status
39
-
- Branch information and active branch status
40
-
- Step count and completion status
64
+
Returns a JSON object detailing the current workflow status:
65
+
-`step_number` (integer): The number of the step just processed.
66
+
-`total_steps` (integer): The current total number of steps, possibly updated by the last call.
67
+
-`next_step_needed` (boolean): The `next_step_needed` value from the last step.
68
+
-`last_step_description` (string): The description of the step just processed.
69
+
-`current_branch` (string | null): The ID of the active branch, if any.
70
+
-`branches` (array of strings): A list of all unique `branch_id`s created so far.
71
+
-`step_history_length` (integer): The total number of steps recorded in the main history (includes steps from all branches).
0 commit comments