Hi there, I'm working with an Agent that has several tools integrated.
I'm currently managing the tool execution flow through the Agent's prompt.
My goal is to use the output from one tool as the input for another. Is this achievable?
Thanks,
Prince
Yes, you can instruct the AI agent to do that. It will retrieve the output and utilize it as input.
Configuring your tools with suitable descriptions and employing the $fromAI
function should suffice.
An alternative approach would be to use a sub-workflow and the “Call subworkflow” tool to execute everything within a single invocation.
In this scenario, you would use standard nodes to manage the process and simply return the final output to the AI.
If this response addresses your question, kindly consider marking it as the solution.
Hello! I believe I've found the solution you're looking for:
It seems there isn't a direct way to accomplish this, unfortunately.
However, there is a workaround:
Add this option to your Agent:
Enable it:
When this tool executes:
You will observe its outcome in the output:
To filter by the tool name, you can implement it like this:
{{ $json.intermediateSteps
.filter(item => item.action.tool === "get_pokemon_info")
.map(item => JSON.parse(item.observation)) }}
If this response resolves your query, please consider marking it as the solution.
This discussion was automatically closed 90 days following the last response. New responses are no longer permitted.