Updated agenda.php for API changes.