Update agent.php