Skip to content
LumineResearchPublic

About

No description, website, or topics provided.

Resources

Stars

644 stars

Watchers

9 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Lumine 2: The First Generalist Agent that Completes Full-Length AAA Games

Project Page Model Weights Dataset Technical Report

English · 简体中文

Lumine 2: real-time generalist agent completing full-length AAA games

Lumine 2 is an open-source generalist game agent that watches the screen, plays with a keyboard and mouse, and thinks adaptively when needed just like a human. It completes full-length modern AAA games in real time and plays games it never saw during training. Built on Qwen3.5-9B, it observes 720p gameplay at 5 Hz and outputs keyboard and mouse actions at 30 Hz, using SASH two-timescale memory to combine the last 24 seconds of frames with thoughts from minutes ago. Powered by our custom real-time serving engine, it runs smoothly alongside the game on a single RTX 5090 D v2 GPU.

Overview

  • First Agent to Complete Full AAA Main Storylines: Completes the entire main storylines of Cyberpunk 2077 (23.7 h, faster than the average human player) and Marvel’s Spider-Man 2 (~23 h) autonomously from start to finish. Starting from a fresh account, it completes the Mondstadt storyline of Genshin Impact in 14.3 h (Adventure Rank 19) and levels a new World of Warcraft character to Level 31 in 21 h.
  • Zero-Shot Cross-Game Generalization: Finishes the main storyline of the Cyberpunk 2077: Phantom Liberty expansion without having seen it during training. Across 35 evaluated games (including 14 unseen titles such as Honkai: Star Rail and Phantom Blade Zero), Lumine 2 sustains hours of progression.
  • Runs on a Single Consumer GPU: Runs stably in real time (5 Hz observation, 30 Hz actions within a 200 ms budget) on a single RTX 5090 D v2 (24 GB) shared with the game itself, peaking at 14.1 GB VRAM and averaging 136 ms per action turn while co-running Genshin Impact.
  • Two-Timescale Memory & Dual Modes: SASH maintains up to 24 s of recent frames and 15 reasoning episodes spanning minutes within a 128K context window. Supports both Adaptive Thinking (thinks when needed before acting) and Instant (action-only) modes.
  • Fully Open Foundation: Releases the inference engine (server/), Windows real-time evaluation client (client/), 8,788 hours of gameplay data across 134 games, and two sets of model weights, Lumine2 and Lumine2-EN.

Components & System Requirements

Lumine 2 Server

Real-time FP8 serving engine
SASH context management · OpenAI API
Linux / WSL2 / Native Windows · Python 3.13

Overview · Installation · API

Lumine 2 Client

Screen capture & OS-level input
Editable game prompts
Windows · Python 3.10+

Overview · Installation · Configuration

Component OS Python Hardware & Runtime
Server (server/) Linux x86_64 (Ubuntu 22.04/24.04 or WSL2), or Native Windows x64 (zero C++ build) 3.13 NVIDIA RTX 50-series (SM120), H100 (SM90), or RTX 40-series (SM89); Linux/WSL2 needs CUDA 13.0 / 13.3 (not needed on native Windows); ≥16 GB VRAM (24 GB+ recommended).
Client (client/) Windows 10 / 11 3.10+ Running PC game + reachable Server (localhost via native Windows or WSL2, or a remote Linux host).

Real-Time Inference Speed & VRAM (one new frame every 200 ms; routine actions must respond within 200 ms):

Deployment Tier Full-Context Step Time Speedup vs. BF16 Peak VRAM Live Gameplay Experience
Local 1× RTX 5090 D v2 (24 GB) 156 ms 4.79× 14.1 GB Game and model on one GPU, playing while inferring: 136 ms avg per step, 99.6% of actions respond within 200 ms
Remote 1× H100 (TP=1) 100 ms 5.55× 14.2 GB Game on PC, model deployed remotely: 77–100 ms per step (+~7 ms network), smooth real-time play
Remote 2× H100 (TP=2) 73 ms 7.59× 9.0 GB / GPU Game on PC, model across 2 remote GPUs: 69–73 ms per step, 100% of actions respond within 200 ms

