The present invention is concerned with a system for spatially and temporally programmable delivery of an active agent. When administered orally, the System can be retained in the gastric region for a prolonged period of time. It comprises of a core (I), one or more layers (II, IV, V) coated over the core and a preformed hollow space (III). The invention also concerns with a process for preparation of the System and a method for treating/preventing diseases, by administering to a subject in need thereof, the System of the invention.