Nodes
To use a node in a graph:- Create the node: Instantiate the node with configuration options.
- Add node to graph: Add the node to the graph.
Node configurations
Nodes are created with various configuration options that control their behavior. Different nodes types will have different node-specific configurations, but all nodes will include the following optional configurations:- id: Unique identifier for the node (auto-generated if not provided)
- reportToClient: Defaults to false, which means the node’s result will be passed to the next nodes in the graph, but will not be available to the client. If true, the node’s result will be sent to the client immediately when available AND propagated to the next nodes. This is useful if you want to access the intermediate node result (e.g., to display in the UI).
Node
 Additional error handling configurations coming soon! 
Built-in Nodes
Built-in nodes are pre-built nodes provided by Inworld that cover common use cases. Below is an overview of available Built-in Nodes. Nodes with an asterisk (*) are experimental and subject to change. 
| Node | Description | Input Type(s) | Output Type(s) | 
|---|---|---|---|
| KeywordMatcherNode | Matches keywords in text input | String | GraphTypes.MatchedKeywords | 
| KnowledgeNode* | Retrieves relevant knowledge based on input text | String | GraphTypes.KnowledgeRecords | 
| LLMChatRequestBuilderNode | Generates formatted chat requests using prompt templates populated with JSON input | Object | GraphTypes.LLMChatRequest | 
| LLMPromptBuilderNode | Generates formatted prompts using prompt templates populated with JSON input | Object | String | 
| MCPCallToolNode | Calls multiple tools on an MCP server in parallel | GraphTypes.ToolCallRequest | GraphTypes.ToolCallResponse | 
| MCPListToolsNode | Lists available tools from an MCP server | any | GraphTypes.ListToolsResponse | 
| ProxyNode | Simple data passing node for forwarding input to output | any | any | 
| RandomCannedTextNode | Selects a random text from a list of predefined phrases | any | String | 
| RemoteLLMChatNode | Generates a response using a large language model | GraphTypes.LLMChatRequest | GraphTypes.LLMChatResponse | 
| RemoteLLMCompletionNode | Generates text completion using a large language model | String | String | 
| RemoteSTTNode | Converts speech audio to text using a speech-to-text (STT) model | GraphTypes.Audio | String | 
| RemoteTTSNode | Converts text-to-speech audio using a text-to-speech (TTS) model | String GraphTypes.TextStream GraphTypes.TTSRequest | GraphTypes.TTSOutputStream | 
| SafetyCheckerNode | Analyzes text for potentially harmful content and returns safety assessment results | String | GraphTypes.SafetyResult | 
| SubgraphNode | Executes a compiled subgraph as a node | any | any | 
| TextAggregatorNode | Combines text streams (chunks) into a single string | String GraphTypes.TextStream GraphTypes.LLMChatResponse | String | 
| TextChunkingNode | Splits text into smaller chunks | GraphTypes.TextStream GraphTypes.ContentStream | GraphTypes.TextStream | 
| TextClassifierNode | Analyzes text and classifies it into predefined categories using ML models | String | GraphTypes.ClassificationResult | 
Subgraphs
 Use subgraphs to simplify maintenance, improve readability, and promote reusability
SubgraphNode is a special type of node that executes a compiled Subgraph.
A Subgraph is a reusable graph component that encapsulate a set of nodes and edges into a single logical unit. To use a subgraph in your main graph, you need to:
- Build the subgraph using SubgraphBuilder, which follows a very similar syntax asGraphBuilder. This includes adding nodes, adding edges, and setting the start and end node. A Subgraph must have exactly one start node and one end node.
- Create a SubgraphNode that references the subgraph by its ID
- Register the subgraph with your main graph using .addSubgraph()
- Add the SubgraphNode to your main graph like any other node
Custom Nodes
Custom Nodes can be created to implement any custom logic in your graph by extending the CustomNode class. To use a custom node:- Create a custom node class: Extend CustomNodeand implement theprocessmethod with your custom logic.
- Instantiate the custom node: Create an instance of your custom node class.
- Add custom node to graph: Use addNodeto add the custom node to the graph.