behavior-trees

Create and edit Unreal Engine Behavior Tree and Blackboard assets via Python services.

648|142|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/kevinpbuckley/VibeUE --skill behavior-trees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: behavior-trees
Source: https://github.com/kevinpbuckley/VibeUE/tree/main/Content/Skills/behavior-trees
Command: npx skills add https://github.com/kevinpbuckley/VibeUE --skill behavior-trees

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Authoring Behavior Trees and Blackboards in Unreal Engine normally requires manual editor work; this Skill lets an AI agent programmatically create trees, add composites, tasks, decorators, and services, bind blackboard keys, and validate or repair BT assets through BehaviorTreeService and BlackboardService.

Core Features & Use Cases

  • Blackboard authoring: Create UBlackboardData assets, add typed keys, set metadata, manage parent boards, and find key references before renames or deletions.
  • Behavior Tree construction: Add nodes by path, set struct properties and blackboard key bindings, attach decorators and services, and round-trip whole trees as JSON via get_tree/build_tree.
  • Validation and repair: Run validate_tree diagnostics, rebuild sparse editor graphs from runtime trees, and restore snapshots after failed builds.
  • Use Case: Ask the agent to build a guard AI tree — it creates BB_Guard with a TargetActor key, creates BT_Guard on that board, adds a Selector with a Sequence containing a Wait task and a Blackboard decorator, then validates the result.

Quick Start

Create a blackboard at /Game/AI/BB_Guard with an Object key named TargetActor, then build a behavior tree on it with a selector, a sequence, and a wait task, and validate the tree.

Frequently Asked Questions about behavior-trees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Behavior Tree in Unreal Engine with Python?

Create the blackboard first with BlackboardService.create_blackboard, add keys, then call BehaviorTreeService.create_behavior_tree with the board path. Add nodes with add_node using class names like BTComposite_Selector, and every mutator saves the asset automatically.

How do I bind a blackboard key to a Behavior Tree decorator?

Use set_node_blackboard_key with the decorator's node path, property name, and key name. Never use set_node_property_value for key selectors, because the service validates the key type against the selector's filter and the engine would silently clear a bad binding on save.

Why does setting WaitTime on a BT task fail?

In UE 5.8 many numeric BT properties are FValueOrBBKey structs, so pass '(DefaultValue=3.5,Key="")' instead of a plain number. Read the current value with get_node_property_value first and mirror its shape.

Can I edit a Behavior Tree while PIE is running?

No. Writes are refused while PIE runs, while an editor is open on the asset, or when the commit would damage the runtime tree. Refusal messages name the mechanism and the fix, so close the editor or stop PIE first.

How do I safely rename or remove a blackboard key?

Run find_blackboard_key_references first to list every BT selector bound to that key. Renaming returns the list of bindings that broke, so you can rebind them afterward; SelfActor on a parent-less board cannot be removed.

What are the limitations of building Behavior Trees from JSON?

build_tree replays JSON through ordinary mutators with one save per node, so it suits tens of nodes, not bulk imports. Composite decorators cannot be recreated because they are editor-only sub-graphs, and injected subtree nodes are read-only.