Error output prompt from tools

I was wondering if anyone has an easy solution to customizing error outputs in a tool?

usecase:
The Tool fails - the LLM responds based on what they think or the tool is skipped etc.

I would like:
Tool fails - a custom prompt (fixed or expression) gets returned to the LLM.

This would eliminate the need to include “what to do if the tool fails” in the agent system prompt. It also would be cool because then the agent will have very specific instructions on how to preceed based on each tool you add,

I know there are ways to do this… like creating a new workflow to be called with an intermediate step between a sencond Agent output and and the reponse… but thats way over kill.

It would be better to have it natively in the node in setting when you choose “On Error” - a Field could appear with the choice of fixed or exxpression to send back to the LLM.

Thoughts?

Also I am new here.

1 Like

Hi @AuroraBackcountry

In your tool, tell each step to continue using error output on error. Then write into your system prompt what to do if it returns an error output from the tool .

Hope this helps!

Robert

1 Like

Nice have to use this more oftern too :slight_smile: ahaa thanks

1 Like