No need for any AI-specific tool, this is exactly what devcontainer is for! Just tell your agent to use devcontainer up (and docker compose down the other way).
The idea that a devcontainer gets built on-demand instead of checked out like 'docker pull ..." has always felt weird to me. It's so close to being awesome, but ends up being barely useful.
Or maybe I'm wrong. Is there a way to checkout an immutable devcontainer?