Components

Components are key to Breadboard. We create components, configure them, name them, and wire them together to create our boards. By default a blank board contains two components: an input and an output, with the input pre-wired to the output.

The input & output components in the default blank board

Note

For more about the input and output components, take a look at our Built-in Kit reference documentation.

Adding and Removing Components

Adding a Component

To add a component to our board we drag it from the component selector found in the bottom left corner of the Visual Editor.

The component quick selector

The selector has two main sections. On the left is a button, named Components, which shows the entire collection of kits and the components they contain when clicked. On the right is a selection of shortcuts to commonly-used components from our Agent Kit.

The component selector showing all components and kits

In the component select we can search for a particular component we're interested in, as well as see short descriptions of what each component offers.

We can add the component to the board by dragging it from the list into the main area of the Visual Editor.

A runJavascript component being added to the board

Removing a Component

To remove a component either click on it and press the delete key (or Backspace) on the keyboard, or click on the three dots to the right of the component and choose Delete component in the overflow menu.

The overflow menu of a component

Tip

If you accidentally remove a component or wire you can bring it back by using the undo option in the top navigation bar, or by pressing Cmd/Ctrl + Z on your keyboard.

Updating Component Information

We can also update the title, log level, and description of the component using the Component details section in the right hand pane.

The component details section

The title is shown in the Activity Panel when a board is run, and the log level determines if the component's output is shown in the Activity Panel only, or if it should be shown in the Preview as well.

Note

We do not currently use the component description within the Visual Editor UI, but this may change in the future.

Changing a Component's Inputs

Most components can be configured in some way. When we select a component in the Visual Editor its configuration options are shown in the right hand pane in the Input section just below the Component details. The exact options depend on the component itself, but as one example the inputs for the runJavascript component are shown below.

The runJavascript component details

In the case of this particular component – the runJavascript one – we see:

  1. code The code we wish to run when the component is reached in a board run.
  2. name The name of the function to invoke from the code input set above.
  3. raw Whether or not the output of the component should be used as-is, or whether it should be wrapped in a port called result.

Note

For more information on what ports are, take a look at our reference on Inputs and Outputs.

Each component is different, however, and the description of what each port does can be found just below its name in the component's Input section.

Setting input and output schemas

Input and Output components stand slightly apart from other components in that they have a single schema port which, when changed, adds or removes other ports on the component itself.

For example, our input component starts like this.

The default input component schema

Tip

By default components are "collapsed", showing only a single input and output port. By double clicking on their name (or using the component's overflow menu) you can expand them to see all the ports they contain.

Suppose, however, we wanted to add an extra output port from our input component, such that alongside Context it has a number port called Foo. We can this by clicking the Add a port button in the Schema section of the right hand pane.

The Add a port button in the schema editor

Note

There are quite a few options for types supported within a port's schema. A very common one is LLM Content, which aligns with the Gemini API Content type and which is used in the components like the Agent Kit's Specialist. The types we choose affect the inputs that are shown within the Activity Pane when a board is running.

We can then change the title and type of our new port to be Foo and Number, respectively. After that we should see that the input component now has an additional port we can use called Foo.

The input component with a modified schema

Note

Input and output components are not the only "shapeshifters" in Breadboard. The Template Kit includes other components that use an input string to derive their additional ports.

There are also "extended" properties available to us within the schema editor, some of which change depending on the overarching type of the port. For example, if the port type is a string we can set a list of acceptable values from which the user may choose.

The input component with a fixed set of options

Wiring Components Together

Adding wires

To wire two components together we click drag from the output port of one component to the input port of another component.

Dragging from one port to another

Depending on the component we can also wire an output port to one of its own input ports, too, thereby creating a loop.

Note

We are currently working on limiting the ports that can be connected based on their types. Until that feature lands, however, it is important to check that ports are of a compatible type.

Removing wires

To remove a wire, click on it and press the delete key (or Backspace) on the keyboard.

Dynamic wires

In some cases the ports on a component are not fixed, and we can create a wire by dragging from a port to the target component. For example, the runJavascript component supports the addition of dynamic wires as inputs.

Dragging from one port to the drop zone of another component

When we release the cursor we will be prompted to name the port on the target component.

Naming the newly created wire's ports

After which we see that is now a new port on the runJavascript called, in this case at least, context. We can then access this port like any other within the component.

The new dynamic ports

Note

If we delete a dynamic wire the port that was created to service the port is also removed.

Next: Activity Pane