Dendron
Type: full-code · Vendor: Richard Kelley · Language: Python · License: MIT · Status: active · Status in practice: experimental · First released: 2024-04-01
Dendron is a Python library for programming LLM agents as behavior trees whose leaves are model and tool actions composed by control nodes.
Description. Dendron is a library for building software agents using behavior trees and language models. Leaf action nodes wrap LLM calls (CausalLMAction, ImageLMAction, LogLikelihoodAction) and tools, and they are composed by control nodes such as Sequence and Fallback. Every behavior tree has an associated Blackboard, a key-value store accessible by all nodes, which is the mechanism by which nodes share state since they otherwise communicate only by ticking children and returning a NodeStatus.
Agent loop shape. An agent is expressed as a behavior tree. The root is ticked, control nodes such as Sequence and Fallback tick their children in order, and leaf action nodes run an LLM call or tool and return a NodeStatus of SUCCESS, FAILURE, or RUNNING. Nodes that need to share information beyond status read and write a shared Blackboard key-value store attached to the tree.
Primary use cases
- composing LLM agents as behavior trees
- reactive control flow over model and tool actions
- reusing simple behaviors as larger agent programs
- structured programming of language model agents
Key concepts
- Action node → agentic-behavior-tree (docs) — A leaf node that performs work and returns a NodeStatus; Dendron's LLM action leaves include CausalLMAction, ImageLMAction, and LogLikelihoodAction.
- Control node → agentic-behavior-tree (docs) — An internal node (Sequence, Fallback/Selector, decorators) that orchestrates control flow by ticking its children and combining their NodeStatus results.
- Blackboard → blackboard (docs) — A key-value store attached to a tree and readable/writable by every node, the only channel for sharing state beyond the tick/NodeStatus contract.
- NodeStatus (docs) — The return value a ticked node yields — SUCCESS, FAILURE, or RUNNING — which control nodes use to decide how the tree proceeds.
Patterns this full-code implements —
- ·Agentic Behavior Tree
A Python library for programming LLM agents as behavior trees: LLM action leaves (CausalLMAction etc.) return success/failure and are composed by control nodes (sequence, fallback/selector, decorator…
- ·Blackboard
Every Dendron behavior tree has an associated Blackboard, a key-value mapping accessible by all nodes in the tree, which is how nodes share state with one another since direct node-to-node communicat…
- ★★Fallback Chain
The Fallback (Selector) control node ticks its children in order and returns on the first SUCCESS, only failing if all children fail, so a primary action falls through to alternative recovery behavio…
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.