Adding AI to m-Power

This document provides a high-level overview of how to integrate Artificial Intelligence (AI) into your m-Power applications. Specifically, this guide will walk developers through enabling AI, introduce the concept of agentic AI (where intelligent agents orchestrate tasks by routing them to specialized AI assistants), link out to topic-specific documentation, and cover frequently asked questions.

Introduction

m-Power allows you to include AI in a number of ways including:

  • Chatbot
  • Agentic AI Orchestration (Creating intelligent agents that determine which specific AI assistant or tool to use based on the context of the user’s request)
  • Reading input from a maintainer (for AI workflow integration)
  • Uploading a knowledge base
  • Accessing a custom knowledge base

No matter what approach you try, the methodology is similar: Information from the user (what they entered) plus information you’ve provided (a system prompt) is sent to a Large Language Model provider of your choice, and information is then returned. This information can come in the form of a response in a chatbot, but it could also be returned in the form of a JSON response which can then be read by an m-Power workflow, triggering further action (write to database, send an email, conditional actions, or triggering another specialized AI agent).

Setup

To configure AI, a few pre-requisites are required:   

  • Take the Q4 2026 m-Power update
  • Sign up with an AI provider (Such as Open AI, Azure AI, Google Gemini, or Anthropic AI) and obtain an API key.
  • Add the following properties to your /m-power/mrcjava/WEB-INF/classes/mrc-runtime.properties file:
enable_ai=true
enable_llm_logging=true

#Microsoft Azure config
azure_openai_api_key=
azure_openai_url=

#Anthropic config
anthropic_api_key=

#OpenAI config
openai_api_key=

#Google Gemini config
gemini_api_key=

#IBM Watson config
watsonx_api_key=
watonx_project_id=

#Groq config
groq_api_key=
groq_endpoint=

Note: Depending on which of the 4 AI providers you are using, only fill out that entry and ignore the other providers.

Once completed, restart Tomcat

How do I obtain an API key?

API keys are typically created and managed within your organization’s account with your chosen AI provider (for example, OpenAI, Azure OpenAI, Google Gemini, etc.). Because this involves your own security, billing, and access controls, the process of setting up the account and generating the key should be handled by whoever manages external services or cloud subscriptions at your organization (for example, IT staff, a system administrator, or an account owner). For this reason, our documentation does not include provider-specific, step-by-step instructions for obtaining API keys.

Note: mrc documentation does not provide vendor-specific instructions for creating API keys. We remain neutral about which AI provider you use, and provider portals, screens, and URLs can change without notice. Please refer to your provider’s official documentation for the most up-to-date steps.

Building your first AI App using AI Studio

Go to the AI Studio in the header bar. Click “+ New Assistant”.

Set the Type as “General Purpose” and enter a name for the assistant. Click “Create”.

Click “Run as Application” in the top-right corner..

Running the app will bring up a chat box which has the base knowledge of your selected AI provider and default model.

Making your AI Smarter

There are a few ways you can make your AI Assistant smarter:

System Prompts

System prompts are how you define the Assistant’s purpose and instruct it on how it should behave. You can help guide the AI to tell them what to expect, what to do, what not to do, and generally how to function. System Prompts are absolutely vital to a successful AI implementation. Simply put, the better a system prompt is written, the more accurate the AI will deliver your results.

More information about writing System Prompts here.

Tool Functions – Application

Tool function – Applications are a way your AI can reference live database values to help better answer your user. Example: “AI ~ Can you show me a list of clients who have submitted an order within the last 30 days?” By linking a multiple row retrieval to your AI it can use this information as part of its knowledge. This is ideal for situations when the data you are accessing changes frequently.

More information about Tool Function Applications here.

Tool Functions – Knowledge Base

Content retrievers are a way to create document repositories (knowledge bases) that can be referenced by the AI Assistant. Imagine you are building an AI Assistant to help employees understand various corporate policies. A content retriever would allow you to upload documented corporate policies to create a knowledge base. When employees interact with the assistant it will refer to information from the knowledge base applicable to the question or conversation. Content retrievers are a great solution for accessing data that is more stagnant.

More information about building a Knowledge Base and linking them to your AI Assistant here.

Tool Functions – External Objects

In the event you want to trigger an external object each time the AI is triggered, you can utilize this tool function.

Agentic AI and Orchestration

As your AI integrations grow more complex, you can leverage agentic AI to act as a central orchestrator. Instead of relying on a single, all-encompassing prompt to handle every possible request, a primary “Orchestrator Agent” interprets user intent and dynamically routes tasks to the appropriate assistant or even a specialized sub-agents. For example, the orchestrator might route a sales forecast request to a data-heavy assistant, while directing HR inquiries to a policy-focused assistant linked to a Content Retriever, resulting in a modular approach that improves accuracy, reduces token usage, and simplifies maintenance.

More information about creating AI Agents here.

Embedding your AI chatbot on another m-Power page

AI Assistants don’t have to be run stand alone. See this documentation to learn how to embed the assistant into any other m-Power application:

(How-To) Embed an AI Assistant in another m-Power application

AI Assistant Configuration

General Settings

Chat History — Controls if you want AI to remember your chat just while the chat bot is open on the page or to retain it throughout the whole session.

Hide JSON from Chat Responses — Useful if you return JSON responses back from AI and want them to be hidden to the end user.

Save Conversation History — Persist past conversations and show the history button.

Summarize for History Title — Use an LLM to title each historical conversation instead of its first message.

FAQ

Q. Can I use an existing dictionary? How about existing apps?
A. You can use your existing bootstrap application. Any maintainers or retrievals you wish to use with AI will need to be recompiled (but no need to overwrite the presentation layer.

Q. What version of dictionaries are supported?
A. While older dictionaries may work to various degrees, AI is supported in bootstrap templates only.

Q. Should I be concerned about data privacy?
A. You should always be concerned with data privacy! Using things like https ensure that data in transit is secure. Different AI Providers have different plans, tiers, and policies that you should review to ensure you understand if and how any data sent to it will be used. As far as trusting the AI provider, that is a decision that you and your organization must make. We do support a wide variety of AI providers should you prefer one over the other. Ultimately, which provider and plan you decide is best for your organization is up to you.

Q. I keep seeing LLM. What does that mean?
A. It stands for large language model. It is the driving process behind AI. AI providers typically offer different LLMs for your consideration. Some offer faster results with lower accuracy/lower cost, for instance. Within m-Power, you can select the LLM you wish to utilize, based on the AI provider you select.

Q. How accurate are AI results?
A. That is a tricky question to answer thoroughly but AI results can always be improved by better prompting of the AI. This typically means writing better prompts or providing more tool functions to better inform the LLM as to what you want. As the technology evolves, accuracy will continue to improve. Newer more powerful models typically provide greater accuracy.

Q. Are there additional costs for using AI features?
A. From mrc, no. This is considered a base feature of m-Power and is included in your m-Power license. However, depending on the AI company you choose, your usage, and the selected LLM, the costs do vary. LLM providers typically charge based on usage however unless your usage is very high the costs are nominal.

Q. I don’t know the first thing about AI. Where do I begin?
A. We understand that the prospect of setting up AI is a lot to take in. To help get you going on the right foot, mrc is offering companies between now and the end of 2026, a complimentary 4 hour consulting block to help you setup AI in your environment as well as assist you in building your first AI agent. Additional time is available for purchase if you wish to have continuing education on the topic.

Updated on July 24, 2026

Was this article helpful?

Related Articles