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

# Spells

In Magick, a **spell** is a set of instructions that define the behavior and logic of an agent. It is a visual representation of a workflow or process, consisting of interconnected nodes that perform specific actions, transformations, or decisions.

<img src="https://mintcdn.com/magickml-60/BOBCMjDWX_0vFlU1/images/spell.png?fit=max&auto=format&n=BOBCMjDWX_0vFlU1&q=85&s=a3fa03b7bc38151a49cb74901b0bb8f8" alt="Spell" width="951" height="859" data-path="images/spell.png" />

## Key Components of a Spell

* **Nodes**: Spells are composed of various types of nodes, each representing a specific action, function, or condition. Nodes are the building blocks of a spell.
* **Connections**: Nodes are connected by wires that define the flow of data and control between them. Connections determine the order in which nodes are executed.
* **Properties**: Each node has its own set of properties that can be configured to customize its behavior. Properties allow you to fine-tune the functionality of nodes.
* **Variables**: Spells can store and manipulate data using variables. Variables can be used to pass information between nodes and make decisions based on their values.
* **Events**: Spells can respond to events triggered by external sources or internal conditions. Events can be used to trigger specific actions or branches within a spell.
* **Conditions**: Spells can include conditional logic to make decisions based on the values of variables or the outcome of previous nodes. Conditions allow you to create branching paths within a spell.
* **Loops**: Spells can include loops to repeat a set of actions or nodes multiple times. Loops allow you to iterate over data or perform repetitive tasks.
* **LLMs**: Create calls to one or more different LLMs (Language Learning Models) in a single run.
