Skip to content

RunnableParallel

RunnableParallel passes the same text to several agents or chains at the same time and gathers their answers into a single result. A runnable component is a piece that processes a text and returns another, such as an agent or a chain of steps with a model.

When to use it

  • Asking several specialised agents for their view on the same enquiry.
  • Saving time by running at once steps that do not depend on each other.

Configuration

FieldWhat it does
Input (required)The text all of them receive.
Agent Executor (required)The agents or chains to run. You can connect several.

Advanced options

FieldWhat it does
Input KeyThe name of the input they expect. Default: input.
Output KeyThe name of the result taken from each answer. Default: output.

Output

The Text output gathers everyone’s answers.

Example

An insurer wants a legal agent and a commercial agent to review the same claim.

  1. Connect the claim to Input and both agents to Agent Executor.
  2. Pass Text to a model that writes the final answer.