Quick Start

On a single RTX 5090 D v2 Windows PC, the game and Client run natively on Windows while Server runs in WSL2. Install once, then start Server and launch Client with Python. For a separate Linux GPU server, no WSL2 is needed (see separate Linux server setup). You can also skip WSL2 and run Server natively on Windows (see the native Windows option; not yet fully tested across different hardware).

1. Clone and Prepare

With Git installed, open Windows PowerShell in your preferred parent directory and clone the repository:

git clone https://github.com/LumineResearch/Lumine2.git
cd Lumine2
  • GPU driver: Install an NVIDIA Windows driver with CUDA on WSL support. Do not install a Linux GPU driver inside WSL2. When running on one PC, the game and Server share VRAM; see environment and VRAM notes.
  • Model weights: Download Lumine2 or Lumine2-EN from Hugging Face and enter its directory when installing Server. Lumine2 is the model in the technical report (all reported results come from it) and usually thinks in Chinese, even in games with an English UI. Lumine2-EN uses the same recipe and data with a higher share of English: with an English system prompt and English HUD, it thinks in English. It has not been as thoroughly evaluated as Lumine2 and is recommended for English-speaking users. Both share the same Server and Client. For example, with the Hugging Face CLI (requires huggingface_hub): hf download LumineResearch/Lumine2-EN --local-dir ~/models/Lumine2-EN.
  • WSL2 (same-PC setup only): Run in Windows PowerShell as administrator (skip if Ubuntu 24.04 already runs under WSL2):
wsl --install -d Ubuntu-24.04

Restart if prompted, open Ubuntu 24.04, and set up its username and password. For custom WSL storage locations or migration, see paths and storage.

2. Install and Start Server

In the WSL2 Ubuntu terminal, navigate to the checkout’s server/ directory (on a separate Linux GPU host, run directly in its server/ directory):

# Install the environment once (you will be prompted for the local model path)
bash install.sh

# Start the server (default: Adaptive Thinking mode, port 8000)
bash start.sh --idle-reset-secs 3600

Wait until you see Uvicorn running on ...:8000 and keep this terminal open.

To reproduce the full gameplay performance reported in the technical report, set the following environment variable before starting Server. Compared with the default FP8 KV cache, BF16 KV cache can slightly improve gameplay performance, but uses more VRAM and increases inference time, typically requiring a professional-grade GPU:

KV_CACHE_DTYPE=bf16

For example: KV_CACHE_DTYPE=bf16 bash start.sh --idle-reset-secs 3600.

Notes: startup parameters, modes, and speed tuning
  • Recommended mode: start.sh defaults to Adaptive Thinking mode (--reasoning, up to 15 episodic thoughts, 120 recent frames, --force-thinking-steps 120), which is recommended for gameplay. --no-reasoning (Instant action-only mode, 135 recent frames) is intended for testing only.
  • Speed vs. capability trade-off: To further speed up inference, you can lower --force-thinking-steps or --action-window-frames to keep the active context shorter, though this will trade off long-horizon memory and gameplay capability.
  • Port & more options: To use a different port, pass --port <PORT> and update MODEL_API_URL on the client to match. See startup parameters and examples and the configuration appendix.

Optional: run Server natively on Windows (no WSL2; not yet fully tested across different hardware)

Besides WSL2, Server can also run directly on Windows (RTX 50-series and RTX 40-series GPUs). No WSL2, Visual Studio or CUDA Toolkit is required; you only need a recent NVIDIA GPU driver and Python 3.13. After optimization, the native Windows path reaches inference speed comparable to the WSL2 path, but it has not yet been fully tested across different hardware. If you run into problems, use the WSL2 setup above instead.

In Windows PowerShell, from the project's server/ directory:

# First-time environment setup
py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install torch==2.12.0 torchvision==0.27.0 --index-url https://download.pytorch.org/whl/cu130
python -m pip install -e .
python -m sash.check_install --smoke

# Start the inference server (use the Windows path of your local model directory)
$env:MODEL_PATH = "<path-to-model>"
python -m sash.server --port 8000 --idle-reset-secs 3600

