behaviortree.cpp for Mac
Behavior Trees Library in C++
behaviortree.cpp — overview
BehaviorTree.CPP 4.9
This __C++ 17__ library provides a framework to create BehaviorTrees. It was designed to be flexible, easy to use, reactive and fast.
Even if our main use-case is __robotics__, you can use this library to build __AI for games__, or to replace Finite State Machines.
There are a few features that make __BehaviorTree.CPP__ unique, when compared to other implementations: It makes __asynchronous Actions__, i.e. non-blocking, a first-class citizen. You can build __reactive__ behaviors that execute multiple Actions concurrently (orthogonality). Trees are defined using a Domain Specific __scripting language__ (based on XML), and can be loaded at run-time; in other words, even if written in C++, the morphology of the Trees is _not_ hard-coded. You can statically link your custom TreeNodes or convert them into __plugins__ and load them at run-time. It provides a type-safe and flexible mechanism to do __Dataflow__ between Nodes of the Tree. It includes a __logging/profiling__ infrastructure that allows the user to visualize, record, replay, and analyze state transitions.
Documentation Tutorials and general documentation: https://www.behaviortree.dev/ Auto-generated Doxygen: https://behaviortree.github.io/BehaviorTree.CPP/ Community support and forum: https://github.com/BehaviorTree/BehaviorTree.CPP/discussions
GUI Editor
Editing a BehaviorTree is as simple as editing an XML file in your favorite text editor.
If you are looking for a fancier graphical user interface (and I know you do) check Groot2 out.
How to compile
BT.CPP requires a compiler that supports C++17.
Three build systems are supported: colcon (ament), if you use ROS2 conan otherwise (Linux/Windows). straight cmake if you want to be personally responsible for dependencies :)
Compiling with conan: [!NOTE] Conan builds require CMake 3.23 or newer.
Assuming that you are in the root directory of BehaviorTree.CPP:
If you have dependencies such as ZeroMQ and SQlite already installed and you don't want to use conan, simply type:
BT.CPP includes its own copy of nlohmann/json. To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF. Since nlohmann::json is part of the public API, everything that links BT.CPP must then be compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install ./vcpkg install behaviortree-cpp
The behaviortree-cpp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.
Details
C 语言行为树库
How to install behaviortree.cpp
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-11-08; current version 4.11.0, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| 4.11.0 | 2026-11-08 | Stable | — | — | — | — |
| 4.9.0 | 2026-02-11 | Stable | — | — | — | — |
| 4.8.4 | 2026-01-09 | Stable | — | — | — | — |
| 4.8.3 | 2025-12-30 | Stable | — | — | — | — |
| 4.8.2 | 2025-10-30 | Stable | — | — | — | — |
| 4.8.0 | 2025-10-14 | Stable | — | — | — | — |
| 4.7.0 | 2025-04-24 | Stable | — | — | — | — |
| 4.6.2 | 2024-06-26 | Stable | — | — | — | — |
| 4.6.1 | 2024-05-20 | Stable | — | — | — | — |
| 4.6.0 | 2024-04-28 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| behaviortree.cpp | 4.11.0 | MIT | CLI | 2 |
| beast | v10.5.0 | LGPL-2.1-or-later | CLI | 2 |
| kimwitu++ | 2.3.13 | GPL-2.0-or-later | CLI | 0 |
| simgrid | 4.1 | LGPL-2.1-only | CLI | 0 |
Similar apps: Command-line Tools
beast
Bayesian Evolutionary Analysis Sampling Treeskimwitu++
kimwitu++ is a command-line tool for developers that specializes in processing tree-structured…simgrid
SimGrid is a command-line tool for distributed systems research, primarily used to simulate and…gtree
Generate directory trees and directories using Markdown or programmaticallybeagle
BEAGLE is a high-performance library that can perform the core calculations at the heart of…openssl@4
Cryptography and SSL/TLS ToolkitCategories: Command-line Tools