# 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="/files/BeaKUpn4CbsqHED5bkL4" 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="/files/xI2sSqzHze2ma16k7z34" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apphp.gitbook.io/artificial-intelligence-with-php/artificial-intelligence/agents-in-ai/components-of-ai-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
