Back to Langflow

Human Input

docs/docs/Components/human-input.mdx

1.12.0.dev02.5 KB
Original Source

import Icon from "@site/src/components/icon"; import PartialParams from '@site/docs/_partial-hidden-params.mdx';

The Human Input component pauses a flow so a human can review content and choose an action. Each configured User Action becomes a branch output. After the human makes a decision, the flow continues only on the selected branch.

Use the Human Input component in a flow

This example gates a flow with Approve and Reject branches:

  1. Add a Human Input component from Flow Controls.
  2. In Form Content, enter text for the human reviewer, such as Review this summary before it is sent to the customer.
  3. In User Actions, keep the default values Approve and Reject. Optionally, add a custom label, such as Escalate. Each action adds a matching output handle to the component.
  4. Connect the Approve output to the components to run when the request is approved.
  5. Connect the Reject output to an alternate path, such as a Chat Output component that explains the rejection.
  6. Run the flow in the <Icon name="Play" aria-hidden="true"/> Playground. When execution reaches the Human Input node, select an action in the approval pane to resume the flow.

:::tip Each User Action label maps to a stable action_id in API resume requests. For example, Request Changes becomes request_changes. :::

Configure timeouts and fallback

Enable fallback to create a new output handle from the component. If no decision arrives before the configured timeout, Langflow routes to this Fallback output.

To handle unanswered requests, do the following:

  1. In the component inspection panel, select Enable Fallback.
  2. Set the Timeout time.
  3. Connect the Fallback output to the logic that should run when the timeout expires.

Human Input parameters

NameDisplay nameDescription
promptForm ContentContent shown to the human for review.
decisionsUser ActionsActions the human can select. Each action becomes a component branch output.
timeoutTimeoutWhen Enable Fallback is on, how long to wait for a response before taking the fallback path.
enable_fallbackEnable FallbackWhen enabled, adds a Fallback output used when no user action is answered within the timeout.
<PartialParams />

See also