Documentation

Complete reference for Unreal AI Copilot v1.0 · Unreal Engine 5.4+

Installation

  1. 1 Install from the Fab Marketplace. The plugin installs to Plugins/UnrealAICopilot/ and is enabled by default.
  2. 2 Open your project in UE 5.4+ Editor — the plugin loads automatically.
  3. 3 Set your API key (see below), then open the chat panel via Tools → AI Copilot or the toolbar button.

API Key Setup

API keys are read from environment variables at runtime — they are never written to project config files.

Security: Because keys live in environment variables, they cannot be accidentally committed to source control.

Windows (recommended)

C:\> setx OPENAI_API_KEY "sk-..."

Then restart the editor for the variable to take effect. Use setx, not set — the latter only applies to the current terminal session.

Windows (GUI method)

  1. Press Win + R, type sysdm.cpl, press Enter.
  2. Go to AdvancedEnvironment Variables…
  3. Under User variables, click New…
  4. Variable name: OPENAI_API_KEY — Variable value: sk-...
  5. Click OK, restart the editor.

Linux / macOS

# Add to ~/.bashrc, ~/.zshrc, or ~/.profile:
export OPENAI_API_KEY="sk-..."

Restart your terminal and editor.

Quick Start

1

Install

Install from Fab Marketplace. Enabled by default.

2

Set API Key

setx OPENAI_API_KEY "sk-..." then restart editor.

3

Open Chat Panel

Tools → AI Copilot, or click the toolbar button.

4

Start Chatting

Type a message, press Enter. AI responds in real-time.

Provider Settings

All settings: Project Settings → Plugins → AI Copilot

SettingDefaultDescription
ProviderOpenAILLM backend: OpenAI, Anthropic, OpenRouter, GitHub Copilot, or Local
Model Idgpt-4oModel identifier sent to the provider
Endpoint URL Override(empty)Custom endpoint URL. Required for Local provider.
API Key Env VarOPENAI_API_KEYEnvironment variable name holding your API key

Generation Settings

SettingDefaultRangeDescription
Temperature0.30.0 – 2.0Sampling temperature (lower = more deterministic)
Max Tokens4,096256 – 32,768Maximum tokens per LLM response
Max Tool Iterations501 – 100Maximum tool-call rounds per message (legacy mode)
Max Tool Result Chars16,0000 – 500,000Max characters per tool result. 0 = no limit.

Task Execution Limits

SettingDefaultRangeDescription
Max Discovery Iterations100 – 30Read-only rounds during the planning phase
Max Mutation Iterations Per Task151 – 100Successful mutation rounds per task
Max Total Round Trips Per Task301 – 200Hard cap on total LLM calls per task
Max Consecutive Tool Failures51 – 50Auto-skip task after N consecutive failures
Max Text Tool Auto-Parses Per Turn50 – 20Text-format tool call auto-parse limit

Behavior

SettingDefaultDescription
Auto Include Editor StateEnabledAutomatically include selected actors, level name, camera position
Auto Include ViewportDisabledAttach a viewport screenshot to every message
Stream ResponsesEnabledShow tokens as they arrive

Default Endpoints

When Endpoint URL Override is left empty:

ProviderDefault Endpoint
OpenAIhttps://api.openai.com/v1/chat/completions
Anthropichttps://api.anthropic.com/v1/messages
OpenRouterhttps://openrouter.ai/api/v1/chat/completions
GitHub Copilothttps://api.githubcopilot.com/chat/completions
Localhttp://localhost:11434/v1/chat/completions

Basic Chat

  1. Open the chat panel (Tools → AI Copilot, or the toolbar button).
  2. Type a message and press Enter to send (Shift+Enter for newline).
  3. The AI responds in real-time with streaming text.
  4. Click Clear to reset the conversation.
  5. Click Cancel to abort an in-flight request.

Pinned Assets

Right-click any asset in the Content Browser and select "Add to AI Context". Pinned assets appear as chips above the chat input, giving the AI persistent awareness of the assets you're working with. Their metadata is injected into every LLM system prompt.

Viewport Screenshots

If Auto Include Viewport is enabled, a screenshot is attached to every message automatically. Otherwise, the AI captures the viewport on demand when it needs visual context.

