BGL Format

BGL (Blueprint Graph Language) is a compact text format that represents a Blueprint graph — nodes, pins, connections, and default values — in a way that AI can both read and write accurately. It is the primary format used by NodeLens for AI-assisted Blueprint creation and editing.

Why BGL Exists

Unreal Engine Blueprint graphs are stored as large, complex data files that are not designed for human or AI reading. Asking an AI to work directly with this raw data leads to errors, missed connections, and incorrect output.

BGL solves this by expressing the same graph in a clean, structured text format that is compact enough to fit comfortably within an AI's context window, yet precise enough that it can be converted back into a valid Blueprint graph without information loss.

A graph that takes thousands of lines in raw UE5 format typically takes 20–60 lines in BGL.

Note: BGL is designed primarily for reliable AI generation and deterministic parsing. As NodeLens evolves, the language may be refined to reduce ambiguity, improve consistency, and increase generation accuracy. The specification should therefore be considered a living document.

What BGL Looks Like

Each node is declared with its type and name, followed by its pins on indented lines. Connections between nodes are expressed directly on the pin lines. Here is a simple example — a Branch node that checks if health is zero:

# BGL v1.0
FEntry "CheckDeath" @-336,0
  out exec "then" M1 -> M6
  out S real "CurrentHealth" M2 -> M3

Op "<= (Float)" @-144,112
  in S real "A" M3
  in S real "B" M4 =0
  out S bool "ReturnValue" M5 -> M7

Br "Branch" @112,0
  in exec "execute" M6
  in S bool "Condition" M7
  out exec "true" M8 -> M10
  out exec "false" M9 -> M14

Set "IsDead" @384,16
  in exec "execute" M10
  out exec "then" M11 -> M20
  in S bool "IsDead" M12 =true
  out S bool "Output_Get" M13 -> M21

Set "IsDead" @384,128
  in exec "execute" M14
  out exec "then" M15 -> M18
  in S bool "IsDead" M16 =false
  out S bool "Output_Get" M17 -> M19

FResult "Function Result" @640,112
  in exec "execute" M18
  in S bool "IsDead?" M19

FResult "Function Result" @640,0
  in exec "execute" M20
  in S bool "IsDead?" M21

The equivalent pseudocode for this graph:

CheckDeath(CurrentHealth)
{
    if (CurrentHealth <= 0)
    {
        IsDead = true;
        return IsDead;
    }
    else
    {
        IsDead = false;
        return IsDead;
    }
}

Reading the BGL, you can trace the full flow:

How BGL is Used in NodeLens

Viewing existing Blueprints

Every Blueprint function you import into NodeLens is automatically converted to BGL and shown in the BGL tab of the viewer. You can copy it, share it, or paste it directly into a conversation with an AI.

Generating new functions

When you ask an AI (via MCP or the in-app chat) to create a new Blueprint function, it writes the result in BGL. You then import it into NodeLens via the Import panel, review it on the Canvas, and save it as a new Blueprint file.

Editing existing functions

You can ask the AI to read an existing function's BGL, modify it, and save the result to a new folder. The original Blueprint is never touched — the AI always works on a copy.

Important: Never save AI-generated BGL on top of a Blueprint that was sent from Unreal Engine. When you re-send from UE5, NodeLens will overwrite it. Always save AI edits to a new folder to keep them safe.

Typical Workflow

The recommended workflow when asking an AI to create or modify a Blueprint function:

1
Describe what you want Tell the AI what the function should do in plain language. Be specific about inputs, outputs, and conditions.
2
Review the pseudocode Ask the AI to show you the logic as pseudocode first. Confirm it matches what you intended before proceeding.
3
AI generates BGL Once you approve the logic, the AI writes the BGL. With MCP, it can save it directly to NodeLens. With in-app chat, you copy and paste it into the Import panel.
4
Review on the Canvas Open the imported function in the Canvas tab and visually check the connections and node layout.
5
Bring into UE5 Use the Canvas (generated from the BGL) as a visual reference to recreate the Blueprint graph in Unreal Engine.
Tip: Step 2 is the most important. It is much faster to fix a logic error in pseudocode than to spot it in a completed graph on the Canvas.

Limitations

On this page
Why BGL Exists What BGL Looks Like How It Is Used Viewing Blueprints Generating functions Editing functions Typical Workflow Limitations