An assembly for an extendable and retractable boom of an agricultural machine, comprising - a first boom section having a first frame structure comprising a plurality of frame elements; - a second boom section connected to the first boom section by an articulating joint configured to allow 180 degrees rotational movement between the first and second boom sections (20, 21), thereby, relocating the first and second boom sections (20, 21) between an extended boom section arrangement and a retracted boom section arrangement; - an arrangement of hinged elements connected to both the first and the second boom sections (20, 21); and - an actuator mechanism, the actuator mechanism comprising an actuator received inside the first frame structure of the first boom section and functionally connected to the arrangement of hinged elements, wherein the actuator mechanism and the arrangement of hinged elements are configured to produce the 180 degrees rotational movement between the first and second boom sections (20, 21), and the actuator is configured to drive the 180 degrees rotational movement; the assembly for an extendable and retractable boom being characterized in that the arrangement of hinged elements comprises - a plurality of link arms (29a, 29b) provided in a link arm arrangement, wherein a distal end of the link arm arrangement being distal to the actuator is connected to the second boom section and a proximal end of the link arm arrangement being proximal to the actuator is connected to the actuator; - a first lever element, wherein the first lever element is pivotally connected on opposite sides to the actuator and a first mounting point, respectively, the first mounting point being located inside the first frame structure of the first boom section; and - a second lever element, wherein the second lever element is pivotally connected on opposite sides to an articulating joint of the link arm arrangement and a second mounting point, respectively, the second mounting point located inside the first frame structure of the first boom section. - a first boom section having a first frame structure comprising a plurality of frame elements; - a second boom section connected to the first boom section by an articulating joint configured to allow 180 degrees rotational movement between the first and second boom sections (20, 21), thereby, relocating the first and second boom sections (20, 21) between an extended boom section arrangement and a retracted boom section arrangement; - an arrangement of hinged elements connected to both the first and the second boom sections (20, 21); and - an actuator mechanism, the actuator mechanism comprising an actuator received inside the first frame structure of the first boom section and functionally connected to the arrangement of hinged elements, wherein the actuator mechanism and the arrangement of hinged elements are configured to produce the 180 degrees rotational movement between the first and second boom sections (20, 21), and the actuator is configured to drive the 180 degrees rotational movement; - a plurality of link arms (29a, 29b) provided in a link arm arrangement, wherein a distal end of the link arm arrangement being distal to the actuator is connected to the second boom section and a proximal end of the link arm arrangement being proximal to the actuator is connected to the actuator; - a first lever element, wherein the first lever element is pivotally connected on opposite sides to the actuator and a first mounting point, respectively, the first mounting point being located inside the first frame structure of the first boom section; and - a second lever element, wherein the second lever element is pivotally connected on opposite sides to an articulating joint of the link arm arrangement and a second mounting point, respectively, the second mounting point located inside the first frame structure of the first boom section.