Nav Mesh Agent

Hi, can you use Raycast to find a Nav Mesh agent tag or do you have to add a collider?

both work