I’ve been running into two major problems with using n8n’s AI Agents.
First of all, more often than not they run into the following error message after 5-10 calls: “Unable to parse JSON response from chat agent.”
Second, whenever I try to use GPTo1 in an AI Agent set up, I get this error: “400 Unsupported value: ‘messages[0].role’ does not support ‘system’ with this model”. This is the case with whichever type of agent I use.
My workflow is pretty standard, I’m just using an agent with an OpenAI chat model, SerpAPI tool and a structured output.
Simple solution: include your desired structure within the prompt.
I don’t use the output formatter. I started instructing LLMs to give me strict format output long before OpenAI built out the feature. The AI Agent node’s Structured Output Parser leaves a lot to be desired.