The MPEG-4 standard specifies a set of low-level animation parameters for body animation, but does not provide any high-level functionality for the control of avatars or embodied agents. In this paper, we discuss the required features for a script format allowing designers to easily specify complex bodily behaviors, and describe a system and its associated syntax - Body Animation Script (BAS) - which fulfills these requirements in a flexible way. The described architecture allows the organization and parametrization of predefined MPEG-4 animations and their integration with real-time algorithmic animations, such as pointing at a specific location or walking. This system has been implemented at EPFL in the framework of the EU SoNG project, in order to allow intelligent software agents to control their 3D graphical representation and end-users to trigger rich nonverbal behaviors from an online interface. It has been integrated into AML - the Avatar Markup Language.