Categories:
Aura gateway API plugins
aura-gateway-api plugins are components that provide different functionalities to aura-gateway-api
Introduction
aura-gateway-api is composed of plugins, which provide functionality to this component. Plugins work independently, the same way as a service in microservices oriented architecture: isolated, self-contained and without affecting other existing functionalities in the system.
From the different types of plugins, only Api plugins are available in aura-gateway-api.
The following plugins are currently available in aura-gateway-api. From the different ATRIA capabilities that this component can manage, certain plugins are used by all or some of them and others are specific of one capability.
-
aura-generative-api plugin
This module manages request to external OpenAI APIs. -
aura-generative-process-service plugin
This module manages the communication and data processing with external OpenAI APIs. -
aura-nlp-resolution plugin
This module manages the request to NLP services. -
aura-nlp-resolution-process-services plugin
This module manages the communication and data processing with external NLP services. -
aura-development-api plugin
This module manages configuration in development environments. Only available in development environments. -
aura-feedback-api plugin
This module manages requests to provide feedback about the generative and RAG services behavior. -
aura-agents-api plugin
This module manages the communication with agents. -
dapr-pubsub-service plugin This plugin allows the interaction with the Dapr PubSub Service.
-
aura-operations-api plugin
This module allows you to perform operations on now, currently launching the generateDB
Discover detailed information regarding the available plugins in the left index.
Plugins management
aura-gateway-api uses the @architect/architect library for the management of plugins, so it is the architect library that is responsible for managing the dependencies injection in each module.
To create the architect application, aura-gateway-api uses the PluginManager module (located in the modules/plugin-manager folder). This module starts as the rest of modules at the aura-gateway-api start-up.
The PluginManager performs the following tasks:
- It starts the architect application with the plugins defined in
plugin-config.jsonfile, located at the root of the aura-gateway-api component. - It adds the core modules to the IOC context. See the section plugins modules.
- It stores the information of each module defined in the plugins.
Apart from the aura-gateway-api core environment variables, each plugin can define its own specific variables. Access the document aura-gateway-api environment variables and find them in the section corresponding to your plugin.
Plugin basic structure
Currently, aura-gateway-api uses @architect/architect library for plugins management.
A basic plugin must define at least:
- A
package.jsonfile defining the library, like any other JavaScript library, with apluginsection defining which modules it consumes and supplies. - A source code file that defines the modules that it supplies (
index.tsfor example).
The structure of this basic plugin is as follows:
session-api
├── index.ts
└── package.json
Plugins modules
aura-gateway-api currently adds one module that can be used by the different plugins. To use it, it is only necessary to add the package.json dependencies on plugin.consumes (like any other module/component).
- configurationManager: Module with the aura-gateway-api configuration information.
- redisConnector: Module with the aura-gateway-api Redis connection.
A plugin can provide one or more plugin modules and each plugin module can be of a different type. Each type of module is intended to add a specific functionality to aura-gateway-api.