Note: Requires a vision-capable model (e.g., GPT-4o, Claude Sonnet 4).

Conversation History

Click the history toggle button to open the side panel. Load or delete saved conversations. History is stored locally in Saved/AICopilot/Conversations/ as JSON files.

Switching Providers

  1. Go to Project Settings → Plugins → AI Copilot.
  2. Change Provider to the desired backend.
  3. Update Model Id for that provider.
  4. Set API Key Env Var to the matching environment variable.
  5. For local models, set Endpoint URL Override.

Provider Setup Guides

OpenAI

1. Get an API key from platform.openai.com.

C:\> setx OPENAI_API_KEY "sk-..."

3. In settings: Provider: OpenAI · Model Id: gpt-4o · API Key Env Var: OPENAI_API_KEY

Anthropic

1. Get an API key from console.anthropic.com.

C:\> setx ANTHROPIC_API_KEY "sk-ant-..."

3. In settings: Provider: Anthropic · Model Id: claude-sonnet-4-20250514 · API Key Env Var: ANTHROPIC_API_KEY

OpenRouter

1. Get an API key from openrouter.ai.

C:\> setx OPENROUTER_API_KEY "sk-or-..."

3. In settings: Provider: OpenRouter · Model Id: e.g., anthropic/claude-sonnet-4-20250514 or openai/gpt-4o · API Key Env Var: OPENROUTER_API_KEY

GitHub Copilot

1. Create a GitHub Personal Access Token with the copilot scope at github.com/settings/tokens.

C:\> setx GITHUB_COPILOT_API_KEY "ghp_..."

3. In settings: Provider: GitHub Copilot · Model Id: gpt-4o · API Key Env Var: GITHUB_COPILOT_API_KEY

Requires an active Copilot Individual, Business, or Enterprise subscription.
Local Models (Ollama / LM Studio)

1. Start your local model server (e.g., ollama serve).

2. In settings:

  • Provider: Local
  • Model Id: e.g., llama3, codellama, mistral
  • Endpoint URL Override: http://localhost:11434/v1 (Ollama) or http://localhost:1234/v1 (LM Studio)
  • API Key Env Var: leave as default (not required)

Tool Reference — 23 Tools, ~177 Sub-actions

Tools are classified as Discovery (read-only, free iterations) or Mutating (counts toward task limit on success).

CategoryToolsSub-actions
Editorcapture_viewport, get_editor_state, get_selected_actor_details, editor_control16
Blueprintlist_blueprints, read_blueprint_graph, manage_blueprint, manage_blueprint_graph30
Materiallist_materials, read_material, manage_material27
Actor & Levelcontrol_actor, manage_level, manage_lighting, access_property47
Geometrymanage_geometry25
Environmentmanage_environment19
Splinesmanipulate_spline6
Asset & Projectmanage_asset, get_project_summary, read_source_file, list_source_files7+
Scriptingexecute_python

Blueprint Tools

ToolTypeDescription
list_blueprintsDiscoveryList Blueprint assets. Params: path_filter, limit (default 50).
read_blueprint_graphDiscoveryRead nodes, pins, connections, variables. Required: asset_path.
manage_blueprintMutatingCreate/modify Blueprints. 18 sub-actions.
manage_blueprint_graphMutatingCreate/wire/inspect graph nodes. 12 sub-actions + batch mode.

manage_blueprint Sub-actions (18)

Sub-actionDescription
create_blueprintCreate from any parent class (Actor, Pawn, Character, Component, GameMode, etc.)
compileForce compile a Blueprint
add_variableAdd a variable with type and metadata
remove_variableRemove a variable by name
rename_variableRename an existing variable
add_componentAdd a component to the SCS hierarchy
remove_componentRemove a component
add_event_nodeAdd an event node to the graph
add_functionAdd a function graph
add_interfaceImplement an interface
add_event_dispatcherAdd an event dispatcher
set_defaultSet default property values
remove_eventRemove an event node
set_variable_metadataSet metadata on a variable
add_construction_scriptAdd construction script logic
set_scs_component_transformSet SCS component transform
set_scs_component_propertySet SCS component properties
get_infoGet Blueprint information

manage_blueprint_graph Sub-actions (12)

