The Agent Loop: Observe, Decide, Act, Check