The first launch compiles and caches kernels, so it takes a little longer. As with WSL2, wait until the terminal shows Uvicorn running on ...:8000, keep that terminal open, then start Client in step 3. For full details, including installation with uv, cache directories and VRAM settings, see Native Windows installation.

3. Install Client and Run a Game Test

Recommended Game & Windows Settings: For optimal performance, set the resolution to 1080p (1920×1080), Windows display scaling to 100%, and mouse settings to default pointer sensitivity with "Enhance pointer precision" disabled. Setting the in-game UI/HUD language to Chinese or English is also recommended.

Return to Windows PowerShell in the project root, enter client/, and install Client once:

cd client
powershell -ExecutionPolicy Bypass -File .\install.ps1

Once Client installation complete appears, start playing in two steps:

  1. Prepare the game’s system prompt: client/prompts/games/ includes ready-to-use Chinese and English prompts for Genshin Impact, Cyberpunk 2077, and Marvel’s Spider-Man 2. To play another game, copy an existing template to client/prompts/games/<game>_en.txt (or _cn.txt) and fill in its controls and gameplay instructions (see adding a game). We recommend matching the system prompt language to the game’s in-game language; with an English system prompt and English UI, we recommend Lumine2-EN. You can also freely customize or expand the system prompt (for example, by adding game-specific knowledge, mechanics, or strategies) to steer the agent’s behavior and improve its performance.
  2. Open the game and start Client: Launch the game (using Cyberpunk 2077 as an example), enter a playable scene, confirm Server from Step 2 is running, and run (no venv activation needed):
$env:MODEL_API_URL="http://127.0.0.1:8000/v1/chat/completions"
.\.venv\Scripts\python.exe run.py `
  --process-name "Cyberpunk2077.exe" `
  --game "cyberpunk_2077_en" `
  --instruction "Progress through the main storyline" `
  --start-delay 5 `
  --max-steps 0 `
  --execution-data-path "execution_data/cyberpunk2077_run1.jsonl"

Switch to the game window during the 5-second countdown. Press Ctrl+F12 (global hotkey) or Ctrl+C in the client terminal at any time to stop immediately.

Notes: parameters, built-in prompts, and logs
  • Core arguments: --game selects the prompt in client/prompts/games/, --instruction sets the task, and --process-name names the game executable for window focusing. --start-delay defaults to 5 seconds; --max-steps 0 runs until stopped manually (set a positive integer to stop after N steps). Use a new --execution-data-path per run to avoid appending to an earlier log.
  • Built-in game prompts: client/prompts/games/ includes ready-to-use Chinese and English prompts for Genshin Impact (genshin_impact_cn / genshin_impact_en), Cyberpunk 2077 (cyberpunk_2077_cn / cyberpunk_2077_en), and Marvel’s Spider-Man 2 (spider_man_2_cn / spider_man_2_en). Filenames ending in _en automatically pair with English mode templates. Omit --game to choose interactively, or add your own client/prompts/games/<game>.txt following adding a game.
  • Defaults & modes: Per-game instructions, process names, and release keys can be stored in client/config.json (CLI flags take priority). Client automatically adapts to Server’s Adaptive Thinking or Instant mode.
  • Stopping & logs: Stopping Client leaves Server running for your next session; press Ctrl+C in the Server terminal to release GPU memory. Execution logs are saved to client/execution_data/ as JSONL files recording each step’s input frame, reasoning thought, executed keyboard/mouse actions, and timing, making it easy to replay, inspect, and debug runs. Note that long sessions can accumulate large log files; you can safely delete them if they are no longer needed.

Optional: Windows client + separate Linux GPU server (no WSL2)

On the remote Linux GPU host, install and start Server directly from Lumine2/server/:

bash install.sh --model-path /path/to/model
bash start.sh --idle-reset-secs 3600

On Windows, install Client in client/, open your game, and point MODEL_API_URL to the server’s address and port:

