I started working on a behavior tree plugin quite a while ago, but finally gave up because of various issues. The biggest issue i had was dealing with game states, and the complete lack of structure in the variable stack of objects. The variable stack, specifically instance variables, are not hard coded at design time, so when you have more than 1 instance variable in an object, there is no way to reliably reference that variable at run time.
Perhaps things have changed, or perhaps i was just ignorant of how to effectively access the variables, but i finally gave up. I'm sure rexrainbow would have some useful input into this, since he's created a Finite State Machine plugin.