LimboAI - Behavior Trees and State Machines Plugin (C++ module)

LimboAI Logo

LimboAI is an open-source C++ module for Godot 4 providing a combination of Behavior Trees and State Machines to craft your game’s AI. It comes with a behavior tree editor, built-in documentation, visual debugger, and more! While it is implemented in C++, it fully supports GDScript for creating your own tasks and states.

Behavior trees are hierarchical structures used to model and control the behavior of agents in a game (e.g., characters, enemies, entities). They are designed to make it easier to create complex and highly modular behaviors for your games. I wrote a short introduction to behavior trees, which you can read here.

Getting LimboAI :link:

Check out LimboAI GitHub page.

Behavior Tree Editor :film_strip:

Visual Debugger :film_strip:

Debugger in Action :cinema:


This looks pretty cool and useful!

1 Like

Recently, I released the version 0.5, which packs quite a number of improvements. :rocket: :star:
Here’s a link to check it out: Release v0.5 · limbonaut/limboai · GitHub

v0.5 Highlights

  • Godot 4.2 Support.
  • New Behavior Tree Tasks:
    • BTProbabilitySelector: New composite with a convenient probability editing popup.
    • Working with blackboard variables: BTSetVar, BTCheckVar, BTCheckTrigger.
    • Working with agent properties: BTCheckAgentProperty, BTSetAgentProperty.
    • Animation control: BTPlayAnimation, BTAwaitAnimation, BTPauseAnimation, BTStopAnimation.
    • BTCallMethod: Call a method on a node or object.
  • Behavior Tree Comments: Annotate behavior trees with the new BTComment task.
  • BTRepeat Improvement: Added a forever mode to the BTRepeat task.
  • Improved Task Palette:
    • New context menu options for BT tasks: “Edit Script” and “Open Documentation.”
    • Add and remove tasks from favorites.
    • Added a “Refresh” button.
    • Introduced a new category system for better organization.
    • Improved task filtering capabilities by category and type.
    • Rich documentation tooltips.
  • Keyboard Shortcuts: Added keyboard shortcuts for a variety of editor actions.
  • Action Banners: Now you’ll receive action banners for various alerts requiring user input.
  • Misc Menu: Includes shortcuts for opening the debugger and project settings, creating script templates, and displaying an introduction to Behavior Trees.
  • Task Custom Names: BT tasks with custom names are now emphasized in both the editor and debugger.
  • Unit Testing: Implemented unit tests for most tasks and nodes, with testing performed in the new GHA workflow on commits to the master branch.
  • Improved Documentation: Enhanced in-editor documentation for all classes and added an introduction to Behavior Trees.

:tada: Good news, everyone! :tada:

GDExtension support is coming to LimboAI, and it will be going v1.0 in a few weeks. To celebrate that occasion, we decided to make a pre-release version 1.0-dev1.

If you’d like to help with testing, grab a build on the GitHub: Release v1.0-dev1 · limbonaut/limboai · GitHub.

It’s also coming to Asset Library soon! :rocket:


  • GDExtension support! Check out Using GDExtension
  • GDExtension builds are available in GitHub Actions.
  • BBParam editor: Handy custom property editor for blackboard parameters.
  • Support for editing variant-type blackboard parameters (BBVariant).
  • BTCallMethod improvements:
  • Include its delta as an argument. Thanks, @Rubonnek!
  • Store result on the blackboard.
  • Allow using blackboard variables as arguments for the call.
  • Online documentation: Check out online docs here.
  • Change Type action: Switch task’s type with the “Change Type” context menu action.
  • Extract Subtree action: Save subtrees with the “Extract Subtree” context menu action (using BTSubtree decorator).
  • Adding tasks with Shift-click: In Task Palette, Shift+click to add a task after the selected and on the same level as the selected task.

Other improvements

  • Fix LimboDebugger crash when EngineDebugger is not active. Thanks, @Rubonnek!
  • In the Debugger, show resource info for the currently presented BehaviorTree.
  • Fix debugger’s “elapsed” column not always has enough space for decimals.
  • Open BehaviorTree in the BT editor when its property is clicked in the inspector.
  • Fix button focus in the Task Palette.
  • Optimize prefetching node references in the Blackboard and BTPlayer.
  • Various fixes in the class documentation.
  • Fix BTCheckVar performs erroneous equality check.
  • Improvements in the build workflows.

