Is there any formal understanding of how humans perceive humanity/vitality in other entities?
Yes, there's a lot of work on this! Still a ton of open questions though, and plenty of smart people working in quite disconnected paradigms.

A classic study in this space is Heider F. &amp; Simmel M. (1944). An Experimental Study of Apparent Behavior, The American Journal of Psychology, 57 (2) 243. DOI: 10.2307/1416950

But note the date! 1944! I think what you're really looking for is the community that is still citing this today.

One recent example might be people interested in Bayesian Theory of mind, eg:
Baker CL, Jara-Ettinger J, Saxe R, &amp; Tenenbaum JB (2017). Rational quantitative attribution of beliefs, desires and percepts in human mentalizing. Nature Human Behaviour

Also, 'agency' is one of the areas identified/investigated as part of core developmental knowledge by Spelke and collaborators, see for example 
Spelke, E. S., &amp; Kinzler, K. D. (2007). Core knowledge. Developmental science, 10(1), 89-96.

This answer doesn't really do justice to the breadth of this literature, there's a lot of it! But hopefully the citations and cited-by links from these will throw up the kind of thing you're looking for.