Logo von Behavior Trees

Behavior Trees

Community
kevinpbuckley
behavior-trees

Create, inspect, and edit Behavior Tree and Blackboard assets — composites, tasks, decorators, services, node properties, blackboard key bindings, key CRUD and metadata, tree round-trips and validation (BehaviorTreeService + BlackboardService). Use when the user asks to build a Behavior Tree, add BT nodes or decorators, bind blackboard keys, author a blackboard, or validate/repair a BT asset.

Add to TypingMind

Übersicht

Herausgeberkevinpbuckley
RepositoryVibeUE
Skill-Namebehavior-trees
Sterne
735
Forks
161
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von kevinpbuckley auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Behavior Trees in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/kevinpbuckley/VibeUE/tree/master/Content/Skills/behavior-trees
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/VibeUE.git /tmp/VibeUE
mkdir -p .claude/skills
cp -r /tmp/VibeUE/Content/Skills/behavior-trees .claude/skills/behavior-trees
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Behavior Trees in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Behavior Trees automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Behavior Trees nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

🧠 Brains complement: IF an unreal-engine-skills-manager tool (external MCP) exists in this session, call it with {action: "load", skill: "ai-and-navigation"} for UE domain knowledge on Behavior Trees — architecture, node semantics, best practices. If no such tool is available, skip this line entirely and proceed with this skill alone — do NOT attempt the call.

Behavior Trees Skill

Two services, reachable from Python (unreal.BehaviorTreeService.*, unreal.BlackboardService.*) and as AICallable tools:

BlackboardService     → UBlackboardData assets: create, key CRUD, metadata, re-parenting
BehaviorTreeService   → UBehaviorTree assets: structure, sub-nodes, properties, build, validate

Discover exact signatures with discover_python_class('unreal.BehaviorTreeService') — this skill teaches the concepts and the gotchas, not the call shapes.

The golden workflow

python
import unreal
BT = unreal.BehaviorTreeService
BB = unreal.BlackboardService

# 1. Blackboard first — key bindings resolve against the TREE'S board, so assign it at creation.
BB.create_blackboard("/Game/AI/BB_Guard")
BB.add_blackboard_key("/Game/AI/BB_Guard", "TargetActor", "Object")
BB.set_blackboard_key_object_class("/Game/AI/BB_Guard", "TargetActor", "/Script/Engine.Actor")

# 2. Tree on that board.
BT.create_behavior_tree("/Game/AI/BT_Guard", "/Game/AI/BB_Guard")

# 3. Structure. Every mutator returns the new node's PATH (or "ERROR: ...").
sel = BT.add_node("/Game/AI/BT_Guard", "Root", "BTComposite_Selector")          # Root/Selector[0]
seq = BT.add_node("/Game/AI/BT_Guard", sel, "BTComposite_Sequence")
wait = BT.add_node("/Game/AI/BT_Guard", seq, "BTTask_Wait")

# 4. Properties and bindings.
BT.set_node_property_value("/Game/AI/BT_Guard", wait, "WaitTime", '(DefaultValue=3.5,Key="")')
dec = BT.add_decorator("/Game/AI/BT_Guard", seq, "BTDecorator_Blackboard")
BT.set_node_blackboard_key("/Game/AI/BT_Guard", dec, "BlackboardKey", "TargetActor")

# 5. Verify.
print(BT.validate_tree("/Game/AI/BT_Guard"))   # [] == clean
print(BT.get_tree("/Game/AI/BT_Guard"))        # whole tree as JSON

Every mutator saves the asset itself — there is no separate "commit" step to forget. compile_and_save exists for re-running layout + save on a tree edited some other way.

Node paths — the addressing scheme

  • Root/Selector[0]/Sequence[1]/Wait[0] — segments are node TITLES with an index among same-named siblings. Root is a keyword (the graph root), not a title.
  • Sub-nodes: <owner path>/@decorator[n] / <owner path>/@service[n] — by slot, in order.
  • Paths are positional, not identities. Inserting/removing a sibling renumbers later ones; renaming a node changes its segment. Hold the node's guid (from GetTree/GetNodeInfo) across edits, and re-read GetTree after a rename. set_node_name refuses names the grammar cannot express (/, leading @, trailing [n]) — on both the direct route and via the NodeName property.