$env:MODEL_API_URL="http://192.168.1.10:8000/v1/chat/completions"
.\.venv\Scripts\python.exe run.py `
  --process-name "Cyberpunk2077.exe" `
  --game "cyberpunk_2077_en" `
  --instruction "Progress through the main storyline" `
  --execution-data-path "execution_data/cyberpunk2077_run1.jsonl"

Replace 192.168.1.10:8000 with your server’s reachable address and port. See connection settings and deployment options for details.

Special Tokens & Output Format

Lumine 2 adds five special tokens to the Qwen3.5 vocabulary. Images and chat turns use Qwen3.5's own tokens (<|vision_start|>, <|image_pad|>, <|vision_end|>, <|im_start|>, <|im_end|>).

Token Role
<|thought_start|> / <|thought_end|> Wrap a thought (Adaptive Thinking mode only)
<|action_start|> / <|action_end|> Wrap the action; every step ends with exactly one action, and <|action_end|> also stops decoding
<|action_sep|> Separates the mouse field and the six key chunks

The first token of each step decides the mode: <|thought_start|> means the model reasons before acting, and <|action_start|> means it acts directly.

Acting directly (most steps; every step in Instant mode):

<|action_start|>24 -6 0<|action_sep|> W Shift<|action_sep|> W Shift<|action_sep|> W Shift<|action_sep|> W Shift<|action_sep|> W<|action_sep|> W<|action_end|>

Reasoning, then acting (when the situation changes or the plan needs updating):

<|thought_start|>The dialogue has ended and the quest marker points to the elevator on the right. Turn right, walk to the elevator panel, then press F to call it.<|thought_end|><|action_start|>180 0 0<|action_sep|> W<|action_sep|> W<|action_sep|> W<|action_sep|> W<|action_sep|> W<|action_sep|> W<|action_end|>

Both examples are illustrative outputs from Cyberpunk 2077. Lumine2 usually thinks in Chinese even in games with an English UI; for English thoughts, use Lumine2-EN. In the first example, the view turns slightly right and up while W and Shift are held for the first four chunks (133 ms, sprinting forward) and only W for the last two (67 ms, walking forward).

When each format is produced:

Server mode Acting directly Reasoning, then acting
Adaptive Thinking (default, --reasoning) Default; the model chooses <|action_start|> as its first token The model chooses <|thought_start|>; also forced by the server when no thought has occurred in the last --force-thinking-steps − 1 steps (default 119 steps, ≈ 24 s)
Instant (--no-reasoning, or a request with action_only: true) Always; the server fixes the first token to <|action_start|> Never; thought tokens are forbidden

Each reasoning step is stored as an episode in episodic memory (up to 15 by default) and fed back as context for later steps; see SASH. For the request and response API, see the API reference.

Action Space & Controls

Each action covers the next 200 ms: dx dy wheel is the relative mouse movement and scroll over the step, followed by six key chunks of 33 ms each, giving 30 Hz keyboard control. Each chunk lists the keys held, starting with a space; an empty chunk means no key is held. A key in consecutive chunks stays pressed, and a key not listed is released. Client executes the action as OS-level input on Windows.

The vocabulary has 85 keys:

