## 3 Proposed System and Architecture
_Monitoring Organization_: This organization aims to carry out the tasks of history storage, progress analysis, patient profile control, and report generation. This organization is detailed in Table 1.  
Simulation OrganizationThis organization is in charge of the classification and validation of poses made by the user as well as the execution of actions. This organization has an important role within the whole system since it is in charge of checking that the exercises are carried out and that they are done correctly. To this end, the main agents of this organization are described:  
* _Pose Estimation_: This agent can recreate the human pose from the RAW data coming from the Node Position agent. This agent can filter out and discard invalid poses due to what may be a temporary error in a sensor or due to the system being started up and the user wearing the suit. \begin{table}
\begin{tabular}{c c} \hline \hline
**Agent** & **Description** \\ \hline Historical & This agent is responsible for generating and obtaining historical data of carrying out exercises in such a way that they can be reviewed and evaluated by an expert in the future. \\ \hline Evolution & This agent is in charge of calculating the evolution from the percentage of completion of the exercises. \\ \hline Medical Record & The function of this agent is to simulate integration with a health system where patients’ medical conditions can be obtained and reported. \\ \hline Profile Data & This agent is responsible for making the user’s profile available to the entire system with the user’s parameters. This agent is also responsible for updating the profile values as they are updated with progress. \\ \hline Report Generator & Agent in charge of generating reports either of each exercise or of the rehabilitation progress. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Agents of the job monitoring organization. Figure 1: Proposed architecture using a multi-agent system (MAS) PANGEA. * _Pose Validation_: This agent has the functionality of classifying the poses estimated by the Pose Estimation agent by comparing them with the positions previously registered in the system, to know the position of the user. * _Action Recognition_: This agent makes use of the poses recognized by the Pose Validation agent. This agent's functionality is to recognize actions through the validated poses over time. _Application Interface Organization_: This organization is in charge of adapting the information generated by the system to the application layer. This organization is used as an interface so that the applications can interact directly with the system. This organization is in charge of converting the raw information of the system into information that can be easily interpreted by humans. In this case, the information displayed acts as an interface for the VR applications, the mobile applications, and the expert monitoring application. _PANGEA Multi-Agent System Organization_: This organization is composed of the minimum necessary agents for the operation of PANGEA. This organization aims to manage the virtual organizations and coordinate the agents within each of them. The agents of this organization can be seen below:  
* _Database Agent_: This is the only agent with database access permissions and can store the information present within the organization, such as records, historical agents, and tasks performed by each of the system agents. * _Information Agent_: This agent indicates the services available by all of the agents and can be requested by other agents of the system. When a new agent wants to join the system, this new agent must indicate to the information agent the services that are available so that the information agent can say which services are available to the other agents. * _Nornative Agent_: This agent is responsible for imposing and ensuring that the rules are complied with by the communication established between the agents.