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

# Types of Nodes

> Explore the four primary node types that serve as building blocks for workflow processing steps, each designed for specific use cases.

## Overview

Nodes are the building blocks of workflow processing. There are four primary node types, each designed for a specific part of data processing or control.

**Primary Node Types:**

* **[Node](#base-node)** - Performs basic processing tasks with custom logic
* **[AgentNode](#agent-node)** - Handles processing using Large Language Models (LLM)
* **[ConcurrentNode](#concurrent-node)** - Executes multiple nodes concurrently for better performance
* **[BaseRouter](#router-node)** - Directs data flow using conditional routing logic

## Node Architecture

Each node type serves a distinct purpose in the workflow ecosystem:

**Node Categories:**

**Processing Nodes:**

* **Node**: Custom processing logic for any computational task
* **AgentNode**: LLM-powered processing for AI-driven operations

**Control Nodes:**

* **ConcurrentNode**: Parallel execution of independent operations
* **BaseRouter**: Conditional branching based on processing results

## When to Use Each Node Type

1. **Node for custom logic**: Data validation or computations without AI
2. **AgentNode for AI**: Natural language understanding and generation
3. **ConcurrentNode for parallelism**: Independent operations running simultaneously
4. **BaseRouter for conditional flow**: Branch based on results or business rules

## Node Hierarchy

All specialized node types inherit from the base `Node` class, ensuring a consistent interface while providing specialized functionality for different use cases.

```mermaid theme={null}
graph TD
    A[Node] --> B[AgentNode]
    A --> C[ConcurrentNode] 
    A --> D[BaseRouter]
    E[RouterNode] -. routing rule .-> D
```

## Design Principles

* **Single Responsibility** - Each node type has a clear, single responsibility aligned with its specific use case
* **Extensibility** - Abstract base classes allow for easy extension while maintaining consistent interfaces
* **Composability** - Nodes can be easily combined to create complex workflows leveraging each type's strengths
* **Consistency** - Workflow nodes share common patterns for context management, error handling, and result storage; `RouterNode` rules use the same `get_output()` / `save_output()` helpers for routing decisions
