Coding for 30 years.
AI coding for years.
N8N for 1 year.
I automate heavily with n8n but I stay away from agents as every time I try them they “suck”.
I’m trying again, moving from lines of code to n8n and here’s what I can’t work out. I’d love to hear about any solutions to this problems:
- Can’t access token counts from an Agent (sub node)
- Can’t access errors in a sub node and can’t work out how to prevent the entire workflow from stopping (eg; when max token reached) when there’s a sub-node error
- Can’t output to console from a code node even though it allows that function
- Google LLM on an Agent constantly gives “parts can not be empty”. I see that some people solve this by putting an “edit fields” node before the agent but if you want to pass through binary images then there’s multiple parts and I get the error.
- Metrics output (/metrics) doesn’t give anything regards to node-level or workflow-level performance, ram usage, execution duration, etc
- Can’t add base64 data into the prompt, or URL’s, or many other features that various LLMs support. I know the go-to answer is to use an HTTP node but then why use n8n? And I can’t have tool calling on an http node.
- can’t return binary data to a tool call
- Often agents call tools in an endless loop using up all max iterations, erroring and then (see point 2), I can’t handle the error
- Often an agent saying “I will do that” / “I will call that tool” and we get into an endless loop of me saying, “go for it” and the LLM saying “I will”
- Consistent problems with getting output in the desired format, whether I use an output parser or not. Usually, there’s added ``` or other formatting issues
- output from an Agent is sometimes $json.output[0].text, sometimes $json.output
- To handle the issue in point (11) I can’t reference $json.output[0].text to check if it exists because referencing anything that doesn’t exist, or a node that hasn’t executed, causes the node doing the check to cause an error, or just output [undefined].
I appreciate that “prompt engineering” is the go-to answer for some of these issues and I know I could spend hours and hours on that but I’m put off doing that because there’s no “backup” way to handle errors (eg; point 2, 4, and 12) so I’m reluctant to put vast effort into the world of prompt engineering when prompt engineering can’t tame a non-deterministic beast (LLMs) and so there needs to be solid ways within n8n to cater for the scenarios when the beast can’t be tamed and I’m not confident those ways exist.