The agents which are developed having their end uses as building blocks are called utility-based agents. When there are multiple possible alternatives, then to decide which one is best, utility-based agents are used. Sometimes achieving the desired goal is not enough. We may look for a quicker, safer, cheaper trip to reach a destination. For decisions and actions to be taken further, the happiness of the agent is taken into account. Every decision is marked by the attribute of maximizing utility and that is determined by how happy the agent is at every point.
It seems that you are interested in AI, you can look through this video and see if you'd like to delve further into the topic:
You can learn AI from Intellipaat Artificial Intelligence Certification in collaboration with IIT Madras and kick-start your career in AI.