And what about other nations' national interests? Doing your own interest is not renowned as a particularly ethical activity per se, you know. Before assuming that the evil done by an intelligence agency has to do with its failure to work in its nation's interest, you should ask yourself whether your own interests are legitimate and above other people's interests.
I too do dream of S.H.I.E.L.D.
Of course you can. The problem I assume you're encountering is that you're not starting from irreducible basic premises. Thus, you can't logically resolve the already-existing and conflicting inconsistencies.
We are bombarded from birth with very illogical and inconsistent rules about how the world works. All of those things implicitly include "ethical" value systems. They're very hard to reconcile logically after the fact, simply because they're contradictory in nature and we have at that point heavily-invested into building mental models to navigate the world.
Such an AI system can break free from our control (it will end up manipulating us in the physical space), it should become wiser than humanity as a collective (because it will evolve much faster then us). And in this case, we'd end up having such "an intelligence group that only did good".
The problem lies in how we manage to bridge the period between now and "then", because it will be a highly volatile situation, with a very high probability for our extinction.
And that would lead to the conclusion that AI will only dominate us during certain periods of time, will mainly remain of commercial nature, used as a tool to create/monopolize power further.