Sub-actionKey ParamsDescription
create_nodenodeType, x, yCreate a graph node
connect_pinsfromNodeId, fromPinName, toNodeId, toPinNameWire two pins together
get_nodesgraphNameList all nodes with pins and connections
delete_nodenodeIdRemove a node
break_pin_linksnodeId, pinNameDisconnect a pin
set_pin_default_valuenodeId, pinName, valueSet a pin's default value
set_node_propertynodeId, propertyName, valueSet node properties
create_reroute_nodex, yCreate a reroute node
get_node_detailsnodeIdDetailed info for one node
get_graph_detailsgraphNameGraph-level information
get_pin_detailsnodeId, pinNamePin-level information
list_node_typesAvailable node types
Batch Mode: Pass an actions array instead of subAction to execute multiple graph operations in a single call. Top-level blueprintPath and graphName apply to all actions unless overridden per-action.

Node Type Shortcuts

PrintString Branch Sequence Delay ForLoop Self Timeline SetActorLocation GetActorLocation DestroyActor SpawnActor GetPlayerPawn PlaySound IsValid MakeVector BreakVector Add_DoubleDouble VariableGet VariableSet CallFunction Event CustomEvent Cast InputAxisEvent

Material Tools

ToolTypeDescription
list_materialsDiscoveryList Material/MaterialInstance assets.
read_materialDiscoveryRead expressions, parameters, shading model.
manage_materialMutatingFull material authoring. 27 sub-actions.

manage_material Sub-actions (27)

Sub-actionKey Params
create_materialname, path, blendMode, shadingModel, materialDomain, twoSided
set_blend_modeassetPath, blendMode (Opaque/Masked/Translucent/Additive/Modulate)
set_shading_modelassetPath, shadingModel (Unlit/DefaultLit/Subsurface/ClearCoat/etc.)
set_two_sidedassetPath, twoSided
set_material_domainassetPath, materialDomain (Surface/DeferredDecal/PostProcess/etc.)
add_scalar_parameterassetPath, parameterName, defaultValue, x, y
add_vector_parameterassetPath, parameterName, r, g, b, a
add_texture_sampleassetPath, texturePath, parameterName
add_material_nodeassetPath, nodeType
connect_nodessourceNodeId, targetNodeId, inputName
disconnect_nodessourceNodeId, targetNodeId, inputName
remove_material_nodeassetPath, nodeId
get_material_node_detailsassetPath, nodeId
compile_materialassetPath
create_material_instancename, parentMaterial
set_scalar_param_valueassetPath, parameterName, value
set_vector_param_valueassetPath, parameterName, r, g, b, a
set_texture_param_valueassetPath, parameterName, texturePath
get_material_infoassetPath
assign_materialassetPath, actorName, slotIndex
create_material_functionname, path, description
add_function_inputassetPath, inputName, inputType
add_function_outputassetPath, outputName, outputType
use_material_functionassetPath, functionPath
create_landscape_materialname, path, layers
create_decal_materialname, path
create_post_process_materialname, path

Supported Expression Node Types

Add Multiply Subtract Divide Power Lerp Clamp OneMinus Constant Constant3Vector ScalarParameter VectorParameter TextureSample TextureCoordinate Fresnel WorldPosition Noise Panner ComponentMask DotProduct Desaturation Append Frac If Custom

Actor & Level Tools

ToolTypeDescription
control_actorMutatingSpawn/delete/transform/query actors. 27 sub-actions.
manage_levelMutatingLevel management: save, create, open, list.
manage_lightingMutatingSpawn lights, sky lights, build lighting, set exposure.
access_propertyMutatingGet/set any UObject property by reflection. 9 sub-actions.

control_actor Sub-actions (27)

Sub-actionKey Params
spawn_actorclassName or meshPath, location, rotation, scale, name
spawn_blueprintblueprintPath, location, rotation, scale, name
delete_actoractorName
set_transformactorName, location, rotation, scale
get_transformactorName
set_visibilityactorName, visible
duplicate_actoractorName, offset, count
list_actorsclassFilter, nameFilter
find_by_name / find_by_class / find_by_tagnamePattern, className, tag
add_tag / remove_tagactorName, tag
attach_actor / detach_actoractorName, parentName, socketName
set_physicsactorName, simulate, gravityEnabled
set_collisionactorName, collisionEnabled, collisionProfile
set_mobilityactorName, mobility (Static/Stationary/Movable)
rename_actoractorName, newName
focus_actoractorName
get_actor_detailsactorName
get_bounding_boxactorName
get_componentsactorName
add_component_to_actor / remove_component_from_actoractorName, componentClass, componentName
select_actorsactorNames, addToSelection

