From reactive to cognitive: brain-inspired spatial intelligence for embodied agents