Perhaps after a year, I'm still a "newbie" but I simply can't solve these problems

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:

  1. Can’t access token counts from an Agent (sub node)
  2. 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
  3. Can’t output to console from a code node even though it allows that function
  4. 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.
  5. Metrics output (/metrics) doesn’t give anything regards to node-level or workflow-level performance, ram usage, execution duration, etc
  6. 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.
  7. can’t return binary data to a tool call
  8. 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
  9. 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”
  10. 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
  11. output from an Agent is sometimes $json.output[0].text, sometimes $json.output
  12. 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.

Hi,

I think you can never know all, only improve. Give it another year :).

Regarding point 5. Detailed workflow performance can be found in the DB directly. I guess it’s a performance trade-of why it’s not directly exposed. When you start having hundreds of active flows it becomes a problem. Logging and monitoring everything.

Reg,
J.

Regarding the last part, I have similar feelings. Have been searching for optimisations / answers.

Langgraph might be a solution : https://youtu.be/XiySC-d346E?si=8swhVhlGpN8mViRX

Also there is a lot of research going into that

Reg,

J.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.