# 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**](/developers/glik-open-core.md) — where flows are defined and deployed directly without visual UI
* [**GLIK Cloud execution engine**](/glik-cloud.md) — 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](/developers/overview.md)

* 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.


---

# Agent Instructions: 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:

```
GET https://docs.glik.ai/system-architecture/blocks-and-nodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
