|
34 | 34 | def get_magentic_prompt_kwargs( |
35 | 35 | *, |
36 | 36 | has_user_responses: bool = False, |
37 | | - participant_names: Optional[list] = None, |
| 37 | + participant_names: Optional[list[str]] = None, |
38 | 38 | ) -> dict: |
39 | 39 | """Build the prompt-override kwargs dict for ``MagenticBuilder``. |
40 | 40 |
|
@@ -182,12 +182,14 @@ def get_magentic_prompt_kwargs( |
182 | 182 | COMPLETION CHECK (CRITICAL): |
183 | 183 | Before setting is_request_satisfied to true, you MUST verify: |
184 | 184 | 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). |
186 | 187 | 2. Compare that list against the plan steps. If ANY plan-step agent has NOT been |
187 | 188 | invoked and produced a substantive response, set is_request_satisfied to false |
188 | 189 | and select the next uninvoked agent as next_speaker. |
189 | 190 | 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). |
191 | 193 | - Each agent handles a DISTINCT domain. One agent's output does NOT satisfy |
192 | 194 | another agent's step. |
193 | 195 | - Do NOT re-invoke an agent that already completed its step successfully. |
|
0 commit comments