Unity ML-Agents

Unity's free, open-source toolkit for training game agents with reinforcement and imitation learning, including bots that test your builds.

free tierUnity (Windows, macOS, Linux)

Overview

ML-Agents is Unity's open-source toolkit for training game agents. You turn a Unity scene into a learning environment and define agents with observations, actions and rewards. Then you train them with reinforcement learning or imitation learning, using PyTorch in a companion Python package. Trained behavior runs back inside the scene. Unity lists automated testing of game builds as a use, alongside NPC behavior and design checks. The package ships with 17+ example environments. Agents can learn from your own recorded play, and trained models run inside builds through Unity's inference engine. Where it falls down: it's free, but you build the bots yourself. You write the agent code, set up Python and tune training. We haven't trained an agent for this page; it uses the GitHub README and Unity's docs.

Best for

A Unity developer comfortable with Python who wants free bots that replay levels and catch broken paths.

Skip it if

Skip it if you want bots that work out of the box; ML-Agents is free, but you build the bots yourself.

Pricing

Free and open source (Apache 2.0). Needs Unity; Unity Personal is free for individuals and small organizations under $200K revenue. Checked Oct 14, 2026 on the official pricing page.

Pros

  • Costs nothing. The toolkit is open source, and Unity Personal is free for small teams.
  • Learns from you. Imitation learning trains agents from your recorded demonstrations.
  • Python access. Gym and PettingZoo wrappers let you plug in other training code.
  • Maintained. Release 23 (Sep 2, 2025), and the repo was updated this week.

Cons

  • You build the bots. There's no ready-made tester; you code the agents and rewards.
  • Setup is technical. It needs Unity 6, Python 3.10.12 in Conda, and matching package versions.
  • Unity only. It doesn't work with Unreal, Godot or other engines.
  • Training takes time. Agents must learn before they can test, and results depend on your reward design.

How it compares

nunu.ai runs ready-made AI agents that play your game on real devices from a plain-language test. It has a free Starter plan with 2,000 one-time credits. ML-Agents is free forever, but you write and train the agents. nunu.ai works across engines and platforms. ML-Agents only works in Unity. ML-Agents also needs you to write the pass and fail checks yourself. Pick nunu.ai to start testing this week. Pick ML-Agents if you have the skills and want no ongoing cost.

Quick start

  1. Install Unity 6000.0 or later through Unity Hub.
  2. Create a Conda environment with Python 3.10.12.
  3. In Unity, add the ML-Agents package from the Package Manager.
  4. Install the matching Python package: pip install mlagents==1.1.0.
  5. Open an example environment, then train it from the terminal.
  6. Add an agent to your own scene and reward it for reaching test goals.

Verdict

Pick ML-Agents if you work in Unity, know some Python and want free automated playtesting. Skip it if you want bots that work today without code. It's free, but you build the bots yourself, which is why nunu.ai stays our Best pick.

Where Unity ML-Agents shows up

Alternatives

Runner-upnunu.ainunu.ai

AI agents that play and test your game on real PCs, iOS and Android devices.

Checked Oct 14, 2026
Runner-upGameDrivergamedriver.io

Runs game QA automation as a managed service: its engineers write the tests, AI keeps them current, and they run on real hardware every build.

Checked Oct 14, 2026
Twice a week · Mon & Thu

Two short emails a week. The best new AI tools, and which one to use.

Free. No spam, unsubscribe anytime.