Skip to content

Commit de49901

Browse files
Refactor participant_names type hint to use list[str] and enhance completion check documentation for clarity
1 parent 8813f11 commit de49901

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/backend/orchestration/plan_review_helpers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
def get_magentic_prompt_kwargs(
3535
*,
3636
has_user_responses: bool = False,
37-
participant_names: Optional[list] = None,
37+
participant_names: Optional[list[str]] = None,
3838
) -> dict:
3939
"""Build the prompt-override kwargs dict for ``MagenticBuilder``.
4040
@@ -182,12 +182,14 @@ def get_magentic_prompt_kwargs(
182182
COMPLETION CHECK (CRITICAL):
183183
Before setting is_request_satisfied to true, you MUST verify:
184184
1. Review the conversation history and list every agent that has actually produced
185-
a substantive response (called tools and returned results).
185+
a substantive response (meaningful output — calling tools and returning results
186+
where the agent has tools, or producing a substantive text response otherwise).
186187
2. Compare that list against the plan steps. If ANY plan-step agent has NOT been
187188
invoked and produced a substantive response, set is_request_satisfied to false
188189
and select the next uninvoked agent as next_speaker.
189190
3. is_request_satisfied = true ONLY when ALL plan-step agents have completed
190-
their work successfully (called their tools, returned results).
191+
their work (produced a substantive response — tool results, or meaningful text
192+
output for agents that have no tools).
191193
- Each agent handles a DISTINCT domain. One agent's output does NOT satisfy
192194
another agent's step.
193195
- Do NOT re-invoke an agent that already completed its step successfully.

0 commit comments

Comments
 (0)