Skip to content

AI export and Copy for AI

Blueprint Scribe can write your Blueprints as compact text for AI assistants. Every graph is written as readable logic, next to the members, the findings and the C++ migration notes. Paste it into an AI chat and ask about your Blueprints: what a graph does, why something fails, how to simplify it or how it would look in C++.

There are two ways to get the text:

  • Copy for AI puts it on the clipboard, for one Blueprint or for every Blueprint in the list.
  • The AI-ready text export format writes it to the ai folder of the output folder.
Button Where Copies
Copy for AI Next to the search box on the Blueprints page Every asset in the list as it is filtered right now (kind chip and search)
Copy for AI In the details of a selected asset This asset only

The status line and a notification say how much was copied, for example “Copied 1 asset for AI: 8,412 characters, about 2,103 tokens.” The token count is an estimate of four characters per token.

The text follows the Private members option of the Export page: with it off, private variables and functions are left out.

Tick AI-ready text on the Export page (or AI-ready text in the settings, ai in -Formats on the command line, ai_text in Python). It is on by default. The export writes:

ai/
<id>.md one file per asset
blueprints.md all assets in one file, with a short guide to the format
blueprints.jsonl one JSON object per line, one line per asset

<id> is the same asset id as for the other formats, for example Game.Blueprints.BP_Door. When the AI-ready text is the only format, ai/blueprints.md is the start file of the export.

Each asset starts with a heading and a few lines of facts:

# BP_Door
Actor - /Game/Blueprints/BP_Door
Parent: BP_InteractiveBase > Actor
Interfaces: BPI_Interactable
compile: Warnings, 54 nodes in 6 graphs, hard references: 5 packages (81 KB), used by 1 asset
Complexity: 30 of 100 (moderate). C++ candidate: 34 of 100 (consider c++).

Then, where the asset has them: the description, Components, Variables (or Fields), Entries, Functions, Events, Event dispatchers, Macros, Widgets, Graphs, Comments, Findings, C++ migration and References (the assets it loads through hard references and the assets that use it). Members take one line each, with type, default value, flags and description, for example:

## Functions
- Open(Speed: Float (double-precision)) -> (Success: Boolean) - Opens the door at the given speed.

When you copy or export more than one asset, the text starts with the title and a short explanation of the format, and the assets are separated by ---.

Each graph is a code block with its path, kind and node count. The logic is indented text:

Event BeginPlay:
Set IsOpen = false
Print String(In String="Door ready")
Event Interact(Instigator):
Branch(Condition=IsLocked)
True:
Play Sound 2D(Sound=Locked_Cue)
False:
Open(Speed=OpenSpeed)
Not run by any event (1): Print String (disabled)
  • A line ending in : is an event, a function entry or an exec output such as True:, False: or Loop Body:.
  • The lines under it run in order.
  • Name=value are node inputs: a default value, a variable, a pure expression written inline, or an earlier node’s output as Node.Pin.
  • -> continues at X joins a flow that was written above.
  • Disabled nodes are marked (disabled).
  • Nodes that no event runs are listed at the end of the graph (up to eight names).
  • Graphs without exec wires, such as Anim Graphs and state machines, list their nodes.

A graph is cut after AI text lines per graph lines (default 300, from 20 to 5000, in the settings); the last line then says how many lines were left out.

Each line is one asset as a compact JSON object with name, path, kind, parent, interfaces, description, compile, nodes, complexity, migration (score, verdict, reasons, upgradeNotes), hardReferenceBytes, usedBy, components, variables (or fields), entries, functions, events, dispatchers, macros, graphs (path, kind, nodes and logic), findings and loads. Empty fields are left out. Use it to feed your own tools or a retrieval index.

import unreal
scribe = unreal.get_editor_subsystem(unreal.TABlueprintScribeSubsystem)
report = scribe.scan_paths(["/Game/Blueprints"], False)
text = scribe.get_ai_text(report, []) # every asset, as a string
scribe.copy_for_ai(report, [report.assets[0].object_path]) # one asset to the clipboard, returns the length

Both take include_private as a third argument (default True). See Python.