Skip to main content

Components overview

A component is a single building block within a flow with inputs, outputs, functions, and parameters that define its functionality. A single component is like a class within a larger application.

To add a component to a flow, drag it from the Component menu to the Workspace.

Learn more about components and how they work on this page.

Component menu

Each component is unique, but all have a menu bar at the top that looks something like this.

Open AI component

Use these controls to do the following:

  • Code — Modify the component's Python code and save your changes.
  • Controls — Adjust all component parameters.
  • Freeze Path — After a component runs, lock its previous output state to prevent it from re-running.

Click  All to see additional options for a component.

To view a component’s output and logs, click the Visibility icon.

To run a single component, click ▶️ Play. A ✅Check indicates that the component ran successfully.

Component ports

Handles () on the side of a component indicate the types of inputs and outputs that can be connected at that port. Hover over a handle to see connection details.

Prompt component

Component port data type colors

The following table lists the handle colors and their corresponding data types:

Data TypeHandle ColorHex Code
BaseLanguageModelFuchsia#c026d3
DataRed#dc2626
DocumentLime#65a30d
EmbeddingsEmerald#10b981
LanguageModelFuchsia#c026d3
MessageIndigo#4f46e5
PromptViolet#7c3aed
strIndigo#4F46E5
TextIndigo#4F46E5
unknownGray#9CA3AF

Freeze Path

After a component runs, Freeze Path locks the component's previous output state to prevent it from re-running.

If you’re expecting consistent output from a component and don’t need to re-run it, click Freeze Path.

Enabling Freeze Path freezes all components downstream of the selected component.

Additional component options

Click  All to see additional options for a component.

To modify a component's name or description, double-click in the Name or Description fields. Component descriptions accept markdown syntax.

Component shortcuts

The following keyboard shortcuts are available when a component is selected.

Menu ItemMac ShortcutDescription
Code⌘ + COpens the code editor for the component.
Advanced⌘ + AOpens advanced settings for the component.
Save⌘ + SSaves the current state of the component to Saved components in the sidebar.
Duplicate⌘ + DCreates a duplicate of the component.
Copy⌘ + CCopies the selected component. Paste it in the workspace with ⌘ + V.
Docs⌘ + DOpens related documentation.
Minimize⌘ + QMinimizes the current component.
Freeze⌘ + FFreezes the current component state.
Freeze Path⌘ + FFreezes the current component state and all upstream components.
Download⌘ + DDownloads the current component as a JSON file.
Delete⌘ + ⌫Deletes the component.

Group components in the workspace

Multiple components can be grouped into a single component for reuse. This is useful when combining large flows into single components (like RAG with a vector database, for example) and saving space.

  1. Hold Shift and drag to select components.
  2. Select Group.
  3. The components merge into a single component.
  4. Double-click the name and description to change them.
  5. Save your grouped component to in the sidebar for later use.

Component version

A component's state is stored in a database, while sidebar components are like starter templates. As soon as you drag a component from the sidebar to the workspace, the two components are no longer in parity.

The component will keep the version number it was initialized to the workspace with. Click the Update Component icon (exclamation mark) to bring the component up to the latest version. This will change the code of the component in place so you can validate that the component was updated by checking its Python code before and after updating it.

Hi, how can I help you?