> ## 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.

# CustomNode

> Base class for creating custom (user-defined) nodes. Subclasses must implement the `process` method. A unique node type is automatically registered once per subclass.

## Examples

```typescript theme={"system"}
import { CustomNode, ProcessContext } from '@inworld/runtime/graph';

// Define a custom node that processes the input text
class CustomTextNode extends CustomNode {
async process(
context: ProcessContext,
input: string,
): Promise<{ processedText: string }> {
return {
processedText: input.toUpperCase(),
};
}
}

// Create an instance of the custom node
const customTextNode = new CustomTextNode();
```

## Constructors

* [constructor](#constructor)

## Methods

* [process](#process)

## Interfaces

* [CustomNodeProps](#customnodeprops)

***

## Constructors

### constructor

```typescript theme={"system"}
new CustomNode(props?: CustomNodeProps<ExecutionConfigType>): CustomNode
```

Creates a new `CustomNode`.

#### Parameters

<ParamField body="props" type="CustomNodeProps<ExecutionConfigType>">
  Custom node options including optional `executionConfig`.
</ParamField>

#### Returns

`CustomNode`

## Methods

### process

```typescript theme={"system"}
process(context: ProcessContext, inputs: InputType[]): OutputType | Promise<OutputType>
```

The execution function of the custom node. Must be implemented by subclasses.

#### Parameters

<ParamField body="context" type="ProcessContext" required>
  The execution context.
</ParamField>

<ParamField body="inputs" type="InputType[]" required>
  The inputs to the node.
</ParamField>

#### Returns

`OutputType | Promise<OutputType>`

## Interfaces

### CustomNodeProps

Configuration for a `CustomNode`.

#### Properties

**executionConfig**?: `ExecutionConfigType`

Execution configuration for the custom node.