access_property Sub-actions (9)

Sub-actionKey Params
set_property / get_propertyobjectPath, propertyName, value
list_propertiesobjectPath
array_length / array_get / array_setobjectPath, propertyName, index
array_append / array_remove / array_clearobjectPath, propertyName, value

Procedural Geometry — 25 Sub-actions

Sub-actionKey Params
create_box / create_sphere / create_cylinder / create_conelocation, size/radius/height, name
create_capsule / create_torus / create_plane / create_disclocation, radius/width/height, name
create_stairslocation, stepCount, stepWidth, stepHeight, name
boolean_union / boolean_subtract / boolean_intersectionactorA, actorB
subdivideactorName, levels
simplifyactorName, targetPercentage
smoothactorName, iterations
flip_normals / recalculate_normalsactorName
weld_verticesactorName, tolerance
fill_holes / mirroractorName, axis
translate_mesh / scale_meshactorName, offset/scale
auto_uvactorName
convert_to_static_meshactorName, assetPath
get_mesh_infoactorName

Environment & Volumes — 19 Sub-actions

Sub-actionKey Params
create_trigger_box / create_trigger_spherelocation, extent/radius, name
create_blocking_volumelocation, extent, name
create_kill_z_volumelocation, extent
create_post_process_volumelocation, extent, infinite
create_audio_volumelocation, extent, name
create_physics_volume / create_pain_causing_volumelocation, extent, damage
create_nav_mesh_bounds / create_camera_blockinglocation, extent
set_volume_extent / get_volumes_info / remove_volumeactorName, extent
spawn_sky_atmosphere / spawn_exponential_fog / spawn_volumetric_cloudlocation, density, color
set_post_process / set_fog_settingsactorName, settings params
get_environment_info

Spline Tools — 6 Sub-actions

Sub-actionKey Params
get_spline_pointsactorName
set_spline_pointsactorName, points
add_spline_pointactorName, location, index
set_location_at_pointactorName, index, location
set_tangent_at_pointactorName, index, tangent
remove_spline_pointactorName, index

Editor Control — 16 Sub-actions

Sub-actionKey Params
play / stop / pause / eject
undo / redo
save_all
save_asset / open_asset / close_asset / reload_assetassetPath
console_commandcommand
get_selection
get_viewport_info
set_viewport_locationlocation, rotation
set_realtimeenabled

Asset & Project Tools

ToolDescription
manage_assetContent browser operations: duplicate, rename, delete, create_folder, list_assets, exists, save_all.
get_project_summaryAsset counts by type, enabled plugins, source modules, folder structure overview.
read_source_fileRead project source files (sandboxed). Allowed: .h, .cpp, .cs, .ini, .json, .py, .md, etc.
list_source_filesList source files. Params: subdirectory, extension.

Python Scripting

ToolDescription
execute_pythonExecute Python scripts via the unreal module. Required: code. Optional: execution_mode (execute_file / execute_statement / evaluate_statement). Last-resort tool — the AI prefers dedicated tools for standard operations.
Requires: The optional PythonScriptPlugin to be enabled.

Architecture

Module Structure

ModuleTypeLoading PhaseRole
UnrealAICopilotCoreEditorDefaultLLM providers, orchestrator, conversation, settings, tool registry, types
UnrealAICopilotToolsEditorDefault18 tool handler implementations
UnrealAICopilotUIEditorPostDefaultDockable Slate chat panel, tab registration, toolbar

Key Classes

ClassTypeRole
UAICopilotOrchestratorUEditorSubsystemAgent loop: message → context → LLM → tools → response
UAICopilotToolRegistryUObject (singleton)O(1) tool dispatch via TMap
UAICopilotSettingsUDeveloperSettingsAll plugin settings, exposed in Project Settings
FAICopilotConversationStructMessage history, token budgeting, context window management
FAICopilotToolDescriptorStructTool name, description, JSON Schema parameters, category
SAICopilotChatPanelSCompoundWidgetDockable Slate chat panel with streaming and task progress
IAICopilotLLMProviderInterfaceAbstract LLM backend — implemented by OpenAI, Anthropic, Local

