Unreal 引擎的 AI 开发者 — 一个自主的 AI 代理,可通过自然语言在 UE5 编辑器中创建蓝图、C++、级别、材质、小组件等
Autonomix — AI Developer for Unreal Engine
A production-grade Unreal Engine editor plugin that uses AI to autonomously create, modify, and manage entire game projects — directly inside the editor.
A QXMP Labs project
Features •
Tools •
Providers •
Installation •
Quick Start •
Architecture •
License
Overview
Autonomix brings agentic AI capabilities into the Unreal Engine editor. Instead of just generating code snippets, it operates as a fully autonomous developer — creating Blueprints via T3D injection, editing C++ source files, managing levels, materials, meshes, widgets, PCG graphs, animations, and more — all through a conversational chat interface embedded in the editor.
Think of it as Cursor/Roo Code, but for Unreal Engine — with deep engine integration that goes far beyond text editing.
How is this different from UE 5.7's built-in AI assistant? Unreal Engine 5.7 includes a contextual F1 AI helper focused on guidance — explaining features, suggesting workflows, and linking documentation. Autonomix is a doer: it executes tool calls that modify your project (create Blueprints, edit C++, build materials, spawn actors), with every action checkpointed, auditable, and undoable. They're complementary — one explains, the other builds.
Key Differentiators
T3D Blueprint Injection — Creates entire Blueprint node graphs in a single transaction using UE's native T3D format (the same format the editor uses for Ctrl+C/Ctrl+V). No node-by-node API calls.
GUID Placeholder System — AI uses human-readable tokens (LINK_1, GUID_A, NODEREF_Entry) that get resolved to real engine GUIDs automatically, preserving cross-node pin links.
85+ AI Tools — Not just file editing. Blueprint creation, component management, material graphs, animation systems, PCG, Enhanced Input, performance profiling, renderer settings, Behavior Trees, Sequencer, DataTables, Python scripting, viewport vision, PIE automation, and more.
Git-Based Checkpoint System — Shadow git repo per session lets you save, restore, and diff any point in the AI's work.
Agentic Tool Loop — The AI autonomously plans, executes tools, verifies results, and iterates until the task is complete.
Multi-Provider Support — Works with Anthropic Claude, OpenAI, Google Gemini, DeepSeek, Mistral, xAI, OpenRouter, Ollama, LM Studio, and any custom OpenAI-compatible endpoint.
Smart Context Management — Automatic conversation condensation, sliding-window truncation, token budget management, and tool result eviction for long sessions. Old tool results are automatically summarized once the AI has processed them.
Token-Optimized Tool Results — Blueprint readbacks use a compact connection verification format instead of raw T3D exports, reducing tool result tokens by 80-90% per call while preserving full verification capability.
Fuzzy Diff Applicator — Levenshtein-distance fuzzy matching for code edits, preventing failures from minor whitespace or formatting differences.
️ Session & UX Improvements (v1.3)
Stop Button — Single-click cancel for any in-progress AI operation. Send button transforms into a Stop button during processing, driven by a unified EConversationState state machine (Idle → Streaming → WaitingForToolApproval → Cancelling → Error). Escape key also cancels.
Conversation Persistence — Every task auto-saves to Saved/Autonomix/Tasks// with dual files: api_history.json (full message history for API replay) and ui_messages.json (display-optimized messages for instant UI restore). A task_index.json metadata index tracks all tasks with titles, timestamps, token counts, and cost.
Task Resumption — Resume any previous task from the History Panel. The system injects synthetic tool_result messages for any orphaned tool_use blocks, adds a time-aware resumption prompt, and presents Continue/End buttons. The AI replans based on what was accomplished rather than blindly continuing.
Conversation Beautification — Tool calls render as collapsible sections with color-coded left borders (blue for tools, green for success, red for errors, amber for system messages). Streaming text is batched at 50ms intervals for smooth rendering.
Enhanced History Panel — Date-grouped conversation list (Today / Yesterday / This Week / Older) with auto-generated titles from the first user message, per-task token counts and cost display, full-text search, sort by date/cost/title, inline rename, and delete with confirmation.
Dynamic Tool Injection — When the AI calls get_tool_info or list_tools_in_category, the discovered tool schemas are automatically added to the tools array on the next API call. No more "tool not available" errors after discovery.
Context-Aware AI — The AI is explicitly taught about context management in its system prompt. Environment details provide graduated warnings at 50%/75%/90% context usage with actionable instructions (be concise → wrap up → call attempt_completion with partial progress).
Next-Gen Agentic Autonomy (v1.2)
Multimodal Viewport Vision — Autonomix isn't blind. Using Vision-Language Models (VLMs), the AI can trigger the capture_viewport tool to visually analyze the Editor. It can build a UI, "look" at the viewport, and autonomously correct misaligned anchor points or bad lighting setups.
Automated PIE Playtesting — The AI closes the QA loop. It can autonomously launch Play-In-Editor (PIE), simulate player inputs, read the runtime Message Log for Accessed None errors or C++ asserts, and iteratively fix its own bugs before you even touch the mouse.
T3D Pre-Flight Validation Sandbox — Before applying Blueprint changes, the AI dry-runs node class references and function names against Unreal's Reflection system. Pin type mismatches are caught and warned before injection.
Auto-Layout Graph Formatting — All T3D-injected Blueprints are automatically passed through a Sugiyama-style DAG layout algorithm, ensuring generated node graphs are beautifully organized and instantly human-readable.
Python API "Escape Hatch" — For complex bulk operations, the AI can autonomously write and execute native Unreal Python scripts, granting it instant access to the entire UE Editor Utility and Asset Management API.
Token Optimization Engine — A multi-layered token reduction system:
Tool Result Eviction — Old tool results auto-summarized once the AI processes them
Prompt Caching — System prompt split into static (cacheable) + dynamic blocks for 90% cache hit rate on Anthropic
Schema Compression — Property descriptions truncated to 80 chars (the AI has seen these patterns during training)
Two-Tier Tool Loading — Only ~15 core tools sent per call; 70+ domain tools loaded on-demand via get_tool_info / list_tools_in_category meta-tools
Combined: 80-90% reduction in per-task token usage, making complex Blueprint tasks feasible on all providers.
Features
Editor Integration
Dockable Chat Panel — Full Slate-based chat UI with real-time SSE streaming, syntax-highlighted code blocks, unified diff viewer, inline asset previews, and collapsible tool call sections with color-coded borders
Multi-Tab Conversations — Work on multiple tasks simultaneously with full state persistence across editor restarts. Each task saved to Saved/Autonomix/Tasks// with dual-file model (API history + UI messages)
Stop Button — Cancel any in-progress operation with one click or Escape key. Send/Stop buttons swap based on EConversationState state machine
Context Bar — Live progress bar showing context window usage, token counts (input/output/cache), running cost in USD, and one-click context condensation
Slash Commands — Type /new-actor, /fix-errors, /optimize, /create-material, /refactor, /setup-input, /document, /add-component, /create-interface, /setup-replication for instant workflow shortcuts with autocomplete
@ References — Type @filename or @folder to include files/folders in your message context, with autocomplete suggestions
Task Todo List — AI maintains a live checklist of planned steps, updated as work progresses
Checkpoint Panel — View all saved checkpoints, restore to any point, diff between checkpoints
History Panel — Browse past conversations with date grouping (Today/Yesterday/This Week/Older), auto-generated titles, token counts, cost summaries, full-text search, sort by date/cost/title, inline rename, delete with confirmation, and one-click resume
Task Resumption — Resume any previous task with intelligent context restoration: synthetic tool results for orphaned calls, time-aware resumption prompt, Continue/End buttons
File Changes Panel — See all files modified during the current session
Follow-Up Suggestions — AI suggests next actions after completing a task
Safety & Reliability
Safety Gate — Risk evaluation (Low/Medium/High/Critical) for every tool call. Protected files (.uplugin, .uproject, .Build.cs) are read-only for the AI regardless of mode.
.autonomixignore — Gitignore-style pattern file to hide files/directories from the AI. Auto-created with sensible defaults on first run. Live-reloads on changes.
Auto-Approval System — Configure automatic approval for read-only operations. Safety limits on consecutive requests and cumulative cost before requiring user confirmation.
Tool Repetition Detection — Automatically detects and blocks infinite loops (AI repeating the same failing tool call). Configurable threshold (default: 3 consecutive identical calls).
Execution Journal — Append-only audit trail of every tool action with SHA-1 pre/post file hashes for deterministic state verification. Saved to Saved/Autonomix/ExecutionLog_YYYYMMDD.json.
Backup Manager — Automatic file backups before modifications with undo group support.
Error Retry Logic — Structured retry tracking per action with configurable max attempts.
Code Validation — Generated C++ code is checked against a denylist of dangerous patterns before writing.
Context Management (Ported from Roo Code)
Conversation Condensation — When context reaches 80%, the conversation is summarized by the AI into a compact summary while preserving critical details. Auto-triggers or manual via the "Condense" button.
Sliding-Window Truncation — When condensation isn't enough, non-destructive truncation tags oldest messages (preserving them for rewind) while keeping API payloads within limits.
Tool Result Eviction — Old tool results (>2000 chars) that the AI has already processed are automatically replaced with compact summaries in the effective history. Protected guards ensure the last 5 large results and results within the last 20 messages are never evicted, preventing critical data loss on resumed sessions.
Compact Blueprint Readbacks — get_blueprint_info, inject_blueprint_nodes_t3d, and verify_blueprint_connections return compact connection reports (exec chain, data connections, pin values, disconnected pins) instead of raw T3D exports, saving 80-90% tokens per call.
Prompt Caching — System prompt is split into a static prefix (role + rules + guidelines, ~7K tokens) with cache_control: ephemeral and a dynamic suffix (project context, recent actions). Anthropic caches the static prefix at 90% discount after the first call.
Two-Tier Tool Loading with Dynamic Injection — Instead of sending 40-90 tool schemas on every call (~5-8K tokens), only ~15 core tools are sent. The AI discovers domain-specific tools on demand via get_tool_info and list_tools_in_category meta-tools, and discovered sche