RiftbornAI Documentation
The first AI that builds your game for you. Directly inside Unreal Engine. Not a chatbot. Not code autocomplete. A real in-editor AI that generates levels, blueprints, abilities, UI, AI trees, and entire game systems from plain English.
The NPC Brain: 12 Cognitive Systems
Not scripted behavior trees. Not GPT wrappers. 10,000 lines of Python implementing real cognitive architecture: causal world modeling, intrinsic motivation (curiosity-driven behavior), goal hierarchies, self-modeling, adversarial competition, and continuous learning. NPCs that actually think.
Your IP Stays Yours
No code leaves your machine. No project files shared. No secrets leaked. AES-256 encryption on all communications. Your assets, your game, your intellectual property β protected.
The NPC Brain Architecture
RiftbornAI isn't just another LLM wrapper. It includes a complete cognitive architecture for NPCs β 12 systems that give characters perception, memory, goals, curiosity, and self-awareness.
What This Actually Is
Let's be completely honest about what RiftbornAI is and isn't:
What It IS:
- A production-quality HTTP bridge server β 228K lines of C++ that runs inside Unreal Editor
- 702 editor tools β Spawn actors, create blueprints, generate materials, configure AI, and more
- An LLM integration layer β Claude API (recommended) or Ollama (local)
- 12 NPC cognitive systems β Real perception, memory, goals, curiosity, self-modeling
- Voice chat NPCs β Whisper STT + XTTS neural TTS = real voice conversations
- A security-first design β Rate limiting, RBAC, authentication, audit logging built in
- A self-repairing system β Detects failing tests, generates patches, rewrites C++, rebuilds
What It Is NOT:
- Not AGI β The brain is a cognitive architecture for NPCs, not general intelligence
- Not magic β It executes tools based on LLM interpretation. Quality depends on the model.
- Not a replacement for knowing UE β It accelerates experts. Beginners still need to learn.
The 12 Cognitive Systems
| System | What It Does |
|---|---|
| Causal World Model | NPCs learn cause-effect relationships from observation |
| Intrinsic Motivation | Curiosity-driven behavior β NPCs explore novel situations |
| Epistemic Punishment | Learning from prediction errors β wrong guesses hurt |
| Multi-Drive System | Competing needs: hunger, safety, social, curiosity |
| Lossy Compression | Memory consolidation β compress experiences into rules |
| Living World | Time of day, weather, location awareness |
| Goal Hierarchy | Days β Hours β Minutes β Seconds goal decomposition |
| Self-Model | NPCs know their own skills, weaknesses, limits |
| Adversarial Competition | Scarce resources, NPC vs NPC competition |
| Continuous Learning | Physics intuition β predict object behavior |
| Permanent Damage | Injuries persist, affect capabilities |
| Cognition API | Unified interface to all cognitive state |
Self-Repair: The Brain Rewrites Itself
This Is Real Self-Modifying Code
When tests fail, the system doesn't just report errors β it fixes them. It reads C++ source files, replaces broken code with working patches, triggers Unreal Build Tool, and validates the fix. No human intervention required.
The Self-Repair Loop
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TEST GATE FAILS β
β "Project.TDM.Logic.ApplyKillLogic FAILED" β
βββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BUG PATTERN DETECTION β
β Analyze failure signature β Match known bug patterns β
β Result: "score_not_updated" detected β
βββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βββββββββββββββββββ΄ββββββββββββββββββ
βΌ βΌ
βββββββββββββββββββββ βββββββββββββββββββββ
β PATCH CACHE β β LLM REPAIR β
β (Trusted Fixes) β β (Generate New) β
β β β β
β 3+ successful β β Claude analyzes β
β uses = promoted β β code, generates β
β to "trusted" β β fix, adds to β
β β β cache β
βββββββββββ¬ββββββββββ βββββββββββ¬ββββββββββ
β β
βββββββββββββββββββ¬ββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β APPLY PATCH TO C++ β
β β
β TeamDeathmatchLogic.cpp: β
β - // BUG: GameState->AddTeamScore(KillerPS->GetTeam(), 1); β
β + GameState->AddTeamScore(KillerPS->GetTeam(), 1); β
β β
β path.write_text(new_content, encoding='utf-8') β
βββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REBUILD VIA UBT β
β Build.bat testEditor Win64 Development β
βββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RE-RUN TEST GATE β
β All tests pass β Patch promoted to "trusted" β
β Tests still fail β Revert, try different strategy β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Bandit Learning
The system uses a multi-armed bandit algorithm (UCB1) to learn which repair strategies work best. Each strategy is scored based on success rate, and the system explores vs. exploits intelligently. Patches that succeed 3+ times are promoted to "trusted" status.
The Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NPC COGNITIVE BRAIN β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β World Model β β Goals β β Learning Systems β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RIFTBORN AI (320K lines) β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β HTTP Bridge ββββ Tool System ββββ Design Systems (16) β β
β β (228K C++) β β (702 tools) β β GAS/AI/VFX/UI/etc β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ β
β β NPC Brain (10K lines Python) β β
β β βββββββββββ βββββββββββββ βββββββββββ βββββββββββ β β
β β β World β β Self β β Goal β β Drive β β β
β β β Model β β Model β β Hierarchβ β System β β β
β β βββββββββββ βββββββββββββ βββββββββββ βββββββββββ β β
β β 12 Cognitive Systems - See, Hear, Think, Speak β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β UNREAL ENGINE 5.7 β
β Blueprints Β· Actors Β· Materials Β· Levels β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Honest Numbers
No inflated metrics. No marketing BS. Here's exactly what exists in the codebase right now. Every number verified by direct file counts.
Code Breakdown
| Component | Count | Status |
|---|---|---|
| Total Codebase | 320,186 lines | Production |
| Plugin C++ Source | 227,798 lines | Production |
| Bridge (Python) | 92,388 lines | Working |
| NPC Cognitive Systems | 9,907 lines | Learning |
Architecture Metrics
| Metric | Count | What It Means |
|---|---|---|
| C++ Header Files | 239 | Public interfaces |
| C++ Source Files | 233 | Implementation |
| Python Modules | 104 | Bridge & cognitive systems |
| NPC Cognitive Files | 12 | npc_*.py brain systems |
All Numbers Verified
Every stat on this page was counted by grep/find on the actual codebase. No estimates. No rounding up. This is what exists.
Early Access Reality Check
This is pre-release software. Some tools work flawlessly. Others need polish. We ship fast and iterate based on real feedback. If you want perfect, wait. If you want powerful, join now.
Installation
Get RiftbornAI running in your Unreal Engine project in under 5 minutes.
Prerequisites
- Unreal Engine 5.5+ (5.7 recommended for full feature support)
- Python 3.10+ for bridge scripts
- Claude API key (recommended) β enables cloud brain learning, gets cheaper over time
- Ollama (alternative) β fully local, no cloud dependency, but no learning benefits
- 16GB RAM minimum, 32GB recommended
- 8GB+ VRAM for local model inference
Step 1: Download the Plugin
Download the latest release when available (Q1 2026), or join the waitlist for early access:
# Join the waitlist at:
https://riftborn-ai.vercel.app
# Early access members receive direct download links
Step 2: Install to Your Project
Copy the RiftbornAI folder to your project's Plugins directory:
YourProject/
βββ Content/
βββ Config/
βββ Plugins/
β βββ RiftbornAI/ β Copy here
β βββ RiftbornAI.uplugin
β βββ Source/
β β βββ RiftbornAI/
β β βββ Private/
β β β βββ DebugBridgeServer.cpp (214K lines)
β β β βββ ClaudeToolUse.cpp
β β β βββ Providers/
β β βββ Public/
β βββ Bridge/
β βββ Content/
βββ YourProject.uproject
Step 3: Enable the Plugin
- Open your project in Unreal Editor
- Go to Edit β Plugins
- Search for "RiftbornAI"
- Check the box to enable it
- Restart the editor when prompted
Step 4: Configure LLM Provider
Option A: Claude API (Recommended)
Claude enables the cloud brain β every task teaches the system, building patterns that reduce future LLM calls. Your costs decrease over time.
# Set your Claude API key
set ANTHROPIC_API_KEY=sk-ant-your-key-here
# Or add to system environment variables for persistence
Option B: Ollama (Local, No Learning)
Fully offline. Your data never leaves your machine. But no cloud brain learning β costs stay flat.
# Start the Ollama server
ollama serve
# Pull a recommended model
ollama pull qwen2.5-coder:7b
You're Ready!
The bridge server starts automatically when Unreal Editor opens. Check the Output Log for "RiftbornAI Debug Bridge active on port 8766".
Quick Start
Send your first command to RiftbornAI and watch it build something in your level.
Verify the Bridge is Running
curl http://localhost:8766/riftborn/ping
# Response:
{"ok":true,"message":"RiftbornAI Debug Bridge active"}
Send Your First Command
curl -X POST http://localhost:8766/riftborn/chat \
-H "Content-Type: application/json" \
-d '{"message": "Spawn a point light at position 0, 0, 200"}'
Response
{
"ok": true,
"message": "Spawn a point light at position 0, 0, 200",
"duration_ms": 1247.5,
"response": "I've spawned a PointLight actor at location (0, 0, 200).",
"tool_calls": [
{
"name": "spawn_actor",
"success": true,
"result": "Spawned PointLight at (0, 0, 200)",
"arguments": {
"actor_class": "PointLight",
"location": "{\"x\":0,\"y\":0,\"z\":200}"
}
}
]
}
Try These Commands
| Command | What It Does |
|---|---|
| "Spawn a cube at the origin" | Creates a static mesh actor |
| "Create a floor 2000x2000 units" | Generates level geometry |
| "Add 4 point lights in a square pattern" | Batch spawns with positioning |
| "Set the directional light intensity to 5" | Modifies existing actors |
| "List all actors in the level" | Queries the scene |
Configuration
Customize RiftbornAI for your workflow and security requirements.
Environment Variables
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY | - | Recommended: Claude API key for brain learning |
RIFTBORN_AUTH_ENABLED | false | Enable API key authentication |
RIFTBORN_API_KEY | - | API key for authentication (auto-enables auth) |
RIFTBORN_RATE_LIMIT_ENABLED | true | Enable rate limiting |
RIFTBORN_RBAC_ENABLED | false | Enable role-based access control |
RIFTBORN_ENCRYPTION_KEY | - | Base64 encoded 32-byte key for AES-256 |
OLLAMA_HOST | localhost:11434 | Ollama server address (if using local) |
Config File
Add to your project's Config/DefaultEditor.ini:
[RiftbornAI.Security]
AuthEnabled=false
RateLimitEnabled=true
RBACEnabled=false
ToolTimeoutMs=30000
MaxRequestBodySize=10485760
[RiftbornAI.LLM]
Provider=claude # Recommended: enables brain learning
# Provider=ollama # Alternative: fully local
Model=qwen2.5-coder:7b
Temperature=0.7
MaxTokens=4096
API Reference
Complete reference for the RiftbornAI HTTP API. All endpoints return JSON.
Base URL
http://localhost:8766
Authentication
When auth is enabled, include your API key in requests:
# Option 1: X-API-Key header
curl -H "X-API-Key: your_api_key_here" http://localhost:8766/riftborn/status
# Option 2: Bearer token
curl -H "Authorization: Bearer your_api_key_here" http://localhost:8766/riftborn/status
Endpoints
11 HTTP endpoints for full control over RiftbornAI.
GET /riftborn/ping
Simple health check. No rate limiting.
{"ok": true, "message": "RiftbornAI Debug Bridge active"}
GET /riftborn/health
Detailed health check with component status.
{
"status": "healthy",
"ok": true,
"service": "RiftbornAI",
"timestamp": "2025-12-06T15:30:00Z",
"components": {
"http_server": "healthy",
"tool_registry": "healthy",
"rate_limiter": {"enabled": true, "remaining_requests": 95}
}
}
GET /riftborn/status
Server status including tool count and LLM provider connection.
GET /riftborn/tools
List all 415+ registered tools with descriptions and parameters.
GET /riftborn/metrics
Prometheus-compatible metrics for monitoring.
riftborn_requests_total 1247
riftborn_requests_success_total 1198
riftborn_requests_failed_total 49
riftborn_uptime_seconds 3847.25
riftborn_tools_registered 415
riftborn_tool_executions_total{tool="spawn_actor"} 89
POST /riftborn/chat
Send natural language commands. The LLM interprets and executes tools.
{
"message": "Create a blueprint called BP_Enemy with a health component"
}
POST /riftborn/tool
Execute a specific tool directly (bypass LLM).
{
"tool": "spawn_actor",
"args": {
"actor_class": "PointLight",
"location": {"x": 0, "y": 0, "z": 100}
}
}
POST /riftborn/clear
Clear conversation history and operation context.
GET /riftborn/context
Get recent operations for error recovery.
GET /riftborn/logs
Get recent log entries from the bridge.
GET /riftborn/audit
Get audit log entries (requires authentication).
Tool Catalog
415+ tools organized into 16 design systems. Here are the key categories.
Actor Tools
| Tool | Description |
|---|---|
spawn_actor | Spawn any actor class at a location |
delete_actor | Remove an actor from the level |
move_actor | Set actor position/rotation/scale |
get_actors | Query actors in the level by class or tag |
set_actor_property | Modify any exposed property |
duplicate_actor | Clone an actor with offset |
Blueprint Tools
| Tool | Description |
|---|---|
create_blueprint | Create a new Blueprint asset |
add_component | Add component to Blueprint |
add_variable | Add a variable with type |
add_function | Add a function to the graph |
add_node | Add a node to the event graph |
connect_pins | Connect two pins together |
compile_blueprint | Compile and save Blueprint |
Material Tools
| Tool | Description |
|---|---|
create_material | Create a new Material asset |
add_material_expression | Add a node to material graph |
set_material_param | Set scalar/vector parameters |
create_material_instance | Create a material instance |
apply_material | Apply material to actor/mesh |
Level Design Tools
| Tool | Description |
|---|---|
create_floor | Generate floor geometry |
create_wall | Generate wall segments |
create_room | Generate enclosed room |
add_navmesh | Configure navigation mesh |
set_lighting | Configure scene lighting |
Design Systems
16 specialized systems for different game development domains.
| System | Tools | What It Does |
|---|---|---|
| GAS (Abilities) | 45+ | Gameplay Ability System - abilities, effects, attributes |
| AI Behavior | 38+ | Behavior Trees, EQS queries, AI Controllers |
| VFX & Niagara | 52+ | Particle systems, effects, emitters |
| Materials | 34+ | Material graphs, parameters, instances |
| Blueprints | 67+ | Node creation, pin connections, compilation |
| C++ Generation | 28+ | Actor, Component, GameMode class generation |
| UI & Widgets | 36+ | UMG widgets, HUD layouts, bindings |
| Audio | 29+ | Sound cues, attenuation, mixing |
| Level Design | 41+ | Room generation, lighting, geometry |
| Input System | 24+ | Enhanced Input mappings and contexts |
| Networking | 31+ | Replication, RPCs, net relevancy |
| Animation | 27+ | Montages, blend spaces, state machines |
| Physics | 22+ | Physics materials, constraints, collision |
| Save System | 18+ | Save games, serialization |
| Localization | 15+ | Text localization, string tables |
| Streaming | 12+ | Level streaming, world partition |
GAS (Gameplay Ability System)
Full integration with Unreal's Gameplay Ability System. Design abilities from descriptions.
Example: Create a Fireball Ability
"Create a fireball ability with 50 damage, 3 second cooldown,
costs 20 mana, spawns a projectile with explosion VFX on impact"
Generated Assets:
GA_Fireballβ Gameplay Ability BlueprintGE_Fireball_Damageβ 50 instant damage effectGE_Fireball_Costβ -20 Mana modifierGE_Fireball_Cooldownβ 3s cooldown effectBP_Fireball_Projectileβ Projectile actor
GAS Tools
| Tool | Description |
|---|---|
design_ability | Design complete ability from description |
design_effect | Create gameplay effect (damage, buff, DOT) |
design_attribute_set | Define attribute set (Health, Mana, etc.) |
create_ability_blueprint | Generate GA_ Blueprint |
create_effect_blueprint | Generate GE_ Blueprint |
add_gameplay_tag | Register gameplay tags |
AI & Behavior Trees
Generate complete AI behavior systems from descriptions.
Example: Patrol & Chase AI
"Create patrol behavior that chases player when spotted,
returns to patrol after losing sight for 5 seconds"
Generated Assets:
BT_EnemyPatrolβ Behavior TreeBB_Enemyβ Blackboard with keysBTTask_Patrolβ Custom patrol taskBTTask_ChasePlayerβ Chase behaviorBTService_CheckVisibilityβ Vision serviceEQS_PatrolPointsβ Environment query
VFX & Niagara
Create particle systems from descriptions.
Example Commands
"Blue magic explosion with lingering sparks"
"Fire trail that follows the player"
"Purple lightning arc between two points"
"Healing particles rising upward with glow"
"Shield bubble effect with hexagon pattern"
Materials
Generate material graphs with proper node connections.
Example Commands
"Glowing lava material with animated flow"
"Ice shader with subsurface scattering"
"Hologram material with scan lines and flicker"
"Worn metal with rust and scratches"
"Glass with refraction and color tint"
Blueprints
Create and modify Blueprint assets programmatically.
Example Commands
"Add double jump to my character"
"Create a door that opens when player approaches"
"Add sprint with stamina drain"
"Create a pickup that restores 25 health"
"Add a dash ability with 2 second cooldown"
C++ Generation
Generate C++ classes with proper UE macros and patterns.
Supported Class Types
AActorβ Base actorsACharacterβ Characters with movementAPawnβ Controllable pawnsAGameModeBaseβ Game modesAPlayerControllerβ Player controllersUActorComponentβ ComponentsUObjectβ Data objects
Generated Code Features
- Proper header guards and includes
- UCLASS/UPROPERTY/UFUNCTION macros
- Replication setup (if needed)
- BlueprintCallable/BlueprintReadWrite specifiers
- Event dispatchers
UI & Widgets
Create UMG widgets and HUD layouts.
Example Commands
"Create a health bar with damage flash effect"
"Create a radial menu with 8 ability slots"
"Create an inventory grid 6x4"
"Create main menu with Play, Settings, Quit"
"Create dialogue box with character portrait"
Security & Authentication
Production-grade security features built into the core.
Security Features
| Feature | Description |
|---|---|
| Rate Limiting | Per-IP, per-route, and global rate limits. Configurable windows and burst handling. |
| Authentication | API key authentication via X-API-Key header or Bearer token. |
| RBAC | Role-based access control. Roles: None, ReadOnly, Execute, Admin, System. |
| Audit Logging | All requests logged with timestamp, IP, endpoint, tool, success/fail, duration. |
| Encryption | AES-256-CBC encryption for sensitive data. PKCS7 padding. |
| Request Signing | HMAC signature verification for tamper-proof requests. |
| Timeout Protection | Tool execution timeouts prevent runaway operations. |
Rate Limit Configuration
/riftborn/chat β 20 requests
/riftborn/tool β 30 requests
/riftborn/ping β 120 requests
/riftborn/status β 60 requests
/riftborn/health β 120 requests
/riftborn/audit β 30 requests (admin only)
Troubleshooting
Common issues and how to fix them.
Bridge Won't Start
Port 8766 already in use
Another process is using the port. Check with netstat -ano | findstr 8766 and kill the process, or change the port in config.
LLM Not Responding
LLM Connection Issues
Claude: Verify your ANTHROPIC_API_KEY is set correctly. Check API status at anthropic.com.
Ollama: Ensure it's running: ollama serve. Check it's accessible at http://localhost:11434.
Tools Timing Out
Tool execution timed out after 30000 ms
Some tools take time. Increase timeout in config: ToolTimeoutMs=60000. Or the tool might be stuck β check UE Output Log.
Rate Limited
Rate limit exceeded
Wait for the window to reset (usually 60 seconds), or disable rate limiting for development: RIFTBORN_RATE_LIMIT_ENABLED=false
Check Server Status
# Check if server is running
curl http://localhost:8766/riftborn/ping
# Get detailed status
curl http://localhost:8766/riftborn/health
# Check metrics
curl http://localhost:8766/riftborn/metrics
# View recent logs
curl http://localhost:8766/riftborn/logs
Requirements
System requirements and dependencies.
| Unreal Engine | 5.5+ (5.7 recommended) |
| Operating System | Windows 10/11, macOS 12+, Linux |
| Python | 3.10 or later (for bridge scripts) |
| RAM | 16GB minimum, 32GB recommended |
| GPU VRAM | 8GB+ for local LLM inference |
| Claude API | Recommended β enables cloud brain learning |
| Ollama | Alternative β qwen2.5-coder:7b for fully local operation |
Ready to Build Games at the Speed of Thought?
Stop building everything manually. Join the waitlist and be among the first to experience AI-powered game development.
Join the Waitlist β