There are different situations that pause and resume the bot.
Pause bot action
You can add a Pause bot action within a flow to pause the bot. Whenever the action is called the bot will stop responding immediately.
Using the plugin
A bot will automatically resume it's operation whenever an agent triggers a bot event using the plugin.
By default Flow will resume the bot after a number of minutes no more interactions has taken place. You can configure this within the Flow Brain settings screen.
Another event that will cause the bot to pause is when a human agent sends a reply using Front. The bot will automatically resume after the auto-resume time period has passed.
Resume on archive or delete
Whenever a conversation is archived or deleted within Front, either manually or using a rule, the bot will resume responding to a customer.
Make sure you have the webhook rule configured to watch all inboxes that are used to archive.