Have a nice day!


It looks really great!
Is it compatible with C# ? If not, is it planned?

1 Like

Good question! Recently, I fixed a number of issues related to C# in the LimboAI and I could implement simple tasks in C# using LimboAI. FYI, I tested it before I added GDExtension support. You’d need to use LimboAI’s generated C# glue for that, and it’s a bit confusing how to do it, at least for me personally, but it worked. With the GDExtension, I’m not sure how this would work, and if you can access the classes exported by GDExtension - you should be able to use LimboAI. You can also check out C# editor builds on the GitHub!

Currently, I’m not ready to use it. I mean, I’m working on totally other stuff than AI/NPC. I will follow the project, anyway. Thanks.

1 Like

LimboAI v1.0-dev2 is out now, bringing hot-fixes and improvements. Work towards the 1.0 release is in full swing! :godot::wrench:

It’s already on the GitHub and coming soon to Asset Library:

Changes since dev1

  • New and improved workaround for the missing GDVIRTUAL* macros.

    • Fixes native method override errors.

    • @warning_ignore for custom task methods is no longer needed!

  • Add new BBParam types.

  • Refactored LimboHSM and LimboState code.

  • Fix: icon entries unsorted in GDExtension manifest.

  • Editor: Show info dialog about editing project settings in GDExtension.

  • Editor: Links to “Creating custom tasks” doc page in the editor and banner improvements.

Exciting changes are coming to LimboAI! :rocket:

Freshly revised Blackboard system is already out with the version 1.0-dev3 release in the Asset Library and on the Github :

Changes in v1.0-dev3

  • Revised Blackboard system:
    • Breaking compatibility: BTPlayer’s blackboard_data is replaced with new BlackboardPlan system (see below).
      • If you have blackboard data defined in BTPlayer or LimboState nodes, you’d need to redefine it using the new system.
    • New workflow: Define variables in the BehaviorTree resource and override those variables in the BTPlayer node.
    • BlackboardPlan resource: Stores and manages a collection of variables, and is used to construct new Blackboard instances.
      • Define blackboard variables in a BehaviorTree resource, using it’s BlackboardPlan property.
      • BTPlayer also has its own BlackboardPlan which extends the behavior tree BlackboardPlan resource, i.e. variables from the BehaviorTree resource are overridden in the BTPlayer node.
    • BlackboardPlan Editor
      • Accessed with “Manage…” button in the inspector.
      • Rename, reposition, and change types and hints of the blackboard variables.
      • Specify relevant export hints for the variables.
      • Edit default variable values directly in the inspector.
    • Binding: Bind variables to object properties using blackboard.bind_var() method.
    • Blackboard variable property editor:
      • Used in the behavior tree tasks and can be used with custom tasks.
        • Note: It is shown for any property that ends with “_var” and also when using BBParam-derived parameters.
      • Handy property editor that shows an indicator if variable is included in the blackboard.
      • Clicking on the indicator takes you straight to the blackboard plan editor and auto-fills variable name if it doesn’t exist.
      • Also provides a drop-down selection of existing variables.
      • Special indicator for variables that begin with “_” (aka private variables).
    • These changes are fully compatible with both module and GDExtension builds!
  • Other changes
    • BBVariable object holds the value of a blackboard variable and its metadata (not exposed to the API).
    • GHA: Fixed issues with iOS templates build workflow
    • Refactored LimboHSM and LimboState code.
    • Fixed focus issues with BBParam property editor
1 Like

LimboAI v1.0 RC2 is out and so is the awesome demo project

Grab it here: Releases · limbonaut/limboai · GitHub


LimboAI 1.0 RC3 is out now :rocket: bringing us a step closer to the stable release with a number of small fixes and improvements.

Changelog and download: Release v1.0-rc3 · limbonaut/limboai · GitHub

1 Like

:tada: Good news, everyone! :tada:

LimboAI version 1.0 is finally here after months of intensive coding and refining! :brain::wrench:
Now with GDExtension support, a new powerful blackboard system, improved editor, awesome demo project, and much more! :partying_face: