updated api tests for agent