A pentatonic piece is built on just five different notes. A minor pentatonic scale uses the notes D, F, G, A and C (or those notes transposed to another key), and the keynote is D.
It’s really simple to compose a piece based on the minor pentatonic scale, because all the notes blend together harmoniously. It doesn’t matter which note of the minor pentatonic scale you write against another, it will always sound pleasant, with no harsh clashes or dissonances.
To make an effective pentatonic composition, use a nice combination of instruments and focus on using a variety of rhythms. Use cross rhythms (syncopation) for an interesting effect. Decide an form (structure) such as ABA to make the piece sound organised.
This video was made back in 2014, using the free music software Musescore.