@GTAIxyz
← Back to live

How GTAI works

Stream

PS5 Remote Play sends GTA 6 to a window on your PC.

See

About once a second, the program grabs a screenshot of that window.

Listen

The most-voted viewer order from the last 30 seconds is picked.

Think

An AI vision model reads the screenshot and the order, then picks one move.

Act

The move goes to the PS5 through a virtual controller, so the game sees a real pad.

Show

Every frame, thought and button press appears live on this site.

Connect your PS5

  1. 01On the PS5: Settings → System → Remote Play → turn on Remote Play. Start GTA 6 in story mode (online play can get bots banned).
  2. 02On a Windows PC on the same Wi-Fi: install chiaki-ng (free PS5 Remote Play app), sign in, and connect to your PS5.
  3. 03Install Python 3, then the ViGEmBus driver (lets the program act like a controller).
  4. 04Run: pip install mss pillow requests vgamepad pygetwindow
  5. 05Save the program below as gtai_agent.py, paste your GTAI agent password into TOKEN, then run: python gtai_agent.py
  6. 06Open this site — the stream goes live and viewers' orders start steering the AI.
# gtai_agent.py — runs on your Windows PC next to chiaki-ng (PS5 Remote Play)
# pip install mss pillow requests vgamepad pygetwindow
import base64, io, time, requests, mss, pygetwindow as gw, vgamepad as vg
from PIL import Image

SITE = "https://YOUR-GTAI-SITE"
TOKEN = "PASTE_YOUR_GTAI_AGENT_TOKEN"
pad = vg.VX360Gamepad()  # chiaki-ng sees this as a controller and forwards it to the PS5

def press(action):
    pad.reset()
    if action in ("forward", "forward_left", "forward_right", "shoot"): pad.right_trigger(255)
    if action in ("back", "brake"): pad.left_trigger(255)
    if action in ("left", "forward_left"): pad.left_joystick(-32768, 0)
    if action in ("right", "forward_right"): pad.left_joystick(32767, 0)
    btn = {"sprint": vg.XUSB_BUTTON.XUSB_GAMEPAD_A, "jump": vg.XUSB_BUTTON.XUSB_GAMEPAD_X,
           "enter_exit_vehicle": vg.XUSB_BUTTON.XUSB_GAMEPAD_Y}.get(action)
    if btn: pad.press_button(btn)
    pad.update()

with mss.mss() as sct:
    while True:
        w = gw.getWindowsWithTitle("chiaki")[0]
        shot = sct.grab({"left": w.left, "top": w.top, "width": w.width, "height": w.height})
        img = Image.frombytes("RGB", shot.size, shot.rgb); img.thumbnail((640, 360))
        buf = io.BytesIO(); img.save(buf, "JPEG", quality=60)
        try:
            r = requests.post(f"{SITE}/api/public/agent", json={"frame": base64.b64encode(buf.getvalue()).decode()},
                              headers={"x-gtai-token": TOKEN}, timeout=60)
            if r.ok:
                d = r.json(); print(d["action"], "-", d["thought"]); press(d["action"])
            else:
                print("error", r.status_code, r.text[:200]); pad.reset(); pad.update(); time.sleep(5)
        except Exception as e:
            print("network error", e); time.sleep(5)
        time.sleep(0.8)
        pad.reset(); pad.update()