A good way to implement this is to create an Emotion Detection Agent that:
- Accepts an image.
- Sends the image to a multimodal LLM (such as Azure OpenAI GPT-4.1, GPT-5 Vision, or GPT-4o).
- Returns structured JSON containing the detected emotion and confidence.
Keep in mind that LLMs can only estimate emotions from facial expressions. They cannot reliably determine a person's actual emotional state.