langflow icon indicating copy to clipboard operation
langflow copied to clipboard

How to add new outputs in Langflow Custom Component via `update_build_config`

Open FILM6912 opened this issue 1 year ago • 1 comments

Hello,

I’m working on a Langflow Custom Component and I’d like the update_build_config function to add new outputs.

Current outputs:

outputs = [
    Output(display_name="Agent 1", name="agent_1", method="agent1", group_outputs=True),
]

Expected outputs after calling update_build_config:

outputs = [
    Output(display_name="Agent 1", name="agent_1", method="agent1", group_outputs=True),
    Output(display_name="Agent 2", name="agent_2", method="agent2", group_outputs=True),
]

Question: Is there a recommended way or pattern to add new outputs to a custom component using update_build_config?

Thank you in advance for any advice! 🙏

FILM6912 avatar Oct 02 '25 08:10 FILM6912

@FILM6912 In the example you gave, both outputs would be displayed in the component.

There are other options:

Do not use group_outputs=True: Outputs are displayed in a selection list format, and only one output can be used at a time.

The update_build_config is not directly related to outputs, but to dynamic inputs.

For dynamic outputs, you should use: update_outputs

I have a repository with several examples of components and specific rules (practices) for creating these dynamic components: https://github.com/Empreiteiro/langflow-factory/tree/master/.cursor/rules

Two cool examples (With dynamic inputs and outputs):

  • https://github.com/Empreiteiro/langflow-factory/blob/master/components/google/gcp/big_query.py
  • https://github.com/Empreiteiro/langflow-factory/blob/master/components/project_management/pipefy_integration.py

Empreiteiro avatar Oct 02 '25 12:10 Empreiteiro