Vyraexii: it sounds like you didnt have much/any guards
SVGuss: I have no clue how to deal with them in any other way...
Have a Happy New Year!
Although it's not as much fun as murder, the best way to deal with enemy agents is to capture them, then keep torturing them until they've not only lost all heat (the red bars) but regained their blue bar, then release them.
All agents (and tourists too - works for them too!) have a limited time on your island, after which they leave. So the idea is to ensure that they spend most of that time not finding anything (e.g. via lots of low-zero heat stuff near the front of your base - let them investigate freely in there if you want!), and the rest of the time being tortured to forget about the few times they did discover something dodgy.
If agents (and tourists) leave with no heat, then you don't gain heat on the world map. If they leave with a blue bar instead, you'll actually LOSE heat on the world map.
Just make sure no one leaves with a red bar, because heat then goes up.
BUT - killing them isn't the best. Sure, technically they won't come back with heat (because they're dead), but those deaths ARE noticed. The thing with killing enemies in this game is that while it looks like you're controlling heat, there's actually a separate (and hidden!) value that keeps track of "violence" (or something like that). What this does is reduce the threshold that that triggers their "high threat" response - i.e. when they feel threatened.
Normally, agents (except soldiers of course) won't actually attack things unless they get attacked; however, if you keep killing a region's agents, eventually even their lowly investigators will be REALLY sketchy as soon as they land on your island - to the point where they will attack harmless, inanimate objects, such as your storage lockers!
At that point, there's no choice but to ensure you're on some kind of alert all the time, since all agents from that region will be excessively trigger happy.
IMO the best way to "control" the situation, is to use traps. It's possible to set things up such that enemies are automatically rendered either unconscious or stupid so that they never get anywhere juicy - most of the time. They can still sneak past traps when your guys go through, so to minimise that I tend to have only one "entrance"/path active at once (ie I try to ensure a path that agents are near are set to 3 so my guys don't use it).
The second-best way, and the most fun IMO, is to properly partition things such that not only do you have rec rooms, mess halls etc. located optimally, you also have a good camera network (or on the last island, 3 or 4!). That means cameras everywhere, and speakers in all mess halls/rec rooms, with security rooms always manned. You still need to manually "tag" enemies (otherwise they're ignored), but it's the best way to ensure you can get your guards to capture enemies without having to use a henchman to round them up (I reserve that for the super agents, or if the other idiots fail).
Also: for some reason red alert actually makes EVERYONE (even scientists and valets etc) attempt to kill everyone else (including tourists). So I'd use it sparingly, and go for yellow alert most of the time instead.
The main issue with yellow alert is that everyone decides that yellow alert is no big deal, so they all WALK to get their damn guns, which usually means by the time they get them the enemies have already been subdued...