Multi-layer (PDDL/BDI+HTN) functional agents