A production-ready prototype for an AI Companion System in Unreal Engine. This project uses a local LLM (Ollama) to convert natural language commands (e.g., "attack that enemy") into structured JSON commands that Unreal Engine can execute.
👉 READ THIS FIRST: QUICKSTART_GUIDE.md (Contains the Start, Stop, and Restart instructions you need every day).
Everything you need to set up Unreal Engine and test the API is in the docs/ folder:
- 📘 Blueprint Integration Tutorial – Step-by-step guide to connecting UE5 Blueprints.
- 🗺️ UE Integration Map – Mapping API actions (
"attack") to UE Enums. - 🏗️ Architecture Guide – How the system works under the hood.
- Python 3.11+
- Ollama (Download)
- Ngrok (For remote access/firewall bypass)
pip install -r requirements.txtSee QUICKSTART_GUIDE.md for the 3-terminal setup.
We have included a Postman Collection to make testing easy.
- Go to
postman/folder. - Import
companion_api_collection.jsoninto Postman. - Use
Send Commandto test the API.
Cause: Firewall or Ngrok Browser Warning. Fix: You MUST add this header to your Unreal Engine Request:
User-Agent:MyCustomApp/1.0
Cause: Ngrok URL changes every time you restart it. Fix: Copy the new URL from the ngrok terminal and paste it into your Blueprint.
| Command Category | Examples |
|---|---|
| Movement | "follow me", "move to the door", "hold position", "take cover", "retreat", "regroup" |
| Combat | "attack that enemy", "suppress the window", "clear this room", "defend here", "overwatch this area" |
| Interaction | "pick up the ammo", "use the switch", "throw a grenade", "use medkit on me" |
| General | "stop", "cancel", "wait here" |
UE_testing/
├── app/ # Core Application Logic
│ ├── intent_compiler.py # AI Logic (Text -> JSON)
│ ├── mock_unreal.py # Fake UE for testing
│ └── ...
├── docs/ # Documentation & Tutorials
├── postman/ # API Collections
├── tests/ # Test Suite
├── tools/ # Utilities (ngrok)
├── server.py # Flask API Server (Entry Point)
├── run.py # CLI Runner (Entry Point)
├── QUICKSTART_GUIDE.md # Daily Instructions
└── README.md # This file