Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ The **Settings** tab contains the details of a GenAI resource. It shows the foll

### Additional Details for Knowledge Base Resources

For knowledge base resources, you can also see details of the associated embeddings resource and vice versa. To learn more about embeddings, see the [Embedding vector](/agents/rag/#embedding-vector) section of *RAG in a Mendix App*.
For knowledge base resources, you can also see details of the associated embeddings resource and vice versa. To learn more about embeddings, see [Embeddings](/agents/glossary/#embeddings) in the *Glossary*.

### Adjusting the GenAI Unit Capacity of a Resource

Expand Down
12 changes: 2 additions & 10 deletions content/en/docs/genai/v1/how-to/byo_connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,12 @@ Looking for Mendix's newest agentic and generative AI features? [This page has b

## Introduction

If you want to create your own connection to the LLM model of your choice while leveraging the chat UI capabilities of the [ConversationalUI](/agents/agents-kit-1/reference-guide/conversational-ui/) module, which is built using entities from [GenAICommons](/agents/agents-kit-1/reference-guide/commons/), then this document will guide you on how to get started with building your own GenAI Commons connector.
This guide explains how to build a custom connector that uses [GenAICommons](/agents/agents-kit-1/reference-guide/commons/) entities to integrate the [large language model](/agents/glossary/#large-language-model) (LLM) of your choice with the [ConversationalUI](/agents/agents-kit-1/reference-guide/conversational-ui/) module.

Building your own GenAI Commons connector offers several practical benefits that streamline development and enhance flexibility. You can reuse [ConversationalUI](/agents/agents-kit-1/reference-guide/conversational-ui/) components, quickly set up with [starter apps](/agents/agents-kit-1/how-to/starter-template/), and switch providers effortlessly. This guide will help you integrate your preferred LLM while maintaining a seamless and user-friendly chat experience.
A custom GenAI Commons connector lets you reuse [ConversationalUI](/agents/agents-kit-1/reference-guide/conversational-ui/) components, set up your app with [starter apps](/agents/agents-kit-1/how-to/starter-template/), and switch providers.

{{< figure src="/attachments/genai/howto-byo/connectors_diagram.png" alt="" >}}

### Prerequisites

Before starting this guide, make sure you have completed the following prerequisites:

* Basic understanding of GenAI concepts: Review the [Enrich Your Mendix App with Agentic Capabilities](/agents/) page to gain foundational knowledge and become familiar with the key [concepts](/agents/get-started/).

* Understanding Large Language Models (LLMs) and Prompt Engineering: Learn about [LLMs](/agents/get-started/#llm) and [prompt engineering](/agents/get-started/#prompt-engineering) to use these within the Mendix ecosystem.

### GenAI for Mendix

Before building your own connector, determine whether starting from scratch is necessary. If your provider’s API structure is similar to an existing connector, it is often best to use that connector’s code as a foundation and modify it as needed. For example, if your provider’s REST-based API uses JSON payloads similar to OpenAI’s, you can likely reuse much of the microflows and logic from the OpenAIConnector. Even if you are running a custom model on a private server or another cloud environment, the OpenAIConnector can still serve as a strong starting point, allowing you to adapt and extend it to meet your specific needs. See the blog on [How to Run Open-Source LLMs Locally with the OpenAI Connector and Ollama](https://www.mendix.com/blog/how-to-run-open-source-llms-locally-with-the-openai-connector-and-ollama/), which may be helpful.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/genai/v1/how-to/creating-agents/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Looking for Mendix's newest agentic and generative AI features? [This page has b

## Introduction

This guide explains how to create an agent in your Mendix app that combines [knowledge base retrieval (RAG)](/agents/rag/) and [function calling](/agents/function-calling/) capabilities from Mendix Agents Kit.
This guide explains how to create an agent in your Mendix app that combines [knowledge base retrieval (RAG)](/agents/glossary/#retrieval-augmented-generation) and [function calling](/agents/glossary/#tool-calling) capabilities from Mendix Agents Kit.

## Agent Use Case

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ This approach uses microflows and GenAI Commons building blocks to define agents

## Prerequisites

Before you begin, ensure that you have met the following prerequisites:
Before starting this how-to, complete the following:

* Complete [Set Up Your App for Agent Creation](/agents/agents-kit-1/how-to/creating-agents/shared-setup/) to configure your application, knowledge base, domain model, UI, and function microflows
* Configure text generation and knowledge base keys (for details, see [Configuration](/agents/agents-kit-1/reference-guide/agent-commons/#configuration) in the *Agent Commons* documentation).
* Configure text generation and knowledge base keys (for details, see [Configuration](/agents/agents-kit-1/reference-guide/agent-commons/#configuration) in the *Agent Commons* documentation)

## Creating Your Agent

Expand All @@ -34,7 +34,7 @@ Create an agent that can be sent to the LLM. The [Agent Commons](/agents/agents-

4. Click **Save** to create the agent.

5. On the agent's details page, in the [System Prompt](/agents/prompt-engineering/#system-prompt) field, add instructions on how the model can generate a response and what process to follow. This is an example of the prompt that can be used:
5. On the agent's details page, in the [System Prompt](/agents/glossary/#system-prompt) field, add instructions on how the model can generate a response and what process to follow. This is an example of the prompt that can be used:

```txt
You are a helpful assistant supporting the IT department with employee requests, such as support tickets, license requests (for example, Miro) or hardware requests (for example, computers). Use the knowledge base and historical support tickets as a database to find a solution, without disclosing any sensitive details or data from previous tickets. Base your responses solely on the results of executed tools. Never generate information on your own. The user expects clear, concise, and direct answers from you.
Expand All @@ -52,7 +52,7 @@ Create an agent that can be sent to the LLM. The [Agent Commons](/agents/agents-
If the retrieved results are not helpful to answer the request, inform the user in a user-friendly way.
```

6. Add the `{{UserInput}}` prompt to the [User Prompt](/agents/prompt-engineering/#user-prompt) field. The user prompt typically reflects what the end-user writes, although it can be prefilled with your own instructions. In this example, the prompt consists only of a placeholder variable for the actual input of the user.
6. Add the `{{UserInput}}` prompt to the [User Prompt](/agents/glossary/#user-prompt) field. The user prompt typically reflects what the end-user writes, although it can be prefilled with your own instructions. In this example, the prompt consists only of a placeholder variable for the actual input of the user.

7. Add a value in the **UserInput** variable field to test the current agent. For example, type `How can I implement an agent in my Mendix app?`. Ideally, the model will not attempt to answer requests that fall outside its scope, as it is restricted to handling IT-related issues and providing information about ticket data. However, if you ask a question that would require tools that are not yet implemented, the model might hallucinate and generate a response as if it had used those tools.

Expand Down Expand Up @@ -120,7 +120,7 @@ All components used in this document can be found in the **ExampleMicroflows** f

### Connecting Function: Get Number of Tickets by Status (without MCP Server)

The first function enables the user to ask questions about the ticket dataset, for example, how many tickets are in a specific status. Since this is private data specific to your application, an LLM cannot answer such questions on its own. Instead, the model acts as an agent by calling a designated microflow within your application to retrieve the information. For more information, see [Function Calling](/agents/function-calling/).
The first function enables the user to ask questions about the ticket dataset, for example, how many tickets are in a specific status. Since this is private data specific to your application, an LLM cannot answer such questions on its own. Instead, the model acts as an agent by calling a designated microflow within your application to retrieve the information.

1. Add the `Tools: Add Function to Request` action immediately after the **Request** creation microflow:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ This approach uses the Agent Commons UI to define and manage agents at runtime.

## Prerequisites

Before you begin, complete the following:
Before starting this how-to, complete the following:

* [Set Up Your App for Agent Creation](/agents/agents-kit-1/how-to/creating-agents/shared-setup/) to configure your application, knowledge base, domain model, UI, and function microflows
* Configure text generation and knowledge base keys (for details, see [Configuration](/agents/agents-kit-1/reference-guide/agent-commons/#configuration) in *Agent Commons*)
* Complete [Set Up Your App for Agent Creation](/agents/agents-kit-1/how-to/creating-agents/shared-setup/) to configure your application, knowledge base, domain model, UI, and function microflows
* Configure text generation and knowledge base keys (for details, see [Configuration](/agents/agents-kit-1/reference-guide/agent-commons/#configuration) in the *Agent Commons* documentation)

## Setting Up the Agent with a Prompt

Expand Down Expand Up @@ -58,7 +58,7 @@ Create an agent that can be called to interact with the LLM. The [Agent Commons]
If the retrieved results are not helpful to answer the request, inform the user in a user-friendly way.
```

7. Add the `{{UserInput}}` expression to the [User Prompt](/agents/prompt-engineering/#user-prompt) field. The user prompt typically represents the end-user's input. You can also prefill it with predefined instructions. In this example, the prompt consists only of a placeholder variable for the actual input the user provides while interacting with the running app.
7. Add the `{{UserInput}}` expression to the [User Prompt](/agents/glossary/#user-prompt) field. The user prompt typically represents the end-user's input. You can also prefill it with predefined instructions. In this example, the prompt consists only of a placeholder variable for the actual input the user provides while interacting with the running app.

8. Add a value in the **UserInput** variable field in the **Test Case** section. This lets you test the current prompt behavior by calling the agent. For example, type `How can I implement an agent in my Mendix app?` and click **Test**. You may need to scroll down to see the **Output** on the page after a few seconds. Ideally, the model does not attempt to answer requests that fall outside its scope, as it is restricted to handling IT-related issues and providing information about ticket data. If you ask a question that requires tools that are not yet implemented, the model might hallucinate and generate a response as if it had used those tools.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Currently, Agent Editor supports only [Mendix Cloud GenAI](/agents/mx-cloud-gena

## Prerequisites

Before you begin, complete the following prerequisites:
Before starting this how-to, complete the following:

* Use an app running on Studio Pro 11.9.1 or above
* Use Mendix Studio Pro 11.9.1 or above
* Complete [Set Up Your App for Agent Creation](/agents/agents-kit-1/how-to/creating-agents/shared-setup/) to configure your application, knowledge base, domain model, UI, and function microflows
* Install [Agent Editor](/agents/agents-kit-1/reference-guide/agent-editor/), including the [first-time setup](/agents/agents-kit-1/reference-guide/agent-editor/#setup) steps
* Have access to Mendix Cloud GenAI text generation and knowledge base resources, and generate a key for both of these resource types from the [Mendix Cloud GenAI Portal](https://genai.home.mendix.com/)
Expand Down
13 changes: 5 additions & 8 deletions content/en/docs/genai/v1/how-to/creating-agents/shared-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,20 @@ After you complete these steps, continue to one of the implementation approach g

## Prerequisites {#prerequisites}

Before you build an agent in your app, make sure your scenario meets the following requirements:
Before starting this how-to, complete the following:

* An existing app – Use a GenAI starter app such as the [Blank GenAI Starter App](https://marketplace.mendix.com/link/component/227934), or add to an app that you have already built
* Studio Pro 10.24 or above (or Studio Pro 11.9.1 or above if you plan to use [Agent Editor](/agents/agents-kit-1/how-to/create-agent-with-agent-editor/))
* Intermediate understanding of Mendix – Knowledge of simple page building, microflow modeling, domain model creation, and import/export mappings
* Basic understanding of GenAI concepts – Review [Enrich Your Mendix App with Agentic Capabilities](/agents/) for foundational knowledge and familiarize yourself with the [concepts of GenAI](/agents/get-started/) and [agents](/agents/agents/)
* Basic understanding of function calling and prompt engineering – Learn about [Function Calling](/agents/function-calling/) and [Prompt Engineering](/agents/get-started/#prompt-engineering) to use them within the Mendix ecosystem
* Use Mendix Studio Pro 10.24 or above (or 11.9.1 or above if you plan to use [Agent Editor](/agents/agents-kit-1/how-to/create-agent-with-agent-editor/))
* Use a GenAI starter app such as the [Blank GenAI App](https://marketplace.mendix.com/link/component/227934), or add to an app that you have already built
* Optional – If you are not yet familiar with implementing specific GenAI concepts with Agents Kit, follow these GenAI documents: [Grounding Your LLM in Data](/agents/agents-kit-1/how-to/howto-groundllm/), [Prompt Engineering at Runtime](/agents/agents-kit-1/how-to/howto-prompt-engineering/), and [Integrate Function Calling into Your Mendix App](/agents/agents-kit-1/how-to/howto-functioncalling/)
* Optional – Basic understanding of the [Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro) and the related Mendix modules: [MCP Server module](/agents/agents-kit-1/reference-guide/mcp-modules/mcp-server/) and [MCP Client module](/agents/agents-kit-1/reference-guide/mcp-modules/mcp-client/)
* Optional – Review the [Model Context Protocol](/agents/glossary/#model-context-protocol) and the related Mendix modules: [MCP Server module](/agents/agents-kit-1/reference-guide/mcp-modules/mcp-server/) and [MCP Client module](/agents/agents-kit-1/reference-guide/mcp-modules/mcp-client/)

## Setting Up Your Application

{{% alert color="info" %}}
This guide uses the Mendix Cloud GenAI Connector for text generation. You can also use alternative [supported connectors](/agents/agents-kit-1/#connectors), such as [Amazon Bedrock](/agents/agents-kit-1/reference-guide/external-connectors/bedrock/) or [OpenAI](/agents/agents-kit-1/reference-guide/external-connectors/openai/). For knowledge base operations, this guide uses the Mendix Cloud Knowledge Base, but the [pgVector Knowledge Base](/agents/agents-kit-1/reference-guide/external-connectors/pgvector/) is also supported. As long as you configure access to a provider and knowledge base according to the connector documentation, and the knowledge base supports inserting chunks from a microflow, the remaining steps in this guide apply.
{{% /alert %}}

If you are using a GenAI starter app such as the Blank GenAI Starter App, you can skip ahead to [Creating the Agent's Functional Prerequisites](#creating-functional-prerequisites) because the following setup steps are completed by default. Otherwise, follow these steps to add the required modules and configuration to your app:
If you are using a GenAI starter app such as the Blank GenAI App, you can skip ahead to [Creating the Agent's Functional Prerequisites](#creating-functional-prerequisites) because the following setup steps are completed by default. Otherwise, follow these steps to add the required modules and configuration to your app:

1. Set your app's [security level](/refguide/app-security/) to **Production**.
2. Install the [GenAI Commons](https://marketplace.mendix.com/link/component/239448), [Agent Commons](https://marketplace.mendix.com/link/component/240371), [Mendix Cloud GenAI Connector](https://marketplace.mendix.com/link/component/239449), and [ConversationalUI](https://marketplace.mendix.com/link/component/239450) modules from Marketplace. You also need to install their dependencies, including [MCP Client](https://marketplace.mendix.com/link/component/244893), [Community Commons](https://marketplace.mendix.com/link/component/170), and [Encryption](https://marketplace.mendix.com/link/component/1011).
Expand Down
Loading