In a lot of stories to cast a spell one must say some words or draw symbols on the ground etc. Now it seems like logically, in order for such things to work something has to ever presently watch for these symbols (or listen for them), interpret them when they appear and then execute the actual magical spell.
I'm wondering if there has ever been any classical explanations as to what that something is (gods, demons something else)? And, more importantly, what reason would it have to consistently obey such commands?
This question is similar to In the magic==math trope, how do "they" know when we're doing spells? but my focus is less on how would they know and more on the nature of the entity and reasons why it does what it does. And I'm specifically talking about systems of magic that are fairly predictable:
i.e. if I say vingardium leviOHsa it works every time, but if I say levioSAH then it doesn't
So it isn't the case of otherworldly entities being impressed by a human possessing knowledge or solving a theorem and thus doing something, but rather acting like terminal shell executing command as long as they're types.. er.. said correctly. On the other hand certain spells, like healing or repairing stuff require a certain amount of "thinking" and understanding of the problem (the spellcaster doesn't consciously rearrange each molecule to repair something, the spell sort of "knows" what the thing is supposed to be and does it automatically)
So, what sort of entity is smart enough to execute complex spells with some degree of knowledge and creativity, yet still obeys symbolic commands about 100% of the time?