added documentation and special case for agentdelete.php