If one hits a stone with a hammer it might split, or move a little, or just make a noise but either way it would be reacting to its environment on the basis of what it was. I guess we do not tend to call this behaviour. But when an animate being says that they feel hungry, they are also reacting to their environment on the basis of what they are [hungry and believing that it it worth while expressing that hunger]. And we do call this behaviour. So; reacting to ones environment on the basis of what one is, is it behaviour or not? We, created things, are free to be ourselves, but not free to be anything else. We did not make ourselves. Inanimate and animate things only "behave" according to how they were made.
I find it effective to first look at subjective cases, and look at how they approach the objective. This is useful because it sidesteps questions of whether any given entity is truly animate or not. Is a named sword in Chinese culture animate? The literature certainly talks that way. In fact, many combat based prose have phrases like "the sword leapt into his hand." On the other hand, is an individual who is in a coma animate? That question is of tremendous importance in the modern legal and ethical world, where one may have to contemplate puling life support. If there is an objective definition of "animate" in these cases, there is certainly a great deal of uncertainty about it.
When I look at how people choose to use this concept of animation, it is almost always with respect not to whether the object interacts with the environment, but whether they interact unpredictably. Does the world excluding the entity itself have enough information to predict how the entity will interact.
A hammer with some metalurgical flaws may "have a mind of its own," refusing to yield the secret of how to nail a nail in straight. A scientist may be able to bring to bear complex equipment to analyze the flaws, so that they are predictable. The scientist may even be able to devise a solution, such as a small piece of metal glued on to counteract the harmonics caused by this flaw, and cause the hammer to strike true. But without such scientific information, we fall back on using animate terminology. (Or we throw the hammer out)
So what happens when all of our tools for teasing predictions out of an object fail? I mention science because it's the current most popular tool for teasing predictions out of objects. What happens when it fails? What happens when we can't tell what a person is going to do merely by scanning them? If all of our tools fail at this, we must consider this to be as objective as a definition of "animate" as is practical for humans.