This work focuses on an emerging extension to traditional agent models, called Hierarchical Mobile Agents model, where an agent can contain other agents recursively. The model enables agents to dynamically build a partnership to integrate their services, migrate around and work cooperatively for a long term as an agent compound. This work describes our approach to facilitate development of agents in the model. Our work introduces advanced cooperative behaviors in the model and agreement mechanism for the behaviors. For example, an agent can encapsulate services of agents it contains with an agreement to inhibit direct service provisioning to the outside. Our proposed MAFEH framework enables developers to incorporate simple parameter settings into workflow-based agent control logic, to specify how the agent discovers partner agents, builds agreements with them, and to work cooperatively. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Features...