Hi,
In AI Agent, I connected a workflow that returns a certain result. However, this result is reprocessed by the AI Agent with the addition of this line in the JSON: "formatting_instructions": "IMPORTANT: Always call format_final_response to format your final response!".
How can I intervene and remove or modify the value of formatting_instructions?
n8n version: 1.61.0
Running n8n via Render.com
Operating system: win 10 pro
I am not sure if there is a way to change it but it should be helping to correctly format the data into something we would expect. Is it causing any issues in your workflow?
Hi Jon, the text that returns from my workflow is perfectly formatted, with emojis and other stuff. So it is perfect for the final user. The format changes when AI Agent processes it, and all the emojis disappear.
I agree, I would also like to remove this code: JSON: "formatting_instructions": "IMPORTANT: Always call format_final_response to format your final response!" .
The issue encounter is the formatted answer is not as detailed as the response created by the chat model. I would prefer the originial answer prior to formatting that I can see in the Logs.
Having a similar issue. format_final_response messages are adding undefined history context to my database. When trying to recall chat in later iterations you get a “Cannot read properties of undefined (reading ‘map’)”
the issue still exists. formatting_instructions on Simple Memory. - local horror )))
i started using 2 days great n8n, but the inability to edit spoils the mood a little )))
is this closed source or open? if i go in and fix it? ok, i need to look at Git hub
This is a manual inconvenient hack:
The problem in the previous version was hidden in the ToolsAgent code, which manages Simple Memory and other nodes via Windows files %USERNAME%\AppData\Local\npm-cache_npx\x8с7eocxxxxxxxxx\node_modules@n8n\n8n-nodes-langchain\dist\nodes\agents\Agent\agents\ToolsAgent execute.js lines 170, 185, 188, 255 and execute.js.map
delete the phrase “IMPORTANT: and so on…”. leave the quotes " "
In the current version 1.94.1, look at the files common.js, common.js.map and in the V1 and V2 subdirectories - the files execute.js and execute.js.map
After editing - save the files - restart n8n
New discoveries await us in the new version. Good luck.