ai version 1.0.0 package jido_behaviortree

Jido BehaviorTree

Full-featured behavior tree engine for Jido agent decision-making

Open source on GitHub →
quickstart.exs mix deps
defp deps do
  [
    {:jido_behaviortree, "~> 1.0.0"}
  ]
end

AT A GLANCE

Complete behavior tree execution engine with tick-based traversal and stateful node execution
9 built-in node types — Sequence, Selector, Inverter, Succeeder, Failer, Repeat, Action, Wait, SetBlackboard
Direct Jido Action integration — execute any Action module as a leaf node
Blackboard pattern for decoupled inter-node communication

IMPORTANT PACKAGES

ECOSYSTEM RELATIONSHIPS

Used By
none

FULL OVERVIEW

Overview

Jido BehaviorTree is a full-featured behavior tree engine built natively for the Jido agent ecosystem. It provides a composable, tick-based execution model where complex AI decision-making logic is assembled from simple, reusable node primitives — sequences, selectors, decorators, and leaf actions. Unlike standalone behavior tree libraries, Jido BehaviorTree integrates directly with Jido Actions and the Jido Agent strategy system, allowing behavior trees to drive autonomous agent workflows with first-class state management, effect handling, and telemetry.

The package bridges the gap between traditional game-AI behavior trees and modern agentic systems. Trees can be executed standalone, managed by a GenServer-based agent for stateful multi-tick workflows, or plugged directly into a Jido Agent as an execution strategy.

Purpose

Jido BehaviorTree serves as the decision-making strategy layer for Jido agents. It provides a structured, deterministic way to compose complex agent behaviors from simple building blocks — functioning as a standalone engine, a Jido Agent Strategy, and an AI tool bridge via the Skill wrapper.

Major Components

Core Engine

Main public API for creating trees, executing ticks, starting agents, and wrapping trees as skills. Includes Tree structure management, Node behaviour with telemetry spans, Status type system, Tick execution context, and Blackboard shared data store.

Composite Nodes

Sequence (execute children in order, fail on first failure) and Selector (try children until one succeeds). Both support resumption from running children across ticks.

Decorator Nodes

Inverter (flip success/failure), Succeeder (always succeed), Failer (always fail), and Repeat (repeat N times).

Leaf Nodes

Action (execute a Jido Action with blackboard parameter resolution), Wait (time-based delay), and SetBlackboard (set key-value pairs).

Execution & Integration

GenServer-based Agent for persistent multi-tick execution, Skill wrapper for AI/LLM tool compatibility, and Jido Agent Strategy implementation for strategy-driven workflows.