Philosophers call this ability to predict another agent's behavior "theory of mind". Presumably it would be impossible to have a theory of mind - a theory about what another agent will do - without first being aware of your own.
Unless I'm showing my ignorance here, which is quite likely.