# Blocks & Nodes

In GLIK, agent applications are constructed using modular components known as **blocks** and **nodes**. While these terms are often used interchangeably, they serve distinct roles within the system — particularly in the context of deployment, execution, and platform integration.

This overview clarifies the difference between blocks and nodes, and explains how they operate across various app types in GLIK Cloud and GLIK Open Core environments.

***

### What Are Blocks?

**Blocks** are the visual components available in the GLIK Studio interface. Users can drag, configure, and connect blocks to build workflows without writing code.

* Represent high-level actions or logic units (e.g., LLM call, IF/ELSE, Variable Assigner)
* Include UI configuration (e.g., dropdowns, variable bindings, content prompts)
* Support nested logic, parallel flows, and scoped memory control

Blocks are the **front-end abstraction** of the orchestration logic and do not execute directly. Instead, they are compiled into runtime **nodes**.

***

### What Are Nodes?

**Nodes** are the underlying runtime units that execute within GLIK’s orchestration engine. Each node corresponds to a block and is defined as part of a directed flow graph.

* Nodes are generated when a user saves or deploys an app from GLIK Studio
* They operate sequentially or conditionally depending on app logic
* Each node processes input, updates memory, and passes results downstream

Nodes are used in:

* [**Open Core**](https://docs.glik.ai/developers/glik-open-core) — where flows are defined and deployed directly without visual UI
* [**GLIK Cloud execution engine**](https://docs.glik.ai/glik-cloud) — where blocks are translated into nodes behind the scenes

***

### App Type Integration

Each GLIK app type compiles blocks into nodes using a standardized orchestration model. Here’s how blocks and nodes fit across different app types:

| App Type          | Blocks Used                      | Nodes Executed                | Notes                                                  |
| ----------------- | -------------------------------- | ----------------------------- | ------------------------------------------------------ |
| **Chatbot**       | Limited (LLM, Answer)            | Stateless node chain          | No memory, single-turn                                 |
| **Agent**         | Full block range                 | Autonomous node orchestration | Uses tools, memory, and feedback loops                 |
| **Advanced Chat** | Full block range + memory blocks | Stateful node execution       | Supports conversation memory and escalation            |
| **Workflow**      | Deterministic blocks             | Single-run execution graph    | Designed for API automations and output transformation |

***

### [Developer Notes](https://docs.glik.ai/developers)

* Blocks are stored as configuration metadata in GLIK Cloud
* Nodes are compiled representations stored in DSL or YAML in Open Core
* Each node type has a unique schema: input bindings, execution context, return types

To extend or create new logic, developers may define custom nodes or plugins that render new blocks in the Studio.
