LLM Sandbox For Unreal Engine
Project description
Unreal LLM Sandbox
A plugin for Unreal Engine that provides a Flask server for LLM-powered code execution directly in the editor.
Features
- Code Execution - All Code is executed directly in Unreal Engine
- LLM Execution - Ask an LLM for help, with your code/errros in context
- Agentic Tool Use - LLM can use tools directly in Unreal Engine
- User Tools - Build and register custom agentic tools
Installation
git clone https://github.com/NeuralVFX/unreal-llm-sandbox
cd unreal-llm-sandbox
pip install -e .
or
pip install unreal-llm-sandbox
Unreal Server
Follow instructions at unreal-llm-sandbox-unreal to install Unreal side
Usage
Starting the Server ( Unreal )
From the menu bar:
LLM Sandbox -> Start Server
- The server runs at
http://127.0.0.1:8765
Starting the Web Interface
- Start
unreal-llm-sandboxfrom command line ( outside of Unreal ) - Open
http://localhost:5001/notebook/notebook.ipynb( or anyipynbname ) - If the notebook doesn’t exist, a blank one is created
- Notebooks auto-save every 2 seconds
- Standard
.ipynbformat, compatible with Jupyter
The web app provides: - Notebook Interface - Jupyter-style
interface - Code Cells - Write and executing Python code in Unreal -
Markdown Cells - Write notes in Markdown - LLM Prompt Cells - Chat
with LLMs that have full context of your notebook + agentic control of
Unreal - Agent Cells - Agentic code generation with automatic unit
testing and iteration
Registering Custom Agent Tools
Create a new python file in your project’s Content/Python/tools
directory:
@register_tool
def spawn_cube(location_x: float, location_y: float, location_z: float):
"""Spawn a cube at the specified world location.
Args:
location_x: X coordinate
location_y: Y coordinate
location_z: Z coordinate
Returns:
Name of the spawned actor
"""
import unreal
# Your Unreal Python code here
...
Tools are automatically discovered by LLM, and may be used via a
Prompt Cell
Requirements
- Unreal Engine 5.6
- Python 3.11+ (bundled with UE)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unreal_llm_sandbox-0.0.1.tar.gz.
File metadata
- Download URL: unreal_llm_sandbox-0.0.1.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80a42fd18d71e748555e8cd9365ec0224fb55bc00e95377558765a722d11684b
|
|
| MD5 |
816ee2997a2403132eb96b3be1ebd914
|
|
| BLAKE2b-256 |
0efca76ab580a01e3a19f7f85ef3496998dd7aaa101c4fa21a3ea07daf0da8b5
|
File details
Details for the file unreal_llm_sandbox-0.0.1-py3-none-any.whl.
File metadata
- Download URL: unreal_llm_sandbox-0.0.1-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fef25facf54419cffaf005fd51cf25ab49b3a8c120d57ce1adabbddb3bd08bde
|
|
| MD5 |
1022441cfa19fad67765528dc331ec09
|
|
| BLAKE2b-256 |
e5ffce8dadba56c148c4bebe06c8c821a67f346b7021b6af791857a74e0b6ed6
|