Category Supported keys
Mouse movement Relative dx / dy (±10,000 per step; dx > 0 right, dy > 0 down), wheel (±120; > 0 scrolls up)
Mouse buttons LB RB MB (left / right / middle)
Letters & numbers A–Z, Zero–Nine (number keys 0–9)
Function keys F1–F12
Control keys Esc Tab Caps Shift Ctrl Alt RShift RCtrl RAlt Space Enter Backspace
Editing & navigation Insert Delete Home End PageUp PageDown Up Down Left Right PrintScreen
Symbols ; = , - . / ` [ \ ] '
  • Game key bindings: What each key does in a game comes from that game's system prompt (the controls section in client/prompts/games/). The built-in prompts assume each game's default key bindings; if you remap keys in-game, update the prompt to match. When adding a new game, list its controls using the key names above (see adding a game).
  • Operator controls: Press Ctrl+F12 (global hotkey) or Ctrl+C in the client terminal to stop. The model never needs these; if it ever presses Ctrl+F12 itself, the run stops safely.
  • Protocol details: Key names are case-insensitive and are defined in action_protocol.py; an invalid action is never partially executed: that step sends no input, and repeated invalid actions trigger a model context reset.

Documentation

Guide Contents
01 · Server installation Environment, weights, startup, VRAM and verification
02 · Client installation Connection, gameplay, stopping and logs
03 · Server configuration Inference parameters, SASH windows and backends
04 · Client configuration Tasks, keys, modes and adding new game prompts
05 · Architecture & implementation SASH diagrams, cache reuse and the inference engine
06 · API reference Request formats, response examples and custom client integration
Directory structure
Lumine2/
├── README.md / README.zh-CN.md
├── LICENSE
├── docs/                         Logo · Teaser (teaser.jpg)
├── server/                       GPU inference server (SASH)
│   ├── docs/                     Installation · Configuration · Architecture · API
│   ├── sash/                     Serving implementation & custom kernels
│   ├── tests/                    Unit, kernel and server regression tests
│   ├── install.sh
│   ├── start.sh
│   └── LICENSE                   Apache 2.0
└── client/                       Windows game client
    ├── docs/                     Installation · Configuration
    ├── lumine2_client/           Capture, focus, input and evaluation loop
    ├── prompts/                  Game prompts (games/) & mode templates (modes/)
    ├── tests/                    Package and installer tests
    ├── config.json               Task and game settings
    ├── install.ps1
    └── run.py                    Python command-line entry

Safety & Responsible Use

Warning

Host Machine Safety: Because Lumine 2 controls games through OS-level keyboard and mouse events rather than a game-specific API, its actions are not strictly confined to the game window. Unexpected clicks, key combinations, or interactions with system dialogs could affect other applications or OS files. We recommend running Client only in an isolated or dedicated environment (such as a VM or dedicated test machine with no personal or sensitive data), under a restricted user account, and under continuous human supervision ready to interrupt execution via Ctrl+F12 or Ctrl+C.

  • Fair Play & Responsible Use: Lumine 2 is intended for research, single-player experimentation, automated game testing, and interactive assistance. Do not use it for cheating, gaining unfair competitive advantage in online multiplayer games, or deploying automation that violates a game’s terms of service.
  • Network Exposure: Server has no authentication, and start.sh listens on 0.0.0.0 by default, so anyone who can reach its port can send requests. Run it only on a trusted network. For a remote Linux server, prefer SERVER_HOST=127.0.0.1 bash start.sh ... plus an SSH tunnel (ssh -L 8000:127.0.0.1:8000 <user>@<server>), keeping the client's MODEL_API_URL at http://127.0.0.1:8000/v1/chat/completions; otherwise restrict the port with a firewall.

License

  • Code & Model Weights: Original Lumine 2 code, documentation, and model weights are licensed under the Apache License 2.0.
  • Dataset & Annotations: Original dataset materials and annotations in Lumine2-data are licensed under CC BY 4.0.
  • Third-Party Rights: These licenses apply only to materials created by the Lumine 2 authors. Commercial video games depicted in gameplay recordings and third-party dependencies remain the intellectual property of their respective owners.

Looking for our previous work? See Lumine 1 (Project Page · Technical Report).

FAQ

The model performs well in the open world but struggles to click buttons in GUI screens, especially when the mouse moves very quickly. What should I check?

First, make sure your runtime settings are correct:

  1. Resolution: 1080p (1920×1080).
  2. Windows display scaling: 100%.
  3. Use the default mouse sensitivity in both Windows and the game. If you have changed either setting, restore it to its default.
  4. Disable Windows “Enhance pointer precision.” On Windows 11, open Settings → Bluetooth & devices → Mouse and set Enhance pointer precision to Off.

Important

The last step is especially easy to overlook—make sure this setting is Off! Restoring the default mouse sensitivity in Windows and the game does not replace disabling this option separately. It adjusts pointer displacement based on mouse movement speed, which can cause the model to overshoot GUI targets and struggle to click buttons accurately.

About

No description, website, or topics provided.

Resources

Stars

644 stars

Watchers

9 watching

Forks

Releases

Packages

Contributors

Languages