> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SequentialGraphBuilder

> A graph builder that constructs a sequential graph from a list of nodes. Automatically links nodes with one-directional edges from the first to the last and sets the start and end nodes accordingly.

## Constructors

* [constructor](#constructor)

## Methods

* [addSequentialNode](#addsequentialnode)

## Interfaces

* [SequentialGraphBuilderProps](#sequentialgraphbuilderprops)

***

## Constructors

### constructor

```typescript theme={"system"}
new SequentialGraphBuilder(opts: SequentialGraphBuilderProps): SequentialGraphBuilder
```

Creates a new instance of `SequentialGraphBuilder` and builds the sequential graph.

#### Parameters

<ParamField body="opts" type="SequentialGraphBuilderProps" required>
  The configuration options for the sequential graph builder.
</ParamField>

#### Returns

`SequentialGraphBuilder`

## Methods

### addSequentialNode

```typescript theme={"system"}
addSequentialNode(node: AbstractNode): this
```

Adds a node to the graph, links it from the previous end node (if any), and sets the passed node as the new end node.

#### Parameters

<ParamField body="node" type="AbstractNode" required>
  The node to add to the graph.
</ParamField>

#### Returns

`this`

## Interfaces

### SequentialGraphBuilderProps

Configuration properties for the `SequentialGraphBuilder`.

#### Properties

**nodes**: `AbstractNode[]`

The list of nodes to be connected sequentially.
