FibCatchDownload the Code node

Install

Put FibCatch after the agent

You need an n8n workflow that already has an AI Agent node. The check is a Code node. It does not call a model, and it does not need an API key.

Download the Code nodeDownload the sample workflow

Try the sample first

  1. Download the sample workflow.
  2. In n8n, open the menu and choose Import from File.
  3. Open the imported workflow and click Execute workflow.
  4. You get three items: a FAIL (the 0.85 run), a PASS, and a WARN. Open one and look at the field named fibcatch.

On your own agent

  1. Open the workflow and double-click the AI Agent node.
  2. Click Add option (it may say Options). Choose Return Intermediate Steps and turn it on. Close the node.
  3. Add a Code node and connect the agent’s main output to it. That is the dot on the right of the agent, not the dots for the model, memory, or tools.
  4. Open the Code node. Set Mode to Run Once for All Items and Language to JavaScript.
  5. Delete the sample code. Paste the whole FibCatch file. Don’t paste only the middle.
  6. Execute the step, or execute the workflow.
  7. In the output, open fibcatch. verdict is PASS, WARN, or FAIL. unbacked is every number with no receipt. stale is numbers taken from a tool result older than 24 hours. toolErrors lists tools that failed, and whether the answer admitted it.

Stop the workflow on FAIL

FibCatch does not turn the node red. The original problem was a green node with a wrong answer, so the verdict stays as data you can branch on.

  1. Add an IF node after FibCatch.
  2. Condition: value {{ $json.fibcatch.verdict }} is equal to FAIL.
  3. Send the true branch to Slack, email, or wherever a person will see it.

Stale data

At the top of the file, STALE_AFTER_HOURS is 24. Set it to 0 to turn the freshness check off. WARN_WHEN_NO_TIMESTAMP is true. Set it to false if you do not want a warning when a JSON tool result has no date. A calculator result such as 666 is left alone either way. A date with no time of day counts as the end of that day, in UTC.

If the user message isn’t on the item

A number you typed counts as a receipt. The Code node looks for it on the agent item (chatInput, and a few other common fields) and on a trigger named “When chat message received”, “Chat Trigger”, or “Webhook”. If your trigger has another name, add that name to TRIGGER_NODE_NAMES at the top of the file.

What the words mean

When it looks wrong