GraphRAG Guide
19.1M+ indexed nodes across 27 UE5 releases, delivering source-accurate engine understanding for your AI.
What Is UE-GraphRAG?
AgentUX ships with UE-GraphRAG, a knowledge base of 19.1M+ indexed nodes covering 27 UE5 releases (5.0.0 through 5.7.3). It gives Claude source-code-level understanding of every class, function, property, module, plugin, CVar, and documentation page in the engine, all with full version awareness.
AI models have a training cutoff. They don't know about APIs added or changed in the latest Unreal Engine releases, and they can't look up exact property names on the fly. GraphRAG fills that gap: it's built directly from your UE source tree, so your AI always has version-accurate knowledge, not stale training data.
Key Statistics
How It Works
GraphRAG combines two storage backends for different query types:
- Neo4j: Graph database for structural queries: class hierarchies, module relationships, function signatures, inheritance chains, and version-scoped lookups
- LanceDB: Vector database for semantic queries: natural language search over source code and documentation using ONNX embeddings
When Claude needs to verify a property name or explore an API, it calls the appropriate MCP tool. Structural queries (get_class_details, get_class_hierarchy) run directly against Neo4j and return in 4–45ms. Semantic queries (search_ue_source, search_ue_docs) embed the query and search LanceDB vectors, returning in under 300ms.
MCP Tool Reference
GraphRAG is exposed through 20 MCP tools organized into five categories:
| Category | Tools | Backend |
|---|---|---|
| Source Code | search_ue_source, search_ue_class, get_class_details, get_class_hierarchy, get_function_signature, find_api_surface, find_related_classes | Neo4j + LanceDB |
| Modules & Plugins | list_modules, get_module_info, list_plugins, search_by_plugin | Neo4j |
| Documentation | search_ue_docs, get_doc_page, get_ue_guidance | LanceDB + Neo4j |
| Parameters | search_params, get_param_details | Neo4j + LanceDB |
| Versioning | list_versions, get_version_diff, get_version_history | Neo4j |
All tools accept an optional ue_version parameter for version-scoped queries. See Multi-Version Queries below.
Source Code Tools
search_ue_source: Semantic Source Code Search
Search the entire UE source tree using natural language. Uses vector embeddings to find the most relevant classes, functions, and module summaries.
# Find how actors are spawned
search_ue_source(query="how to spawn an actor in the world")
# Find Niagara particle system creation code
search_ue_source(query="create particle system emitter", plugin_name="Niagara")
# Find editor subsystem classes only
search_ue_source(query="editor subsystem for asset management", chunk_type="class", category="Editor") get_class_details: Full Class Information
Get complete details for a UE class: inheritance chain, all functions with signatures, properties, delegates, module, and file path. Always use this before guessing UPROPERTY or UFUNCTION names.
# Get all properties and functions on a fog component
get_class_details(class_name="UExponentialHeightFogComponent")
# Returns: FogDensity (float), bEnableVolumetricFog (bool), VolumetricFogAlbedo (FLinearColor), etc. Important: Property names are case-sensitive. FogDensity is correct; fogDensity, Density, and fog_density are all wrong and will silently fail.
get_class_hierarchy: Inheritance Tree
Get ancestors, descendants, or both for any class. Essential for finding where inherited properties are defined.
# Find where Intensity is defined in the light hierarchy
get_class_hierarchy(class_name="USpotLightComponent", direction="up")
# Returns: USpotLightComponent -> UPointLightComponent -> ULocalLightComponent -> ULightComponent
# Intensity, LightColor, Temperature are on ULightComponent (parent) find_api_surface: Blueprint/Exec Callable Functions
Find functions with specific UFUNCTION specifiers on a class or module.
# Find all BlueprintCallable functions on a fog component
find_api_surface(target="UExponentialHeightFogComponent", specifiers=["BlueprintCallable"])
# Returns: SetFogDensity(float), SetVolumetricFog(bool), etc. Documentation Tools
search_ue_docs: Semantic Documentation Search
Search ~14,857 doc chunks from C++ API descriptions, UDN tooltips, Blueprint API docs, and community guides.
# How does dynamic lighting work?
search_ue_docs(query="how to set up dynamic lighting")
# Actor lifecycle
search_ue_docs(query="actor lifecycle initialization order") get_ue_guidance: Best Practices & Patterns
Search curated guidance: community guides, best practices, code examples, and design patterns.
# GAS best practices
get_ue_guidance(query="Gameplay Ability System best practices", topic="gameplay-ability-system")
# Plugin architecture patterns
get_ue_guidance(query="how to structure a UE5 C++ plugin") Versioning Tools
get_version_diff: Compare Class Between Versions
Compare a class between two UE versions, showing added/removed/changed functions and properties.
# What changed in AActor between UE 5.4 and 5.5?
get_version_diff(class_name="AActor", from_version="5.4.0", to_version="5.5.0") get_version_history: Class Lifecycle Across All Versions
Track when a class was introduced, removed, and how it evolved across all 27 indexed releases.
# When was PCGGraph introduced?
get_version_history(class_name="UPCGGraph")
# Returns: first appeared in 5.2.0, per-version function/property counts Common Workflows
Before Writing UE C++ Code
Always verify names before writing code that references UE types:
# 1. Find the class
search_ue_class(pattern="ExponentialHeightFog")
# -> AExponentialHeightFog
# 2. Get exact property names
get_class_details(class_name="UExponentialHeightFogComponent")
# -> FogDensity (float), NOT "Density" or "fogDensity"
# 3. Find callable functions
find_api_surface(target="UExponentialHeightFogComponent", specifiers=["BlueprintCallable"])
# -> SetFogDensity(float), SetVolumetricFog(bool)
# 4. Check parent classes for inherited properties
get_class_hierarchy(class_name="UExponentialHeightFogComponent", direction="up") Combining Editor Control with GraphRAG
Use GraphRAG to look up the correct API, then use AgentUX editor commands:
# 1. Look up the correct property name
get_class_details(class_name="UDirectionalLightComponent")
# -> Intensity is on parent ULightComponent
# 2. Verify via hierarchy
get_class_hierarchy(class_name="UDirectionalLightComponent", direction="up")
# 3. Use AgentUX to set it
{"method": "editor.rc.property", "params": {
"path": "/Game/Maps/Main.Main:PersistentLevel.DirectionalLight.LightComponent0",
"property": "Intensity", "value": 10.0, "access": "WRITE"
}} Exploring a Plugin
# 1. Browse plugin contents
search_by_plugin(plugin_name="PCG", limit=50)
# 2. Drill into a specific class
get_class_details(class_name="UPCGGraph")
# 3. Find related classes
find_related_classes(class_name="UPCGGraph") Understanding a System
# 1. Semantic search for the concept
search_ue_source(query="world partition streaming levels")
# 2. Read the documentation
search_ue_docs(query="world partition streaming setup")
# 3. Get best practices
get_ue_guidance(query="world partition best practices")
# 4. Find relevant CVars
search_params(query="world partition streaming", system="CVar") Multi-Version Queries
All tools accept a ue_version parameter with these values:
| Value | Behavior |
|---|---|
| (omitted) | Uses the configured default version (typically 5.7.2) |
| "5.5.0" | Exact version match |
| "5.5" | Matches the latest patch in the 5.5 series |
| "latest" | Resolves to the latest indexed version |
| "all" | Cross-version query that searches across all 27 versions |
# Get AActor's API in UE 5.4
get_class_details(class_name="AActor", ue_version="5.4.0")
# Cross-version search
search_ue_class(pattern="NaniteStaticMesh*", ue_version="all") Safety Enhancement
GraphRAG powers the second layer of AgentUX's safety system. With 7,350+ indexed assertions from the engine source, your AI gets warned about dangerous preconditions before triggering them.
- Layer 1 (Hardcoded Guards) (always active): Block known unsafe operations like saving during PIE
- Layer 2 (GraphRAG-Enhanced) (when connected): Queries the knowledge base for
check()andensure()calls, covering thousands of additional edge cases per session
Without GraphRAG, Layer 1 still provides core safety. With GraphRAG, coverage expands dramatically, especially for operations on less-common classes where hardcoded guards may not exist.
Performance
| Operation | Latency | Notes |
|---|---|---|
| Neo4j cold start | ~5.5s | JVM + database startup |
| MCP server startup | ~2s | Neo4j connect + verify |
| First semantic query | ~18s | One-time ONNX model load (~600MB) |
| Warm semantic query | ~300ms | Embed + vector search combined |
| Per-query embedding | ~31ms | After model is loaded |
| Structural queries | 4–45ms | Class lookup, hierarchy traversal |
| Vector search | 63–290ms | ~290ms source, ~63ms docs |
Structural graph queries (get_class_details, get_class_hierarchy) are fast from the start since they don't use embeddings. The one-time ~18s delay only applies to the first semantic search tool call.
Tip: Start Neo4j as a Windows service (neo4j install-service && neo4j start) so it's always running when the editor launches.
Neo4j Setup
GraphRAG requires Neo4j Community Server 5.x. If you haven't installed it yet:
- Download Neo4j Community Edition 5.x
- Ensure Java 21+ is installed
- Extract and start:
neo4j console - Verify at
bolt://localhost:7687 - Run the AgentUX installer to populate the database:
python install.py
For persistent background operation on Windows:
neo4j install-service
neo4j start Troubleshooting
Neo4j connection errors
- Verify Neo4j is running:
neo4j status - Check that
bolt://localhost:7687is accessible - Verify Java 21+ is installed:
java -version
Slow first query
The first semantic query loads the ONNX embedding model (~600MB). This is a one-time cost per session. Subsequent queries complete in under 300ms. If Neo4j is cold, add ~6 seconds for JVM startup.
MCP server not connecting
- Verify
GRAPHRAG_CONFIGenv var points to the correctconfig.yaml - Run
python install.py --skip-depsto reconfigure - Check that LanceDB data is present at the configured path
Stale or missing data
If the knowledge base seems incomplete or outdated, rebuild it from the source docs. See the Installation Guide's GraphRAG Setup section.
Tips
- Always verify names: UE property and function names are case-sensitive. A wrong name silently fails. Use
get_class_detailsbefore guessing. - Check parent classes: Many properties are inherited. Use
get_class_hierarchy(direction="up")to find where a property is defined. - Use semantic search for concepts:
search_ue_sourceandsearch_ue_docsunderstand natural language. - Struct parameters: Functions with struct parameters often can't be called via
editor.rc.call. Useeditor.rc.propertyWRITE instead. - Combine tools: Use
search_ue_docsfor "how it works",get_ue_guidancefor "how to do it well", andsearch_ue_sourcefor "show me the code". - Version shorthand: Use
"5.5"instead of"5.5.0". It auto-resolves to the latest patch. - Default version: If you omit
ue_version, queries run against the configured default. You usually don't need to specify a version for current-engine work.
Related
- Quick Start: Get running in under 10 minutes
- Installation: Detailed setup including Neo4j
- API Reference: All 558+ editor control methods