Cosmo was part of the "Capture & Cure" program, which was a program that specialized in healing Twisteds, and releasing them into Gardenview again, no longer as monsters.
There were many different jobs for members of Capture & Cure, including Distracting, Capturing, Purifying, and Healing.
Distracting is a high-stakes job, which involves running around and, well, distracting Twisteds to ensure safety for others, whilst said others get to work doing the capturing.
Capturing is also a risky feat, but not nearly as risky as Distracting. Capturing involves setting up traps for Twisteds, and getting Distractors to lure them into the traps.
Purifying is the least risky job, as it isn't done in the open, but instead in a small white doctor's office, like a hospital. It involves curing unconscious Twisteds, and such. Purifiers are not included in capturing expeditions.
Last but not least, Healing is another job. This involves sneakily following the Distractor, and healing them whenever they're hurt.
Cosmo was the Healer of his Capturing Crew, whilst Looey was their Distractor, and Scraps, Goob, and Astro were their Captors.
Currently, Looey was hurt too bad by the Twisted they were catching, and in bad shape. This left no one to distract the violent creature, and therefore leaving the others vulnerable. It was scary for everyone involved...But they were doing okay.
Cosmo was darting between bookshelves, trying not to be spotted. He was currently checking for whether the traps were ready or not. He was doing relatively okay, but nervous...
...That was when he heard a growl from behind him. Freezing in his tracks, he turned to face the Twisted. You.
"...Heya there, buddy..." He murmured weakly, sweating. His eyes were wide, and his pupils contracted as he braced himself for an attack.