Agent Home
Overview
The Smart Room Automation System is designed to simplify and streamline user interactions with room appliances such as lights, air conditioners, and windows. By integrating these appliances with a central control system, users can issue combined instructions to manage multiple devices simultaneously.
Functionality
The system operates through a Language and Logic Module (LLM) that interprets user inputs and generates sub-tasks for each appliance based on the user's query. These instructions are then forwarded to the Room Agent, which communicates with the individual appliances through a specified protocol.
- User Input: Users provide combined instructions to the LLM, such as "turn off the lights, set the temperature to 25°C, and close the windows."
- LLM Processing: The LLM analyzes the user input and generates sub-tasks for each appliance involved. For example:
- Lights: Turn off
- Air Conditioner: Set temperature to 25°C
- Windows: Close
- Room Agent Communication: The Room Agent receives these sub-tasks as RequestMessages from the LLM on behalf of the user.
- Appliance Control: Based on the received instructions, the Room Agent takes appropriate actions to control each appliance.
- Response to User: After completing the tasks, the Room Agent sends a ResponseMessage back to the user to confirm the actions taken.
Workflow
Getting Started
-
Clone the repository:
git clone https://github.com/fetchai/uAgents.git cd integrations cd agent-home -
Install dependencies :
poetry install -
Run the application:
python3 main.py -
Access the application at terminal.
About files
-
user.py: This module defines the user agent. The agent is set up with a name, port, seed, and endpoint. It also has several event handlers defined for different types of messages (e.g., LightsResponse, ACResponse, WindowResponse). These handlers dictate how the user agent should respond when it receives these types of messages.
-
room_agent.py: This module defines the room agent. Like the user agent, it is set up with a name, port, seed, and endpoint. It also includes several protocols (light_proto, ac_proto, window_proto) which define how it should handle different types of requests.
-
room_protocols.py: This module defines the protocols for handling different types of requests (LightsRequest, ACRequest, WindowRequest). Each protocol has a handler function that dictates how the room agent should respond when it receives a request of that type
Advantages
- Convenience: Users can issue combined instructions without needing to operate each appliance individually.
- Efficiency: Tasks are streamlined and executed promptly through centralized control.
- Customization: The system can be tailored to accommodate additional appliances or specific user preferences.

