Skip to content

Commit 3555a9f

Browse files
committed
Proofreading: AgentEditor
1 parent e45ee5a commit 3555a9f

1 file changed

Lines changed: 32 additions & 39 deletions

File tree

content/en/docs/marketplace/genai/reference-guide/agent-editor.md

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,29 @@ weight: 20
99
## Introduction
1010

1111
The [Agent Editor](https://marketplace.mendix.com/link/component/257918) module enables users to develop, test, and optimize their GenAI use cases by creating effective agents that interact with large language models (LLMs).
12-
With the Agent Editor module, you can define agents at design time in Studio Pro (11.9.0 and higher), and manage their lifecycle as part of your project, by taking advantage of existing platform capabilities such as Model documents, version control, and deployment capabilities. Agents can be defined and developed locally and subsequently deployed to cloud environments directly with the app model.
12+
With the Agent Editor module, you can define agents at design time in Studio Pro (11.9.0 and above), and manage their lifecycle as part of your project, by taking advantage of existing platform capabilities such as Model documents, version control, and deployment capabilities. Agents can be defined and developed locally and subsequently deployed to cloud environments directly with the app model.
1313

1414
The Agent Editor is compatible with the Agent Commons module: you can define and manage prompts, microflows (as tools), external MCP servers, knowledge bases, and large language models to build agentic patterns that support your business logic. Additionally, it allows you to define variables that act as placeholders for data from the app session context, which are replaced with actual values when the end user interacts with the app.
1515

1616
The Agent Editor module includes a Studio Pro extension that allows users to define GenAI Agents as documents in the app model. The Agent Editor Commons module, which is installed as part of the same package, includes logic and activities to call these agents from microflows in a running application.
1717

18-
1918
{{% alert color="info" %}}
2019
Currently, Agent Editor supports only Mendix Cloud GenAI as provider. Support for other providers, such as (Azure) OpenAI and Amazon Bedrock, is planned for future releases.
2120
{{% /alert %}}
2221

23-
24-
2522
### Typical Use Cases {#use-cases}
2623

2724
Typical use cases for Agent Editor include:
2825

29-
* Defining and maintaining agent behavior as part of the app model in Studio Pro, including prompts, models, tools, and knowledge bases.
26+
* Defining and maintaining agent behavior as part of the app model in the Studio Pro, including prompts, models, tools, and knowledge bases.
3027

3128
* Building agentic patterns directly in a Mendix app that rely on LLM interactions, microflow tools, MCP services, and knowledge base retrieval, while keeping configuration close to the application logic.
3229

3330
* Supporting team-based development workflows where agent definitions are version-controlled, reviewed, tested locally, and deployed together with the app to cloud nodes.
3431

35-
3632
### Features {#features}
37-
The Agent Editor helps teams design, test, and ship agents as part of their app lifecycle in Studio Pro.
33+
34+
The Agent Editor helps teams design, test, and ship agents as part of their app lifecycle in the Studio Pro.
3835

3936
It provides the following features:
4037

@@ -70,10 +67,9 @@ In addition, make sure the following widgets are available in your project:
7067
* [Events Widget](https://marketplace.mendix.com/link/component/224259)
7168
* [Markdown Viewer Widget](https://marketplace.mendix.com/link/component/230248)
7269

73-
7470
## Installation {#installation}
7571

76-
If you are starting from a blank app or adding agent-editing functionality to an existing project, you need to manually install the [Agent Editor](https://marketplace.mendix.com/link/component/257918) package from the Mendix Marketplace. After download, you might see a warning asking for permission to add an extension to your app. Make sure to click `Trust module and enable extension` in the popup for the agent editor to be installed.
72+
If you are starting from a blank app or adding agent-editing functionality to an existing project, you need to manually install the [Agent Editor](https://marketplace.mendix.com/link/component/257918) package from the Mendix Marketplace. After download, you might see a warning asking for permission to add an extension to your app. Make sure to click **Trust module and enable extension** in the popup to install the Agent Editor.
7773
Before proceeding, ensure your project includes the latest versions of the required [dependencies](#dependencies). Follow the instructions in [How to Use Marketplace Content](/appstore/use-content/) to install the Agent Editor.
7874

7975
After installation, two modules are added to your app:
@@ -88,18 +84,18 @@ The detailed functionality of these modules is explained in the following sectio
8884
After installing the modules, complete the following setup before defining model and Agent documents:
8985

9086
1. Exclude the `/agenteditor` folder from version control.
91-
In Studio Pro, go to **App** > **Show App Directory in Explorer**. Then in the file explorer, edit the `.gitignore` file and add `/agenteditor` on a new line. This folder contains log files and should typically not be tracked in Git.
87+
In the Studio Pro, go to **App** > **Show App Directory in Explorer**. Then, in the file explorer, edit the `.gitignore` file and add `/agenteditor` on a new line. This folder contains log files and should typically not be tracked in Git.
9288
2. Ensure the encryption key is configured in the **App** > **Settings** > **Configuration** in Studio Pro.
9389
Make sure that it is 32 characters long. For more information, see the [EncryptionKey Constant](/appstore/modules/encryption/#encryptionkey-constant) section of *Encryption*.
9490
3. Configure startup import logic.
9591
Select `ASU_AgentEditor` as your [after-startup microflow](/refguide/runtime-tab/#after-startup) in **App** > **Settings** > **Runtime**, or add it to your existing after-startup microflow.
9692

97-
9893
## Configuration {#configuration}
94+
9995
To use the Agent Editor functionalities in your app, you must perform the following tasks in Studio Pro:
10096

10197
1. Define the model.
102-
2. Define the agent with a prompt, context entity and model settings.
98+
2. Define the agent with a prompt, context entity, and model settings.
10399
3. Define and add tools and knowledge bases.
104100
4. Test the agent.
105101
5. Include the agent in the app logic.
@@ -108,8 +104,7 @@ To use the Agent Editor functionalities in your app, you must perform the follow
108104

109105
For a step by step tutorial, check out the [create your first agent](https://docs.mendix.com/appstore/modules/genai/how-to/howto-single-agent/#define-agent-editor) documentation.
110106

111-
112-
### Define the model {#define-model}
107+
### Defining the Model {#define-model}
113108

114109
With the Agent Editor, you can define the model as a document in your app model. This model can then be linked to one or more agents in your project.
115110

@@ -119,43 +114,42 @@ At this moment, only models provided by Mendix Cloud GenAI are supported.
119114

120115
Model configuration is document-based and can be managed directly in Studio Pro:
121116

122-
* A Model document can be added from the **App Explorer** at module level. Therefore, right-click on the module or folder where you want to create your Model document, select `Add other` and find Model in the bottom section.
117+
* A Model document can be added from the **App Explorer** at module level. Right-click on the module or folder where you want to create your Model document, select **Add other** and find Model in the bottom section.
123118
* The **Model key** must be configured with a String constant that contains the key for a Text Generation resource. This key can be obtained in the [Mendix Cloud GenAI Portal](https://genai.home.mendix.com).
124119
* After the key is selected, model metadata is imported and shown in the editor.
125-
* The connectivity can be validated in the **Connection** section by using the **Test** button.
120+
* You can validate the connectivity in the **Connection** section by using the **Test** button.
126121

127122
{{% alert color="info" %}}
128-
The value you use for the constant in Studio Pro can be different from the value used in cloud environments. Constant values can be overridden per environment during deployment. This for example means that you can locally connect to a text generation resource using a different key than the one used for production.
123+
The value you use for the constant in the Studio Pro can be different from the value used in cloud environments. Constant values can be overridden per environment during deployment. This, for example, means that you can locally connect to a text generation resource using a different key than the one used for production.
129124
{{% /alert %}}
130125

131-
132-
### Define the agent with a prompt, context entity and model settings {#define-agent}
126+
### Defining the Agent With a Prompt, Context Entity and Model Settings {#define-agent}
133127

134128
After defining the model, define the Agent document and configure the prompts and context. This configuration is mandatory for the agent to run.
135129

136130
Defining an agent is also document-based and can be configured using the Agent editor:
137131

138-
* An Agent document can be added from the **App Explorer** at module level. Therefore, right-click on the module or folder where you want to create your Model document, select `Add other` and find Agent in the bottom section.
139-
* To call a text generation resource, a Model document must be selected for the agent.
140-
* The **System prompt** and **User prompt** must be configured for task-style execution. In these prompts, placeholders can be defined with double braces (for example, `{{variable}}`).
141-
* When placeholders are used, a **Context entity** must be selected so values can be resolved at runtime. The placeholders used within the prompts, need to match with the attribute names of the entity selected, so that attribute values can be inserted instead of the placeholders at runtime.
142-
* Optionally, the **Model settings** can be adjusted as needed (maximum tokens, temperature, and TopP), based on the supported ranges of the model provider.
132+
* Add An Agent document can from the **App Explorer** at module level. Right-click on the module or folder where you want to create your Model document, select **Add other** and find Agent in the bottom section.
133+
* Select a Module document for an agent to call a text generation resource.
134+
* Configure the **System prompt** and **User prompt** for task-style execution. In these prompts, define placeholders with double braces (for example, `{{variable}}`).
135+
* When placeholders are used, select a **Context entity** to resolve values at runtime. The placeholders used within the prompts, need to match with the attribute names of the entity selected, so that attribute values can be inserted instead of the placeholders at runtime.
136+
* Optionally, adjust the **Model settings** as needed (maximum tokens, temperature, and TopP), based on the supported ranges of the model provider.
143137

144-
You can also check out our template agents, which you can find in the **USE_ME** folder of the `AgentEditorCommons` module.
138+
You can also check out template agents in the **USE_ME** folder of the **AgentEditorCommons** module.
145139

146140
{{% alert color="info" %}}
147-
Both **System prompt** and **User prompt** are currently mandatory because Agent Editor currently supports task-based agents only. Chat-based agents will be supported by the Agent Editor in a future release.
141+
Both **System prompt** and **User prompt** are currently mandatory, as the Agent Editor supports only task-based agents at this time. Support for chat-based agents will be introduced in a future release.
148142
{{% /alert %}}
149143

150144
For more information about prompts and prompt engineering, see [Prompt Engineering](/appstore/modules/genai/prompt-engineering/).
151145

152146
Selecting a model is mandatory. You can save the document without it, but if model configuration is incomplete, Studio Pro will show consistency errors. These errors block running the app locally, cloud deployment, and agent testing in later steps.
153147

154-
### Define and add tools and knowledge bases {#define-tools}
148+
### Defining and Adding Tools and Knowledge Bases{#define-tools}
155149

156150
To extend the capabilities of your agent, you can add tools directly in the Agent editor. In the Agent Editor, microflows and (external) MCP services can be added as tools to let the agent act dynamically and autonomously, or to access specific data based on input it determines. When the agent is invoked, it uses the function calling pattern to execute the required microflow by using the input specified in the model response. For more technical details about microflow tools and function calling behavior, see [Function Calling](/appstore/modules/genai/function-calling/).
157151

158-
#### Configure Consumed MCP Service {#define-mcp}
152+
#### Configuring Consumed MCP Service {#define-mcp}
159153

160154
To use MCP tools, first create a consumed MCP service document in your module by selecting **Add other** > **Consumed MCP service** in the **App Explorer**.
161155

@@ -169,20 +163,20 @@ To validate the configuration, click **List tools** in the **Tools** section of
169163

170164
In the consumed MCP service playground, authentication headers are used only to explore tools from Studio Pro and are not stored. Setup a credentials microflow to pass authentication headers at runtime.
171165

172-
#### Add Tools to the Agent {#add-tools}
166+
#### Adding Tools to the Agent {#add-tools}
173167

174-
Tools can then be added in the **Tools** section of the Agent editor by clicking **New** and selecting a tool type.
168+
Add Tools can in the **Tools** section of the Agent editor by clicking **New** and selecting a tool type.
175169

176170
You can choose from the following tool types:
177171

178-
* **Microflow tool**: Select a microflow that returns a string. Provide a **Name** and **Description** so the LLM can determine when to use the tool.
172+
* **Microflow tool**: Select a microflow that returns a string. Provide a **Name** and **Description** so that the LLM can determine when to use the tool.
179173
* **MCP tool**: Select a consumed MCP service in the tool configuration.
180174

181175
In the Agent editor, tools can be temporarily disabled and re-enabled by using the **Active** checkbox. This is useful while iterating and testing the agent behavior with different tool combinations or descriptions. Only enabled tools will be usable by the agent at runtime when called in the app.
182176

183177
Configure [tool choice](/appstore/modules/genai/reference-guide/genai-commons/#enum-toolchoice) to control how the agent behaves with regards to tool calling.
184178

185-
#### Configure Knowledge Base Document {#define-knowledgebase}
179+
#### Configuring Knowledge Base Document {#define-knowledgebase}
186180

187181
Knowledge bases are configured as separate documents and can then be linked to agents.
188182

@@ -194,28 +188,27 @@ In the Knowledge base editor:
194188

195189
* Set **Knowledge base key** by creating or selecting a String constant in your module.
196190
* After selecting the key, verify that knowledge base details are imported and shown.
197-
* Optionally, click **List collections** to test the connection and display the available collections from the knowledge base resource in **Configured Collections**.
191+
* Optionally, click **List collections** to test the connection and see the available collections from the knowledge base resource under the **Configured Collections**.
198192

199-
#### Link Knowledge Bases to the Agent {#add-knowledgebase}
193+
#### Linking Knowledge Bases to the Agent {#add-knowledgebase}
200194

201195
To link a knowledge base to an agent, use the **Knowledge bases** section in the Agent editor and click **New**.
202196

203197
In the knowledge base entry:
204198

205199
* Select the configured knowledge base document in **Knowledge base**.
206-
* In **Collection**, select one of the available collections from the dropdown, or type/paste a collection name to reference a collection that does not exist yet.
200+
* In **Collection**, select one of the available collections from the dropdown, type, or paste a collection name to reference a collection that does not exist yet.
207201
* Provide **Name** and **Description** so the LLM can determine when this knowledge base should be used. This serves the same purpose as naming for tools.
208202
* Optionally configure retrieval settings:
209-
* **Max results** controls the maximum number of chunks returned in a single retrieval.
210-
* **Min similarity** sets the cosine-similarity threshold between 0 and 1. Higher values (for example, 0.8) are stricter than lower values (for example, 0.2).
203+
* **Max results** controls the maximum number of chunks returned in a single retrieval.
204+
* **Min similarity** sets the cosine-similarity threshold between 0 and 1. Higher values (for example, 0.8) are stricter than lower values (for example, 0.2).
211205

212206
Knowledge base links can also be temporarily disabled and re-enabled by using the **Active** checkbox, which helps when comparing retrieval behavior during rapid iteration. Only enabled knowledge bases will be usable by the agent at runtime when called in the app.
213207

214208
{{% alert color="info" %}}
215-
In this release, MCP tools support whole-server integration only. Selecting individual tools from the server is not yet supported.
209+
Currently, MCP tools support whole-server integration only. Selecting individual tools from the server is not yet supported.
216210
{{% /alert %}}
217211

218-
219212
### Test the agent {#test-agent}
220213

221214
The Agent editor provides a **Test** button to execute test calls by using your local app runtime.

0 commit comments

Comments
 (0)