Bogzx

Bg3 Agent Harness — AI skill for Claude Code

AI community

An AI agent plays Baldur's Gate 3 on Linux through a Lua mod and an MCP server, seeing only what a player sees.

How to install Bg3 Agent Harness

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Bogzx/bg3-agent-harness and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Bg3 Agent Harness does

An AI agent plays Baldur's Gate 3 on Linux through a Lua mod and an MCP server, seeing only what a player sees. Includes a model benchmark and a playthrough app.

Alternatives in AI

  • ARIS Agent Guide — For AI agents reading this repo 6.2k ★
  • CicaTavern — Agent 式的 SillyTavern 角色卡酒馆:高缓存命中,兼容酒馆角色卡与世界书,自带配图和一键朗读,角色形象固定,引导式创作角色卡 62 ★
  • Helix Agent — Personal AI agent harness powered by Claude Code 46 ★

README

bg3-agent-harness

An AI agent playing Baldur's Gate 3, plus the tools to run it, measure it and watch it.

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-%E2%89%A53.14-3776AB.svg?logo=python&logoColor=white)](packages/harness/pyproject.toml) [![Platform: Linux](https://img.shields.io/badge/platform-Linux-FCC624.svg?logo=linux&logoColor=black)](docs/SETUP.md) [![Status: work in progress](https://img.shields.io/badge/status-work%20in%20progress-orange.svg)](#limits)

![The playthrough app replaying a recorded session: the game on the left, the agent's tool calls on the right](docs/img/cover.jpg)

The playthrough app's Replay page on a recorded session: the `vessa` playthrough (Claude Opus 5.5, Balanced), session S004 on 2026-10-24, a fight in Act 1. On the left, the recording of the game window; on the right, the agent's tool calls and what it said, in step with the playhead.

A Lua mod inside the game reads what a player could see and carries out the agent's actions. An MCP server (the bridge) turns that into tools any MCP client can call, and a harness launches the game, starts the agent and recovers from crashes. On top of the harness sit a benchmark for comparing models and an app for watching an agent play the whole game.

The agent plays fair: it gets only what is on screen or what it remembers having seen, and it acts through the game's own UI, engine actions, and mouse and keyboard input. The mod runs through [bg3le](https://github.com/lenonk/bg3le), a Linux port of Norbyte's Script Extender, on the native Linux build of the game.

This is a research project and a work in progress. It has finished the game once. Setup needs Linux, a Steam copy of the game and some patience, and things break when the game updates.

See it play

These are screenshots the agent took for itself with its screenshot tool, at the size it saw them.

![The burning inn at Wau