Embedding proactive AI into operating system layers