How does the AI component work?