Skip to content

[FEATURE] Improving the Loop Node - Agentflow V2Β #4653

@toi500

Description

@toi500

The current state of the loop node is not at its best potential. Even though this node gives you the option to loop back to any previous node connected in its branch, the reality is that it only works when looping back to the LLM or Agent Node.

Image

So we have several alternatives here:

  1. Make it as basic as the v1 one (current state) and limit the options that don't work, as I explained above.

  2. Implement custom logic to loop back node by node (very time consuming and not very realistic, I guess).

  3. Finding a middle ground between 1 and 2, allowing users to insert variables into the loop node as the value to override in the target node. Here is a very basic example to make this understandable:

    • User wants to search about FLOWISE.
    • The Brave search is executed and returns some data.
    • A quality agent checks if the search is good enough.
    • If not, it routes to the refine agent. The refine agent will propose new search terms.

    And here is the new thing:

    • We would be able to, in the loop node, select the output of the Refine Search Terms agent {{agentAgentflow_0}}, forward that data back to the tool node again and OVERRIDE the tool node input (for this example, {{question}}).

If we do this right, this would provide Agentflow V2 a whole new dimension, IMHO.

FINAL NOTE: This sort of mapping data manually btw nodes is something that we do in n8n with no problem.

FINAL NOTE 2: Being able to update flow state in the loop node would do the job too.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions