Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: more information on run flow component #6046

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/docs/Agents/agent-tool-calling-agent-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Point **API Request** to an online rules document, tell your agent `You are a fu
* You need to learn a new software language quickly.
Point **API Request** to some docs, tell your agent `You are a knowledgeable software developer who uses the tools at your disposal`, and start learning.

If your agent is not working as expected, use the **Edit Tools** button to modify a connected tool's `name`, `description`, and `inputs` metadata. This information helps the agent understand how to use the tool.

See what problems you can solve with this flow. As your problem becomes more specialized, add a tool. For example, the [simple agent starter project](/starter-projects-simple-agent) adds a Python REPL component to solve math problems that are too challenging for the calculator.

## Use an agent as a tool
Expand Down
32 changes: 22 additions & 10 deletions docs/docs/Components/components-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,35 @@ This component generates a notification for the Listen component to use.

## Run flow

This component allows you to run a specified flow with given inputs and tweaks.
This component allows you to run any flow stored in your Langflow database without opening the flow editor.

The RunFlowComponent executes a specified flow within a larger workflow. It provides the ability to run a flow with custom inputs and apply tweaks to modify its behavior.
The Run Flow component can also be used as a tool when connected to an [Agent](/components-agents). The `name`, `description`, and `inputs` metadata that the Agent uses to register the tool are created automatically.

When you select a flow, the component fetches the flow's graph structure and uses it to generate the inputs and outputs for the Run Flow component.

To use the Run Flow component as a tool, do the following:
1. Add the **Run Flow** component to the [Simple Agent](/starter-projects-simple-agent) flow.
2. In the **Flow Name** menu, select the sub-flow you want to run.
The appearance of the **Run Flow** component will change to reflect the inputs and outputs of the selected flow.
3. On the **Run Flow** component, enable **Tool Mode**.
4. Connect the **Run Flow** component to the **Toolset** input of the Agent.
Your flow should now look like this:
![Run Flow component](/img/component-run-flow.png)
5. Run the flow. The Agent will use the Run Flow component as a tool to run the selected sub-flow.

### Inputs

| Name | Type | Description |
|-------------|--------------|-------------------------------------------------------|
| input_value | String | The input value for the flow to process. |
| flow_name | Dropdown | The name of the flow to run. |
| tweaks | Nested Dict | Tweaks to apply to the flow. |
| Name | Type | Description |
|-------------------|----------|----------------------------------------------------------------|
| flow_name_selected| Dropdown | The name of the flow to run |
| flow_tweak_data | Dict | Dictionary of tweaks to customize the flow's behavior |
| dynamic inputs | Various | Additional inputs are generated based on the selected flow |

### Outputs

| Name | Type | Description |
|-------------|-------------|------------------------------------------------|
| run_outputs | List[Data] | The results generated from running the flow. |
| Name | Type | Description |
|--------------|-------------|---------------------------------------------------------------|
| run_outputs | List[Data] | All outputs generated from running the flow |

## Sub Flow

Expand Down
Binary file added docs/static/img/component-run-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading