For my world I was thinking of there being a domesticated creature that is able to swallow humans whole and keep them in a second stomach which acts as a prison. I figured it would need to be tall and presumably a herbivore or omnivore and how would intelligence work for it. Would science be able to make it smart enough to understand orders of going off and bringing them back like a retriever dog?
You could try coming up with something akin to a marsupial type species from Earth. A kangaroo for example uses its pouch to to gestate young ones and suckle them, but also uses it as a way of protect Joey's that are fully capable to now live off external food sources and move around independently.
Maybe this herbivore has a pouch with an opening controllable via muscles and would operate similar to how a mouth would operate. It would be able to hold the pouch tight shut but also occasionally release air for better circulation .
I am guessing the herbivore should work in tandem with an officer . There needs to be some way to ensure that prisoners are weapon free and are not trying to blast their way open, which would essentially kill the herbivore.
Modelling it on a kangaroo would also allow the use of hind legs for holding prisoners while they are being inserted into the pouch.
You can consider several ways aside from the stomach holding area since your prisoner can still probably move about in there and possibly cut their way open. Think along the lines of a spider trussing its victims up with sticky web and immobilizing them with some sort of venom or the web itself can act as a paralyzing agent.
The animal could be a bio-engineered animal with enhanced intelligence and prizes a certain food, say a synthetized honey/jelly concoction that it needs to survive or breed.
It would have to have an enhanced sense such as smell so they can track their prey and can be trained to sniff out and retrieve them in exchange for the food. This also gives your characters a way out in case your story requires it.
Other ways your animal can trap humans could be by sonics, stunning and rendering them unconscious. These could work with actual human hunters to capture the prey so they do not have to be very big and can be controlled by whistles or such other similar devices.