Аннотация:Modern technologies allow the creation of nanosatellites for the study of gamma-ray bursts from space (GRB, SGR, Solar flares) and from the atmosphere (TGF). For such observations, we present an advanced gamma detector adapted to the CubeSat format combining small mass and power with a sufficient sensitivearea and a high efficiency. Its time resolution is enough to determine the directionto the source by triangulation when a set of the detectors is installed on several satellites, distant from each other for several hundred kilometers. This instrument should consist from a set of scintillating crystals of Cе:GAGG typewith total sensitive area ~100 cm2 viewed by SiPM light sensors. Ce:GAGG crystals have quite high light output (~57000 phot/МeV) and density(~6.7g/cm3) with sufficiently small decay time of ~80 ns, that ensures a high throughput of the unit. The fast crystals help to realize the high accuracy of the time measurements. The use of a multi-pixel detector allows you to expand thedynamic range, which is especially important when registering TGF. Additional layer of plastic scintillator makes it possible to detect gamma-ray bursts among the electron precipitation, which is especially important when conducting an experiment in polar orbit.