A movement engine! When the enemy sees you, he'll try to chase you. Don't ask what exactly the enemy is. Just shake him off somehow. His pathfinding isn't too good and he may try to jump through a window though...
Griffpatch for the raycasting thing which I used for the sight mechanic