Skip to main content

System Architecture

Modular Components

The xRx system architecture consists of several components that interact with each other to provide build a reasoning based application. Below is a high-level overview of the system:

  • Client: Front end app experience which renders the UI and handles websocket communication with the Orchestrator. See directory here
  • Orchestrator: Manages the flow of data between various AI and traditional software components. See directory here
  • STT (Speech-to-Text): Converts audio input to text. See directory here
  • TTS (Text-to-Speech): Converts text responses back to audio. See directory here
  • Agent: Responsible for the "reasoning" system of xRx. See directory here
  • Guardrails Proxy: A safety layer for the reasoning system. See directory here

Information Flow

These components then communicate via the following sequence diagram

Deployment Specifics

xRx's deployment is designed to be modular in nature. This means that you can swap out any component of the system with your own custom implementation. The entire system is defined as a single docker-compose file with a single connected network. This allows for easy swapping of components and deployment to a variety of different environments.

A key design choice in xRx is the separation of the core framework from specific applications. The xRx core, which remains consistent across different applications, is imported as a submodule in each app. This core contains modules that are plug-and-play for custom applications, providing a foundation of reusable components.

This separation method allows for greater flexibility in application development. The xRx core includes containerized modules and reusable libraries:

  • Reusable libraries: These include the agent framework and UI library, which can be imported into each specific app.
  • Containerized modules: The xRx system includes components such as TTS, STT, Guardrails, and the Orchestrator, which are defined as separate Docker containers. The docker-compose file located in the application folder starts each of these containerized components and connects them to the same network.

This modular structure, combined with the separation of core libraries and containerized components from the application-specific logic, enables developers to easily customize and extend xRx for their specific needs while benefiting from a solid, tested foundation. It also allows for easy swapping or upgrading of individual components without affecting the entire system.