> For the complete documentation index, see [llms.txt](https://apphp.gitbook.io/artificial-intelligence-with-php/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apphp.gitbook.io/artificial-intelligence-with-php/artificial-intelligence/agents-in-ai/components-of-ai-agents.md).

# Components of AI Agents

### Components of AI Agents

AI agents are made up of many key components that work together to perceive, reason, and act in their environment.

<div align="left"><figure><img src="https://3534497751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHBhflVf91jxK4ccRhKqv%2Fuploads%2Fgit-blob-8a67f32e68d426bfef5bcc0d6f3a1405e410ea90%2Fai-components-of-ai-agents-min.png?alt=media" alt="" width="375"><figcaption><p>Components of AI Agents</p></figcaption></figure></div>

To make all of this possible, agents rely on four key components:

* Sensors: These detect changes in the environment. For instance, a robot’s camera or a smartphone’s GPS.
* Actuators: These are the muscles of the agent, converting energy into action. In robots, this could be motors that move wheels or arms. For software, this might be actions like displaying information or sending messages.
* Effectors: These are what physically interact with the world, like a robot’s legs or a display screen on your phone.
* Decision-making mechanism: A decision-making mechanism is the brain of an AI agent. It processes the information gathered by the sensors and decides what action to take using the actuators. The decision-making mechanism is where the real magic happens.

{% hint style="info" %}
Each agent can perceive its own actions (but not always their effects or consequences).
{% endhint %}

<div align="left"><figure><img src="https://3534497751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHBhflVf91jxK4ccRhKqv%2Fuploads%2Fgit-blob-3607fd9a116b733d7cfb8524a011998876b0d252%2Fai-components-of-agents-min.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>

In addition it has a learning system. The learning system enables the AI agent to learn from its experiences and interactions with the environment. It uses techniques like reinforcement learning, supervised learning, and unsupervised learning to improve the performance of the AI agent over time.
