5-layer AI architecture