Orchestrator Engine

The UAICopilotOrchestrator implements a two-phase agentic workflow:

Phase 1: Planning (Discovery)

  1. User sends a message via SendMessage().
  2. Automatic context is injected (editor state, viewport screenshot, pinned assets).
  3. A planning-specific system prompt is sent with the discovery tool catalog.
  4. Discovery phase — the LLM calls read-only tools to gather project state. Mutating calls are blocked.
  5. The LLM outputs a JSON task plan with approach and tasks[] (2–8 tasks).
  6. If no plan JSON is detected (simple question), the response is returned directly.

Phase 2: Task Execution

  1. Tasks execute sequentially in plan order.
  2. Each task gets a scoped conversation with full plan status markers ([DONE], [CURRENT], [PENDING], [FAILED]).
  3. Full tool access — all 23 tools are available.
  4. The loop runs until the LLM produces a text-only response (task complete) or limits are reached.

LLM Providers

ProviderDefault ModelStreamingVisionTool Calling
OpenAIgpt-4oYes (SSE)Model-dependentOpenAI function calling
Anthropicclaude-sonnet-4-20250514Yes (SSE)All Claude 3+Anthropic tool use
Local / OpenRouter / GitHub Copilotllama3YesModel-dependentOpenAI-compatible

Iteration Counting & Safety

Smart Iteration Counting

The iteration counter only increments on successful mutating tool calls:

  • Read-only tools (prefixed read_, list_, get_, capture_) → always free.
  • Failed mutations → free, the AI gets another chance.
  • Success detection → parses JSON result for success, error, errors fields.

Consecutive Failure Bail-out

After N consecutive failures (default 5), the task is marked as Failed and execution skips to the next task. The counter resets at each new task.

Cancel Support

Clicking Cancel immediately cancels the HTTP request, marks remaining tasks as Failed, and resets execution state. Checked at 7 async re-entry points in the pipeline.

Troubleshooting

ProblemSolution
"API key not found" in chatUse setx VAR_NAME "key" (not set) to persist, then restart the editor.
No response from AICheck Output Log for LogAICopilot. Verify endpoint URL and model ID.
Local model not connectingConfirm server is running and endpoint URL matches (e.g., http://localhost:11434/v1).
Viewport capture returns emptyEnsure an active Level Editor viewport is visible and not minimized.
AI keeps failingAfter consecutive failures the task auto-skips. Check Output Log. May need an optional plugin.
Model selector is emptyClick dropdown to trigger async fetch. For local models, ensure /models endpoint is supported.
Tool results truncatedIncrease Max Tool Result Chars in settings (default: 16,000). Set to 0 for no limit.
Conversation history not loadingCheck that Saved/AICopilot/Conversations/ exists and contains .json files.

FAQ

Does it send my project data to external servers?
Only to the LLM provider you configure. Use a local model (Ollama/LM Studio) to keep everything on your machine. No other server ever receives data.
Are my API keys stored safely?
Yes. Keys are read from environment variables at runtime and never written to project config files.
Which model should I use?
GPT-4o (OpenAI), Claude Sonnet 4 (Anthropic), or Kimi K2.5 (OpenRouter). Vision features require a vision-capable model.
Can I use this completely offline?
Yes. Use Ollama or LM Studio with a local model, set the Local provider, and no internet connection is required.
Does it work with C++ projects?
The AI reads and reasons about C++ source files. It modifies via the editor asset pipeline (Blueprints, materials, actors) — not by editing C++ directly.
Can I undo changes the AI makes?
Yes. All operations go through standard editor commands and support Ctrl+Z undo. The chat panel shows exactly which tools were called.
What happens if a task fails?
The AI retries with a different approach. After 5 consecutive failures (configurable), it skips to the next task. You can also click Cancel at any time.
Does it work in Play-in-Editor (PIE)?
The plugin operates in the editor, not during gameplay. You can chat while PIE is running, but tool operations target the editor world.
© 2026 Compass Software S.R.L. All rights reserved.