Skip to main content
Designing microservices using Artificial Intelligence (AI) allows for their automatic generation from requests expressed in natural language. This feature reduces the need for advanced technical knowledge and speeds up the development process by eliminating the need for manual programming. The microservice code is generated according to the request made, but the creation process is completed in the Designer section, from where the microservice can be enabled so that it can be executed. ai_designer

Create a microservice

The steps to create a microservice through AI are as follows:
  1. Go to MicroservicesCreate with AI.
  2. In the central panel, write the request in natural language and with a maximum of 400 characters. At the bottom, Try something like this offers examples that can help create a request.
  3. In the drop-down, choose in which scope it will run: System Microservice or Session Microservice. choose-system-session-ms
  4. Click the arrow in the orange box to continue.
  5. If there are similar microservices, they will be offered as available alternatives. The user can click on each of them to analyze their use in relation to the desired objective. When doing so, you will be redirected to the Marketplace section. If, after reviewing the alternatives, the user considers that a new microservice must be created, they must click Create with AI. exist-ms
  6. A few seconds later, the AI will design the microservice. iadesign-panel The Copy code button allows you to copy the generated code to the clipboard, facilitating its use in tests if required. copy-script
    This feature only generates microservices in PowerShell.
  7. Review the microservice code. expand-code
  8. The Improve the microservice box, located at the bottom right of the screen, allows the user to add information to optimize the microservice. With each improvement, a new version of the code is generated, which can be viewed in the Microservices created column, located at the top.
  9. Click Create microservice.
    If you click Create microservice again on an existing microservice request, you will be asked for confirmation to verify whether you want to create a new one. If so, another microservice will be generated whose name will include a number at the end to differentiate it from the original. In no case will the code or configuration of an already created microservice be overwritten.used_project
  10. Next, the user will be directed to the Designer section to edit the microservice’s configuration, if desired. ia-ms-edit
  11. Click Save.
  12. The microservice will appear in the list of the Designer and Marketplace sections.
By default, microservices generated with AI are created without any category and have the Flexxible Microservices License license. This configuration can be modified in Designer.
AI can also make mistakes. The execution of microservices designed with this method is the user’s responsibility.

Writing requests

The more detailed a request is, the more precise and useful the generated microservice will be. To achieve this, it is recommended that messages meet the following guidelines: 1. Concise
  • Avoid vague, redundant, or overly long phrases.
  • Use direct language.
  • Clarity should take priority over the number of words.
2. Specific
  • Explain exactly what you want to obtain.
  • Include details such as the output format, tools, objective, restrictions, etc.
  • The more details provided, the better the result.
3. Context
  • Indicate where the action will be applied.
  • If context is missing, the AI could create generic results.
  • Specify the purpose of the microservice.
4. Verbs in the imperative mode
  • It is suggested to use verbs that clearly indicate what the AI should do.
  • Examples: create, do, analyze, generate, search, compare, etc.

Recommendations

In addition to writing clear requests, it is advisable to structure them so that the AI accurately understands what it should do and how to present the result. To achieve this, it is suggested to keep in mind the following recommendations:
  • Avoid ambiguity. Each request should have only one possible interpretation.
  • Iterate and improve. If the result is not optimal, the request can be adjusted by adding more context.
  • Use examples when possible. Showing an output model better guides the result.
  • Specify the concrete action. Directly describe the task the AI should execute.
  • Include reference examples. Show what the expected output should look like, to correctly guide the AI’s interpretation.
  • Establish restrictions or rules. Indicate the limits, conditions, or requirements that must be met during execution.
  • Define success criteria. Explain what conditions the result must meet to be considered satisfactory.

Examples of how to make a request

:x::white_check_mark:
Can you make a backup of the desktop and documents?Make a backup of the desktop and the Documents folder. Copy these files as ZIP to \nas\backups<username>. Also, I want to keep only the latest copy. Delete the rest of the files as soon as the copy has completed successfully.
Create a scheduled task on the computers that logs off the session after a certain time of inactivity.Create a scheduled task on Windows 11. The task must log off the current user’s session when 30 minutes of inactivity are detected.

My requests

The My requests column, located on the left side of the screen, shows the microservice requests that the user has made to the AI. Each user can only see their own; they are not shared with the rest of the organization. my_request This feature allows the request history to be visible at all times by the user who created it so that they can always return to them. It also allows you to provide feedback on the result; to do so, the user can click on the thumb-shaped buttons, located at the top right of the screen. feedback_ms

Delete a request

  1. Go to the My requests column, located on the left side of the screen.
  2. Click on a request from the list to enter the code detail.
  3. Click the Delete icon, located at the top right of the screen.
  4. Read the warning message. delete_project
  5. Click Cancel or Delete, as appropriate.
Deleting a request does not mean deleting the microservice created from it.

Microservices created

On the right side of the screen, the Microservices created column presents the list of all microservices created from a request. This panel allows you to identify whether a request has resulted in one or several microservices, as well as access each one directly for review.
  • When the AI designs the first version of a microservice, but it has not been created through the Create microservice button, the Microservices created column shows a message like the one in the following image: ms_no_created The orange arrow located in the box of each version allows you to load the code of the previous version. one_ms_created
  • When the AI designs the first version and Create microservice is clicked, the Microservices created column shows the name of the microservice. If clicked, its detail view is accessed in the Designer section.
  • When the AI designs and creates more than one version of a microservice, the Microservices created column shows the word Multiple. Clicking on Multiple opens a modal window with the list of microservices created from that request. Selecting one of them accesses its detail view in the Designer section. ms_related

Enable a microservice

The process to enable or disable an AI-generated microservice is the same as the one used to create microservices manually. Steps to enable a microservice from Designer:
  1. Go to MicroservicesDesigner.
  2. Find the microservice in the list and click on it.
  3. Click the Enable button, located at the top right of the screen. enabled-ms
  4. The microservice will appear marked with a green dot (sign of being enabled) in the Marketplace section. enabled-marketplace
Steps to enable a microservice from Marketplace:
  1. Go to MicroservicesMarketplace.
  2. Find the microservice in the list and click on it.
  3. Click the Enable button, located at the top right of the screen.
  4. The microservice will appear marked with a green dot (sign of being enabled).

Enable a microservice for the end user

The process of enabling a microservice created with AI for execution by the end user is the same as for microservices designed manually. Please refer to the Enable microservices for the end user guide.
Flexxible recommends reviewing the Privacy and Recipients tabs in the Designer section before enabling a microservice to verify that they have the desired configuration.