> For the complete documentation index, see [llms.txt](https://thebitcave.gitbook.io/ai-brain-extensions-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thebitcave.gitbook.io/ai-brain-extensions-docs/aibrain-graph/node-reference.md).

# Node Reference

The *AI Brain Graph* comes packed with four main type  of nodes:

* *AI Brain State Node*
* *AI Transition Node*
* *AI Action Node*
* *AI Decision Node*

Additionally, you'll get some helper nodes:

* *Comment Node*
* *AI Brain State Alias Node*
* *AI Brain Any State Node*

Finally, when you work with a Subgraph, you have access to:

* *AI Brain Subgraph Nodes*
* *AI State In Nodes*
* *AI Transition Out Nodes*

## Main Nodes

### AI Brain State Node

A **State** node represents a single state in the MMTools *AIBrain*.

{% hint style="warning" %}
Each state should be given a unique name by right-clicking the header and choosing *Rename.*
{% endhint %}

The *Set as starting state* button will set the state as the first one in the MMTools *AIBrain* states list.

#### Attributes

* **Can Transition To Self**: if set to false, self referencing transitions will be removed (for instance *Idle > Idle*)

#### Inputs

* **States In** (multiple *State* connections): a list of entry points from other states transitions
* **Actions** (multiple *Action* connections): a list of actions that should be performed when entering the state itself

#### Outputs

* **Transitions** (multiple *Transition* connections): a list of transitions that will let the system exit from this state&#x20;

![](/files/-LxLwgem4Y4lBmkPEuQr)

### AI Transition Node

A **Transition** node represents a single transition from a state in the MMTools *AI Brain*: a state can have more than one transition.

If you wish, you can rename the node by right-clicking the header and choosing *Rename* but this won't affect the AI generation.

{% hint style="warning" %}
A Transition node should always have a connected *AIDecision* node
{% endhint %}

#### Attributes

This node has no attributes.

#### Inputs

* **Decision** (single *Decision* connection): a single *AI Decision Node* that will let the AI Brain exit from the actual state
* **Input** (single *Transition* connection): a single connection from the *AI Brain State*

#### Outputs

* **True State** (single *State* connection): a connection to the state that should be activated when the decision is true
* **False State** (single *State* connection): a connection to the state that should be activated when the decision is false

![](/files/-LxLwXS13sQLRDzlZvQK)

### AI Action Node

**Action** nodes are graph representations of *AIAction* components. They come with a single output element that should be connected to the state. This will tell the state itself that this action should be executed.

A node may have some parameters, corresponding with the Corgi/TopDown engine *AIAction* components.

If you wish, you can rename the node by right-clicking the header and choosing *Rename* but this won't affect the AI generation.

#### Attributes

* **Label**: corresponds to the regular *AIAction* label
* Depending on the corresponding *AIAction*, you'll have access to a list of paramenters

#### Inputs

This node has no input connections.

#### Outputs

* **Output** (multiple *Action* connections): a single *AI Decision Node* that will let the AI Brain exit from the actual state

![](/files/-LxLx-L_NsTAiM0ktVij)

### AI Decision Node

**Decision** nodes are a graph representation of *AIDecision* components. They come with a single output element that should be connected to a state transition. This will define the condition to exit the state.

If you wish, you can rename the node by right-clicking the header and choosing *Rename* but this won't affect the AI generation.

#### Attributes

* **Label**: corresponds to the regular *AIDecision* label
* Depending on the corresponding *AIDecision*, you'll have access to a list of paramenters

#### Inputs

This node has no input connections.

#### Outputs

* **Output** (multiple *Decision* connections): a single *AIDecision Node* that will let the AI Brain exit from the actual state

![](/files/-LxLxCF_Mi-7k1LL3qOc)

## Helper Nodes

### Comment Node

Comment nodes have the only purpose of letting you add notes in your graph. They won't generate anything in the character AI Brain System.

{% hint style="info" %}
Clicking on the header will let you enter edit note.
{% endhint %}

#### Attributes

This node has no input attributes.

#### Inputs

This node has no input connections.

#### Outputs

This node has no output connections.

![](/files/-LxRgBkol0a9UULBUhsA)

### AI Brain State Alias Node

The **AI Brain State Alias Node** will let you create alias elements for your states: this will avoid main spaghetti like brains when things get complicated.

#### Attributes

* **Available States**: the node will show a list of nodes:
  * In the main graph all nodes and subgraph-exposed nodes will be shown
  * In a subgraph, only inner nodes will be shown

#### Inputs

* **States In** (multiple *State* connections): a list of entry points from other states transitions

#### Outputs

This node has no output connections.

![](/files/-LxM4C9oxmU73sZR6MO9)

### AI Brain Any State Node

The **AI Brain Any State** node will let you generate Decision/Transition logic for all nodes in your graph:

* If added in a main Graph, also subgraph States will be affected
* If added in a subgraph, only subgraph States will be affected

#### Attributes

This node has no input attributes.

#### Inputs

This node has no input connections.

#### Outputs

* **Transitions** (multiple *Transition* connections): a list of transitions that will let the system exit all included states

![](/files/-LxM2iTf1VGiFoKyQRgz)

## Subgraph Nodes

### AI Brain Subgraph Node

A **Subgraph** node is a special state node, that lets you create a inner state/decision/action logic.&#x20;

It can be set as a starting node (in this case its inner starting node will be used).

![](/files/-LxLxetBbhhTbIB498qS)

You can create a subgraph asset and assign it to the *Subgraph* field.

![](/files/-LxLxsBWWmYoidbbA_IG)

{% hint style="warning" %}
You cannot create nested subgraphs (i.e.: you cannot add a subgraph inside a subgraph)
{% endhint %}

#### Attributes

* **Subgraph**: the subgraph data

#### Inputs

* **State In** (list of multiple *State* connections): a dynamically generated list of state connections (see *AI State In Nodes*)

**Outputs**

* **Transition Out** (list of single *Transition* connections): a dynamically generated list of transition connections (see *AI Transition Out Nodes*)

### AI State In Node

The **AI State In** node exposes an *AI Brain State* node inside a subgraph to the parent brain graph.

![](/files/-LxLzKIh_KfPQqO8H-15)

{% hint style="warning" %}
*State In* nodes are only available in a subgraph.
{% endhint %}

#### Attributes

This node has no attributes

#### Inputs

This node has no input connections.

#### Outputs

* **Input** (single *State* connection): this node will generate a *State In* connection in the subgraph node of the parent graph

### AI Transition Out Node

The **AI Transition Out** node exposes an *AI Transition* node connection inside a subgraph to the parent brain graph.

![](/files/-LxLzTmM9roZQpk8FZcA)

{% hint style="warning" %}
*Transition Out* nodes are only available in a subgraph.
{% endhint %}

#### Attributes

This node has no attributes

#### Inputs

* **Output** (single *Transition* connection): this node will generate a *Transition Out* connection in the subgraph node of the parent graph

#### Outputs

This node has no output connections.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://thebitcave.gitbook.io/ai-brain-extensions-docs/aibrain-graph/node-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
