Can you heal a summoned creature?

In D&D 5e, when a creature is summoned through the bag of tricks or other magical means, can you heal these allies? Or are they meant to not be healed but just used until their expiry?