So I made an AI system for stealth using hammer's logic entities...
If their sprite is green, they do not know where you are and have not heard anything suspicious.
If they are in the orange state, they haven't spotted you, but they have heard gunshots.
If they turn red, it means they have directly spotted you.
After 10 seconds of not hearing anything or seeing you, they will revert from the orange or red states back to the green state and forget about you.