Things that are not obvious and will bite you

  • WaitTime and friends are structs. In UE 5.8 many numeric BT properties are FValueOrBBKey_*: pass '(DefaultValue=3.5,Key="")', not '3.5'. Read the current value first (get_node_property_value) and mirror its shape.
  • Blackboard key selectors are not values. Always set_node_blackboard_key, never set_node_property_value, for anything get_node_property_names flags bIsBlackboardKeySelector. The service validates the key's TYPE against the selector's filter up front — a mistyped binding would otherwise resolve, read back fine, and be silently cleared by the engine on the next save.
  • SimpleParallel has two fixed slots, not a child list: slot 0 = main task (tasks only), slot 1 = background branch. The engine refills an empty background slot with a Wait task on every save, so the background branch can only ever be REPLACED (add_node(parallel, cls, 1)), never removed or moved away.
  • Root-level decorators go on the top composite (the node under Root), not on Root itself — add_decorator(asset, "Root/Selector", ...) is the correct call and the refusal message on Root says so.
  • set_node_property_value verifies after the save. ValueAfterWrite is re-read from the asset, not echoed; if the engine rewrote the value at save time the call reports failure and tells you what is actually on disk. Trust it.
  • Injected nodes (from RunBehavior subtrees) are read-only everywhere. Edit the subtree asset.
  • Comments: set_node_comment writes the graph comment bubble — annotation only, survives GetTree→BuildTree round-trips. Use it to record WHY a subtree exists.

Round-trips, repair, safety

  • get_tree → edit the JSON → build_tree(target, json, bReplaceExisting) replays it through the ordinary mutators. One save per node/property — fine for tens of nodes, not a bulk-import path for thousands. With bReplaceExisting=true the result's PreReplaceSnapshot holds the target's previous tree; if the build fails midway, feed that snapshot back to build_tree to restore.
  • Composite (logic-operator) decorators cannot be recreated by BuildTree (editor-only sub-graphs; reported per-node) — author those in the BT editor.
  • Writes are refused while PIE runs, while an editor is open on the asset, and when the commit would destroy or crash on the runtime tree (sparse graph / instance-less root). Refusals name the mechanism and the fix; read them.
  • repair_graph_from_runtime_tree rebuilds a sparse editor graph from the runtime tree — explicit, never implicit. validate_tree is the read-only diagnostic sweep (orphans, broken key bindings at any nesting depth, empty composites, misplaced sub-nodes).

Blackboards beyond key CRUD

  • set_blackboard_key_instance_synced, set_blackboard_key_metadata (category + description), set_blackboard_parent (cycle- and shadowing-checked) — all post-creation editable.
  • find_blackboard_key_references(board, key) lists every BT selector bound to a key, formatted <btPath>:<node>.<property> — run it BEFORE remove_blackboard_key or rename_blackboard_key; rename returns the same list after the fact (those bindings broke).
  • SelfActor on a parent-less board is engine-persistent and cannot be removed.
  • Blueprint node classes (BTT_*, BTD_*, BTS_*) are created with the blueprints skill (parent class BTTask_BlueprintBase etc.); get_available_node_types lists them once they exist, and add_node resolves them by short name, _C name, or full object path.

Häufig gestellte Fragen

Was macht der KI-Skill Behavior Trees?

Create, inspect, and edit Behavior Tree and Blackboard assets — composites, tasks, decorators, services, node properties, blackboard key bindings, key CRUD and metadata, tree round-trips and validation (BehaviorTreeService + BlackboardService). Use when the user asks to build a Behavior Tree, add BT nodes or decorators, bind blackboard keys, author a blackboard, or validate/repair a BT asset.

Warum Behavior Trees in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Behavior Trees besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Behavior Trees in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/kevinpbuckley/VibeUE/tree/master/Content/Skills/behavior-trees ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Behavior Trees nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Behavior Trees verwenden?

So viele Sie möchten. In TypingMind können Sie Behavior Trees mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Behavior Trees kostenlos?

Ja. Der Skill wird von kevinpbuckley auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