The Unity Machine Learning Agents Toolkit (ML-Agents) is Unity’s open-source project for training intelligent agents inside games and simulations. It has nearly 19,800 stars on GitHub and continues to be maintained, with updates in October 2026.
ML-Agents turns any Unity scene into a training environment for reinforcement learning. Game characters, robots, vehicles, or entire simulated ecosystems can serve as agents that learn from rewards using deep reinforcement learning and imitation learning. The toolkit bridges the Unity engine with PyTorch-based trainers, and ships with proven algorithms such as PPO and SAC, curriculum learning tools that gradually raise difficulty, and sample environments ranging from balancing tasks to competitive multi-agent games. It is widely used both for smarter game NPCs and as a research platform for embodied AI.
The toolkit observes the world the way an agent would: through configurable sensors, including cameras, raycasts, and numeric state, and it rewards behaviors defined by the developer. Training can run the same simulation many times in parallel, dramatically shortening experiment cycles, and trained policies export for use at runtime inside shipped games. Beyond games, the same machinery supports robotics research, where policies learned in simulation are studied for transfer to real hardware, and educational projects that make reinforcement learning tangible. Its longevity and documentation have made it a standard teaching platform for agent-based AI.
The ML-Agents toolkit itself is free and open source. It works with the Unity editor, which has its own licensing tiers for commercial game development.
ML-Agents is for game developers who want learned, adaptive NPC behavior, and for researchers who need flexible 3D environments to study reinforcement learning, robotics, and embodied intelligence.