gmod-agent
by 360900
README.md
# gmod-agent
Lets an LLM play Garry's Mod (Trouble in Terrorist Town) through MCP. It sees the game window,
hears sounds with direction, listens and talks in voice chat, and moves, aims and shoots with
virtual input. A local loop handles fast reactions (walking around walls, reloading); picking
targets is always the model's call. Speech and sound recognition run locally.
## Requirements
- Linux with PipeWire and xdg-desktop-portal
- KDE Plasma 6 or any X11 session for the focus guard (`--no-focus-guard` elsewhere)
- Write access to `/dev/uinput`
- Python 3.11+, PyGObject, GStreamer with the PipeWire plugin, ffmpeg
## Install
```sh
python -m venv --system-site-packages .venv
.venv/bin/pip install -e .
```
The first start downloads about 650 MB of speech and sound models.
## Use
```sh
.venv/bin/gmod-agent --name <in-game name> # start the game first, pick its window once
.venv/bin/gmod-agent play --duo # Opus strategist + Sonnet pilot
```
`play` without `--duo` runs one model (`--model haiku`, or `--client opencode`). Interactive
use: `claude` then `/play` in this folder. The web UI at http://127.0.0.1:8765/ shows the view,
the model's intents and a pause button; `--lan` serves it to your phone.
Switching away from the game pauses all input. `gmod-agent --help` lists the options,
`gmod-agent train-sounds` trains the sound recognizer on the game's own files.
Many servers don't allow bots. Check the rules of the server you play on, and edit
`gmod_agent/knowledge/server_rules.md` for yours.
## License
GPL-3.0-or-later
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues