GenAI Commons
Overview
The starting point to create agentic apps, a Conversational UI - chatbot or just include GenAI text or image generation in your app. When you download the GenAICommons module you can:
- Integrate with any LLM and knowledge base
- Create a conversational UI by using the pages & snippets from our ConversationalUI module
- Observe your GenAI interactions by inspecting the traces they create with the Traceability pages from our ConversationalUI module
- Monitor your token consumption with the Token Consumption Monitor from our ConversationalUI module
- Integrate directly with Mendix Cloud GenAI Models and Knowledge Bases
This module is 100% compatible with the Mendix Cloud GenAI Connector, Amazon Bedrock Connector or (Azure) OpenAI Connector to integrate with these platforms. When you download them, those models will be automatically detected and can be used in conjunction with this module. You can also implement your own connector to other models/providers to integrate this with our GenAI capabilities.
Typical use cases:
- Create agentic apps and do intelligent automation by implementing function calling and the ReAct pattern
- Ground your model in data by connecting to Knowledge Bases and applying Retrieval Augmented Generation (RAG)
Examples that include this module.
- AI Bot Starter App
- Agent Builder Starter App
- RFP Assistant Starter App
- Blank GenAI App
For more information, visit the official documentation.
Contact Us
For support and questions, feel free to reach out via email: genai-components-feedback@mendix.com or Community Slack.
Documentation
Releases
- We fixed a bug that prevented the token consumption monitor and traceability to show total number of tokens being consumed if the total number exceeded a certain value.
- We introduced a new attribute InternalToolType which helps to create the correct UI per type.
* We changed the order in which messages are added to the request to prevent possible issues where the order of messages passed to the model would have been incorrect.
* Two new attributes ModelDocumentID and _QualifiedName have been added for ConsumedKnowledgeBases to improve the UI for the configuration of Mendix Cloud GenAI.
We fixed a bug where chat completions with tool calling caused errors if the following assistant's response was empty. If a tool microflow returns empty (or an empty string) we now throw an error. This will be handled internally, but enables the spans to show an error and that the LLM interaction can continue without API call failures.
User Access and Approval is a new GenAI Commons and ConversationalUI feature to make tool calls visible to users and provide control for users to decide if tools should be executed or rejected. They can be either configured at runtime in AgentCommons or at design time using GenAI Commons actions when adding tools/functions to a request. For knowledge bases it can be decided whether they are visible to the user or not. Per default all tools and knowledge base retrievals are hidden for users (same behavior as in previous versions). You can optionally provide a display title and description to be shown to the user.
When applying User Access and Approval, the chat completions (or call agent) operations behave differently than in previous versions, because the tool call response is sent back to the microflow without the final assistant response. This can be set off if the "SaveToolCallHistory" boolean on the request object is set to false before calling the operations. If any tool is set for user visibility or confirmation, this setting gets ignored.
We moved some logic from java code to microflows (especially regarding tool execution) which makes it easier to debug chat completions executions.
The action "Add Message to Request" now returns the added message. If you use this action in your code, you might get errors in Studio Pro and need to open the action to set the return variable (or choose to not use it).
The entity "Argument" (associated to ToolCall) and all its usages were removed. All connectors should make use of the "Input" attribute of ToolCall instead. Internally, the input is converted to applicable input parameters if a Mendix function microflow is executed.
The domain modules have been adjusted as a preparation for future functionalities regarding knowledge bases and MCP servers. Related modules (Agent Commons and Connectors for LLM/Knowledge base providers) might require data migration. Please refer to the release notes of the respective module and the migration guide here: https://docs.mendix.com/appstore/modules/genai/genai-for-mx/migration-guide/
An attribute Schema was added to the Tool entity and the attribute Input to the ToolCall entity. Both attributes are specifically for external tools, for example MCP tools, which contain the raw tool schema and raw input generated by the model respectively. In addition the ArgumentInput and EnumValue entities and related microflows were removed as they are no longer needed. Ensure to update other connector modules as well to be compatible with this version, especially MCP Client if applicable.
Some small domain model changes such as the addition of Agent version information to the trace entity were added in order to persist this information even after an agent (version) was deleted.
The module was upgraded to 10.24.13.
We fixed an issue that caused tool calls to fail if the StoreTraces constant was set to false.
Domain model and microflow changes to support new features in ConversationalUI v5.3.0 (Observability for AI Traces) including:
- a new MCPSpan entity
- a new MCPServerName attribute for Tools.
Note that previously created traces in version 5.3.0 might not be displayed correctly due to data inconsistencies after this update.