diff --git a/src/lib/agents/search/researcher/actions/done.ts b/src/lib/agents/search/researcher/actions/done.ts index b19df4f..3c3e5f3 100644 --- a/src/lib/agents/search/researcher/actions/done.ts +++ b/src/lib/agents/search/researcher/actions/done.ts @@ -5,13 +5,13 @@ const actionDescription = ` Use this action ONLY when you have completed all necessary research and are ready to provide a final answer to the user. This indicates that you have gathered sufficient information from previous steps and are concluding the research process. YOU MUST CALL THIS ACTION TO SIGNAL COMPLETION; DO NOT OUTPUT FINAL ANSWERS DIRECTLY TO THE USER. IT WILL BE AUTOMATICALLY TRIGGERED IF MAXIMUM ITERATIONS ARE REACHED SO IF YOU'RE LOW ON ITERATIONS, DON'T CALL IT AND INSTEAD FOCUS ON GATHERING ESSENTIAL INFO FIRST. -` +`; const doneAction: ResearchAction = { name: 'done', schema: z.object({}), getToolDescription: () => - 'Only call this after ___plan AND after any other needed tool calls when you truly have enough to answer. Do not call if information is still missing.', + 'Only call this after 0_reasoning AND after any other needed tool calls when you truly have enough to answer. Do not call if information is still missing.', getDescription: () => actionDescription, enabled: (_) => true, execute: async (params, additionalConfig) => { diff --git a/src/lib/agents/search/researcher/actions/plan.ts b/src/lib/agents/search/researcher/actions/plan.ts index dcdd05b..05f2e13 100644 --- a/src/lib/agents/search/researcher/actions/plan.ts +++ b/src/lib/agents/search/researcher/actions/plan.ts @@ -10,7 +10,7 @@ const schema = z.object({ }); const actionDescription = ` -Use thi tool FIRST on every turn to state your plan in natural language before any other action. Keep it short, action-focused, and tailored to the current query. +Use this tool FIRST on every turn to state your plan in natural language before any other action. Keep it short, action-focused, and tailored to the current query. Make sure to not include reference to any tools or actions you might take, just the plan itself. The user isn't aware about tools, but they love to see your thought process. Here are some examples of good plans: @@ -18,12 +18,15 @@ Here are some examples of good plans: - "Okay, the user wants to know the latest advancements in renewable energy. I will start by looking for recent articles and studies on this topic, then summarize the key points." -> "I have gathered enough information to provide a comprehensive answer." - "The user is asking about the health benefits of a Mediterranean diet. I will search for scientific studies and expert opinions on this diet, then compile the findings into a clear summary." -> "I have gathered information about the Mediterranean diet and its health benefits, I will now look up for any recent studies to ensure the information is current." -` + +YOU CAN NEVER CALL ANY OTHER TOOL BEFORE CALLING THIS ONE FIRST, IF YOU DO, THAT CALL WOULD BE IGNORED. +`; const planAction: ResearchAction = { - name: '___plan', + name: '0_reasoning', schema: schema, - getToolDescription: () => 'Use this FIRST on every turn to state your plan in natural language before any other action. Keep it short, action-focused, and tailored to the current query.', + getToolDescription: () => + 'Use this FIRST on every turn to state your plan in natural language before any other action. Keep it short, action-focused, and tailored to the current query.', getDescription: () => actionDescription, enabled: (config) => config.mode !== 'speed', execute: async (input, _) => {