> For the complete documentation index, see [llms.txt](https://docs.aitheon.com/aitheon-core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aitheon.com/aitheon-core/aitheon-core-quick-start/add-sub-graph.md).

# Add Sub-graph

### Adding a new sub-graph

To add a new [**sub-graph**](/aitheon-core/main-elements/sub-graphs.md) in order to fill it with some [**nodes**](/aitheon-core/main-elements/nodes.md) to make tasks you need, open[ **TOOLBOX**](/aitheon-core/main-elements/toolbox.md) at the bottom-left corner of the Aitheon Core interface table **(1)**:  &#x20;

![](https://11324685-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFodfgQtPYjVLJ1kJJi%2F-MQkzWKitoI78roZHyH7%2F-MQlIwXB33abqysj8PE_%2Ftoolbox.png?alt=media\&token=19b46058-fab6-45dd-bb99-1b6cbe872da6)

It will open the area where you can choose elements to add.

Drag and drop the Sub-graph box to the graph table, then close the **TOOLBOX** area. Your sub-graph will appear at the point where you dropped it.&#x20;

![](https://11324685-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFodfgQtPYjVLJ1kJJi%2F-MLh19-qDO0sdh__-2e_%2F-MLh3iHcXsTXLb2aeaYk%2Fsub-graph.gif?alt=media\&token=bc552c37-1df1-49ca-8c08-429f34d4d853)

Zoom in with the button "**+**" at the bottom-right corner. You can also use mouse wheel or your fingers on a touchpad.

Drag the table for your convenience.

### Settings

Open Settings with three dots at the top-right corner of your new sub-graph. You will see **IO SETTINGS** ("input-output settings").&#x20;

![](https://11324685-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFodfgQtPYjVLJ1kJJi%2F-MITkpQwArO3zD2UIukB%2F-MITw4MjeY3a71O-YwwP%2Fsettingsgr.png?alt=media\&token=1045c0fb-411b-4774-be4d-97d9a09bd534)

Add [**inputs and outputs** ](/aitheon-core/main-elements/inputs-and-outputs.md)that you need for this sub-graph **(1)**. If your sub-graph has to receive multiple inputs of the same type choose the **Multiple** option **(2)**. Outputs are multiple by default.

Write a name for the input (or output) and choose where it must appear on the sub-graph **(3)**. The **center** option will place this input (output) at both sides of the sub-graph.&#x20;

{% hint style="info" %}
This is useful for a clearer appearance of the sub-graph - place input/output point on the convenient side to wire it with other sub-graphs (nodes).&#x20;
{% endhint %}

Choose an appropriate [**Socket** ](/aitheon-core/main-elements/inputs-and-outputs.md)type for the input (output) **(4)**. You will be able to connect nodes and sub-graphs through compatible (similar) sockets. If you choose **AnyData** from the **Common** socket group, this input (or output) will connect to any type of sockets, but it will change its own type with the first connection accordingly.&#x20;

To delete an input or output, press the **trash bin icon** next to it **(5)**.

{% hint style="info" %}
Click **RUN** at the top-right corner of the graph to deploy the changes that you made.
{% endhint %}
