diff --git a/ts/smartagent.classes.dualagent.ts b/ts/smartagent.classes.dualagent.ts index 070b169..ec99ad9 100644 --- a/ts/smartagent.classes.dualagent.ts +++ b/ts/smartagent.classes.dualagent.ts @@ -319,9 +319,27 @@ export class DualAgentOrchestrator { const proposals = this.driver.parseToolCallProposals(driverResponse.content); if (proposals.length === 0) { - // No tool calls, continue the conversation + // No tool calls found - remind the model of the exact XML format driverResponse = await this.driver.continueWithMessage( - 'Please either use a tool to make progress on the task, or indicate that the task is complete with summary.' + `No valid tool call was found in your response. To use a tool, you MUST output the exact XML format: + + + tool_name + action_name + {"param1": "value1"} + + +For example, to validate JSON: + + json + validate + {"jsonString": "{\\"key\\":\\"value\\"}", "requiredFields": ["key"]} + + +Or to complete the task: +your final JSON output here + +Please output the exact XML format above.` ); this.conversationHistory.push(driverResponse); continue;