A leaner, open-source alternative to Unity ML Agents
It wires Godot games to Python reinforcement-learning frameworks so you can train NPC behaviors without leaving the open-source ecosystem.

What it does Godot RL Agents connects Godot Engine games to Python reinforcement-learning libraries through a set of framework wrappers. You can train NPCs or automated play-testers using StableBaselines3, Sample Factory, Ray RLLib, or CleanRL, then ship the results back into a Godot runtime. The project is fully MIT-licensed and includes built-in sensors for 2D and 3D observation spaces.
The interesting bit The authors acknowledge they are following in the footsteps of a well-known proprietary engine toolkit, but their stated goal is to shed the bloat and keep the codebase compact, concise, and hackable. They also support in-editor training inside Godot 4 and offer experimental ONNX export so a trained agent can run inside the engine without dragging a Python interpreter along.
Key highlights
- Wrappers for four major RL frameworks: StableBaselines3, Sample Factory, Ray RLLib, and CleanRL
- Memory-based agents via LSTM or attention interfaces
- Built-in AI sensors for augmenting agent perception in 2D and 3D environments
- In-editor training inside the Godot 4 .NET editor without exporting a game executable
- Experimental ONNX export for deploying trained models natively in Godot
Caveats
- ONNX export is experimental and requires aligning your Godot project’s
.csprojand.slnfiles with the separate plugin source - Using the default StableBaselines3 script, the Godot environment will freeze periodically while the model updates; the authors note this is expected
- Pre-built test examples are only available for Linux and Windows
Verdict Indie developers and RL researchers looking for a royalty-free, open-source alternative to proprietary engine toolkits will find a pragmatic bridge here. Teams wanting a polished, first-party toolchain with dedicated IDE integration should expect a more hands-on, community-supported experience.
Frequently asked
- What is edbeeching/godot_rl_agents?
- It wires Godot games to Python reinforcement-learning frameworks so you can train NPC behaviors without leaving the open-source ecosystem.
- Is godot_rl_agents open source?
- Yes — edbeeching/godot_rl_agents is open source, released under the MIT license.
- What language is godot_rl_agents written in?
- edbeeching/godot_rl_agents is primarily written in Python.
- How popular is godot_rl_agents?
- edbeeching/godot_rl_agents has 1.5k stars on GitHub.
- Where can I find godot_rl_agents?
- edbeeching/godot_rl_agents is on GitHub at https://github.com/edbeeching/godot_rl_agents.