diff --git a/content/en/docs/genai/v2/_index.md b/content/en/docs/genai/v2/_index.md index 71767bd3c42..8629b83e366 100644 --- a/content/en/docs/genai/v2/_index.md +++ b/content/en/docs/genai/v2/_index.md @@ -37,9 +37,9 @@ The following components are available in Agents Kit 2. | Module | Description | Latest Released Version | | --- | --- | --- | | [Agent Commons](/agents/agents-kit-2/reference-guide/agent-commons/) | Build agentic functionality by defining, testing, and evaluating agents at runtime. Iterate on prompts and agent configurations without app redeployment through the integrated Agent Builder UI. | 4.4.0 | -| [Agent Editor](/agents/agents-kit-2/reference-guide/agent-editor/) | Define agents as version-controlled documents in Studio Pro at design time. Author prompts, configure tools and knowledge bases, test locally, and deploy agents as part of your app model. | 2.7.0 | +| [Agent Editor](/agents/agents-kit-2/reference-guide/agent-editor/) | Define agents as version-controlled documents in Studio Pro at design time. Author prompts, configure tools and knowledge bases, test locally, and deploy agents as part of your app model. | 2.8.0 | | [Conversational UI](/agents/agents-kit-2/reference-guide/conversational-ui/) | Create chat interfaces for full-screen, sidebar, or modal GenAI conversations. Monitor token consumption and trace interactions with UI features built on GenAI Commons. | 7.4.0 | -| [GenAI Commons](/agents/agents-kit-2/reference-guide/commons/) | Integrate GenAI connectors with other modules using common capabilities provided by this base module. Required dependency for both core and connector modules. You can also implement your own connector based on this module. | 7.3.0 | +| [GenAI Commons](/agents/agents-kit-2/reference-guide/commons/) | Integrate GenAI connectors with other modules using common capabilities provided by this base module. Required dependency for both core and connector modules. You can also implement your own connector based on this module. | 7.4.0 | ### Connector Modules {#connectors} @@ -48,10 +48,10 @@ All connectors depend on GenAI Commons and can be used with the other [core modu | Module | Description | Latest Released Version | | --- | --- | --- | | [Amazon Bedrock Connector](/agents/agents-kit-2/reference-guide/external-connectors/bedrock/) | Connect to Amazon Bedrock. | 11.3.0 | -| [Google Gemini Connector](/agents/agents-kit-2/reference-guide/external-connectors/gemini/) | Connect to Google Gemini. | 2.2.0 | +| [Google Gemini Connector](/agents/agents-kit-2/reference-guide/external-connectors/gemini/) | Connect to Google Gemini. | 2.3.0 | | [Mendix Cloud GenAI Connector](/agents/agents-kit-2/mx-cloud-genai/mxgenai-connector/) | Connect to Mendix Cloud and use Mendix Cloud GenAI resource packs directly within your Mendix application. | 7.4.0 | -| [Mistral Connector](/agents/agents-kit-2/reference-guide/external-connectors/mistral/) | Connect to Mistral AI. | 2.2.0 | -| [OpenAI Connector](/agents/agents-kit-2/reference-guide/external-connectors/openai/) | Connect to OpenAI and Microsoft Foundry. | 9.4.0 | +| [Mistral Connector](/agents/agents-kit-2/reference-guide/external-connectors/mistral/) | Connect to Mistral AI. | 2.3.0 | +| [OpenAI Connector](/agents/agents-kit-2/reference-guide/external-connectors/openai/) | Connect to OpenAI and Microsoft Foundry. | 9.5.0 | | [PgVector Knowledge Base](/agents/agents-kit-2/reference-guide/external-connectors/pgvector/) | Manage and interact with a PostgreSQL PgVector knowledge base. | 7.1.0 | ### MCP Modules {#mcp-modules} diff --git a/content/en/docs/genai/v2/how-to/byo_connector.md b/content/en/docs/genai/v2/how-to/byo_connector.md index 2547a4753f6..2e8b064e0a1 100644 --- a/content/en/docs/genai/v2/how-to/byo_connector.md +++ b/content/en/docs/genai/v2/how-to/byo_connector.md @@ -47,7 +47,8 @@ If your provider's API is identical or very similar to OpenAI's, you may be able * Small changes in the request/response payload (for example, extra or fewer fields, slightly different JSON structure) * Modifying the base URL to align with the provider's endpoint structure * Adding additional query parameters in the URL or payload -* Adapting the authentication mechanism (for example, switching from API Key to OAuth) + +For token-based authentication, such as OAuth, you do not need to change the authentication mechanism. The OpenAI connector can get the HTTP headers that authorize a request from a microflow before every request. For more information, see [Authenticating with a Microflow](/agents/agents-kit-2/reference-guide/external-connectors/openai/#get-credentials-microflow). This approach reuses a well-structured connector, minimizes development effort, and ensures compatibility with [ConversationalUI](/agents/agents-kit-2/reference-guide/conversational-ui/) and [GenAICommons](/agents/agents-kit-2/reference-guide/commons/). @@ -122,6 +123,8 @@ To enable seamless model invocation, Mendix recommends creating an entity to sto When storing sensitive authentication data, use encryption methods to keep the application secure. The Echo connector implementation in the GenAI Showcase App provides an example of this setup. +Some credentials, such as short-lived OAuth access tokens or tokens that are specific to the current user, change more often than an administrator can update a `Configuration` object. For these cases, consider letting app developers select a microflow that returns the credentials, and run it before every request to the provider. The OpenAI connector uses this pattern: its `GetCredentialsMicroflow` returns a list of `System.HttpHeader` objects, which the connector adds to each request. To store the name of such a microflow, you can use the `GetCredentialsMicroflow` attribute of the `GenAICommons.ConsumedModelResource` entity. For more information, see [Authenticating with a Microflow](/agents/agents-kit-2/reference-guide/external-connectors/openai/#get-credentials-microflow) in the OpenAI connector documentation. + #### Microflow Set the `Microflow` attribute in the generic `DeployedModel` entity when creating or saving `DeployedModel` objects. This attribute determines which microflow executes when invoking `ChatCompletions_WithHistory` and ensures that the correct process runs based on the specified microflow. This design keeps the action provider-agnostic and allows different models to integrate seamlessly as long as they follow the same `request-in` and `response-out` interface. diff --git a/content/en/docs/genai/v2/reference-guide/agent-editor.md b/content/en/docs/genai/v2/reference-guide/agent-editor.md index e543bef7c37..83af7578258 100644 --- a/content/en/docs/genai/v2/reference-guide/agent-editor.md +++ b/content/en/docs/genai/v2/reference-guide/agent-editor.md @@ -144,8 +144,17 @@ Model configuration is document-based and can be managed directly in Studio Pro: #### For Azure AI Foundry {#define-model-azure} -* Configure the **Project endpoint** and **API key**, each with a String constant. Obtain the **Project endpoint** and **API key** from the [Azure AI Foundry Portal](https://ai.azure.com/home). For more information, refer to [OpenAI Connector](/agents/agents-kit-2/reference-guide/external-connectors/openai/#azure-resource-name). -* Click **List Deployments** to validate the connectivity. A table shows all the available model deployments in the Azure AI resource. Note that only deployments that support chat completions are currently usable by Agents in a Mendix app. +Select the **Authentication** type and configure the fields for that type: + +* **API key** – Authenticate with an Azure API key. + * Configure the **Project endpoint** and **API key**, each with a String constant. Obtain the **Project endpoint** and **API key** from the [Azure AI Foundry Portal](https://ai.azure.com/home). For more information, refer to [OpenAI Connector](/agents/agents-kit-2/reference-guide/external-connectors/openai/#azure-resource-name). + * Click **List deployments** to validate the connectivity. A table shows all the available model deployments in the Azure AI resource. Note that only deployments that support chat completions are currently usable by Agents in a Mendix app. +* **Microflow** – Get the credentials from a microflow at runtime. Use this type when your organization requires other credentials than an API key, such as Microsoft Entra ID tokens, or when requests go through an API gateway, such as Azure API Management. + * Configure the **Endpoint** with a String constant. The endpoint is the base URL in front of `/openai`, for example, `https://your-resource-name.openai.azure.com` or the URL of your API gateway. Do not use a project endpoint. + * Select a **Credentials microflow** that returns the HTTP headers to authenticate requests. The microflow must return a list of `System.HttpHeader` objects and have either no input parameters or a single `OpenAIConnector.Configuration` parameter. For more information, see [Authenticating with a Microflow](/agents/agents-kit-2/reference-guide/external-connectors/openai/#get-credentials-microflow). + * In the **Deployments** section, click **Add deployment** to add each deployment name that agents and evaluators can select. Enter each deployment name exactly as it appears in Azure. You can copy and paste the names directly from Azure. With this authentication type, deployments cannot be listed automatically. + + The playground in Studio Pro calls the credentials microflow without a signed-in user. If the microflow relies on credentials of the signed-in user, such as the user's Microsoft Entra token, testing the agent in the playground fails. To test in the playground, make the microflow return other credentials when no user is signed in, for example, an app token. Alternatively, test the agent in the running app as a signed-in user. {{% alert color="info" %}} The value you use for a constant in Studio Pro can be different from the value used in cloud environments. Constant values can be overridden per environment during deployment. For example, you can locally connect to a text generation resource using a different key than the one used for production. @@ -327,6 +336,8 @@ To add tools, click **New** in the **Tools** section and configure the following This error is typically due to incorrect model configuration or an exception originating from the API call of the large language model. Check the **Console** pane in Studio Pro for detailed logs. Additionally, verify that the `ASU_AgentEditor` microflow is added to your after-startup logic as described in the [First-Time Setup](#setup) section, and that the app startup has completed fully. +If the agent uses an Azure AI Foundry model with the **Microflow** authentication type, check that the credentials microflow returns valid headers when no user is signed in. For more information, see the [For Azure AI Foundry](#define-model-azure) section. + ### Testing the Agent From Studio Pro Is Disabled Executing a test requires a running local app and synchronized Agent documents to the runtime. Make sure the app has been deployed locally after the last change in any agent-related document. diff --git a/content/en/docs/genai/v2/reference-guide/external-platforms/gemini.md b/content/en/docs/genai/v2/reference-guide/external-platforms/gemini.md index 1a3931a99c2..3ad7601fc51 100644 --- a/content/en/docs/genai/v2/reference-guide/external-platforms/gemini.md +++ b/content/en/docs/genai/v2/reference-guide/external-platforms/gemini.md @@ -65,7 +65,9 @@ The following inputs are required for the Gemini configuration: | ----------- | ------------------------------------------------------------ | | Display name | This is the name identifier of a configuration (for example, *MyConfiguration*). | | Endpoint | This is the API endpoint (for example, `https://generativelanguage.googleapis.com/v1beta/openai/`) | -| Token | This is the access token to authorize your API call.
To get an API key, follow the steps mentioned in the [Gemini API quickstart](https://ai.google.dev/gemini-api/docs/quickstart). | +| Authentication type | This is the way your API calls are authorized. Select **API Key** to use a stored API key, or **Microflow** to get the credentials from a microflow before each request. | +| Token | This is the access token to authorize your API call. It is only used for the **API Key** authentication type.
To get an API key, follow the steps mentioned in the [Gemini API quickstart](https://ai.google.dev/gemini-api/docs/quickstart). | +| Get credentials microflow | This is the microflow that returns the HTTP headers to authorize your API call. It is only used for the **Microflow** authentication type. The microflow must return a list of `System.HttpHeader` objects and can have either no input parameters or a single input parameter of type `GoogleGeminiConnector.GeminiConfiguration` or `OpenAIConnector.Configuration`. For more information, see [Authenticating with a Microflow](/agents/agents-kit-2/reference-guide/external-connectors/openai/#get-credentials-microflow) in the OpenAI connector documentation. | #### Configuring the Gemini Deployed Models diff --git a/content/en/docs/genai/v2/reference-guide/external-platforms/mistral.md b/content/en/docs/genai/v2/reference-guide/external-platforms/mistral.md index 6db0e0d3d71..5898b58e6d0 100644 --- a/content/en/docs/genai/v2/reference-guide/external-platforms/mistral.md +++ b/content/en/docs/genai/v2/reference-guide/external-platforms/mistral.md @@ -65,7 +65,9 @@ The following inputs are required for the Mistral configuration: | ----------- | ------------------------------------------------------------ | | Display name | The name identifier of a configuration (for example, *MyConfiguration*). | | Endpoint | The API endpoint (for example, `https://api.mistral.ai/agents-kit-1/`). | -| Token | The access token to authorize your API call.
To get an API key, see the [Quickstart](https://docs.mistral.ai/getting-started/quickstart). | +| Authentication type | The way your API calls are authorized. Select **API Key** to use a stored API key, or **Microflow** to get the credentials from a microflow before each request. | +| Token | Only for the **API Key** authentication type. The access token to authorize your API call.
To get an API key, see the [Quickstart](https://docs.mistral.ai/getting-started/quickstart). | +| Get credentials microflow | Only for the **Microflow** authentication type. The microflow that returns the HTTP headers to authorize your API call. The microflow must return a list of `System.HttpHeader` objects and can have either no input parameters or a single input parameter of type `MistralConnector.MistralConfiguration` or `OpenAIConnector.Configuration`. For more information, see [Authenticating with a Microflow](/agents/agents-kit-2/reference-guide/external-connectors/openai/#get-credentials-microflow) in the OpenAI connector documentation. | #### Configuring the Mistral Deployed Models diff --git a/content/en/docs/genai/v2/reference-guide/external-platforms/openai.md b/content/en/docs/genai/v2/reference-guide/external-platforms/openai.md index 7f460e3fc4d..9b63c704f8d 100644 --- a/content/en/docs/genai/v2/reference-guide/external-platforms/openai.md +++ b/content/en/docs/genai/v2/reference-guide/external-platforms/openai.md @@ -73,7 +73,9 @@ OpenAI configuration requires the following inputs: | Display name | The name identifier of a configuration (for example, *MyConfiguration*). | | API type | Select `OpenAI`. | | Endpoint | The API endpoint (for example, `https://api.openai.com/v1`). | -| Token | The access token to authorize your API call.
To get an API key, follow these steps:
  1. Create an account and sign in at [OpenAI](https://platform.openai.com/).
  2. Go to the [API key page](https://platform.openai.com/account/api-keys) to create a new secret key.
  3. Copy the API key and save this somewhere safe.
| +| Authentication type | The way your API calls are authorized. Select **API Key** to use a stored API key, or **Microflow** to get the credentials from a microflow before each request. For more information, see the [Authenticating with a Microflow](#get-credentials-microflow) section below. | +| Token | Only for the **API Key** authentication type. The access token to authorize your API call.
To get an API key, follow these steps:
  1. Create an account and sign in at [OpenAI](https://platform.openai.com/).
  2. Go to the [API key page](https://platform.openai.com/account/api-keys) to create a new secret key.
  3. Copy the API key and save this somewhere safe.
| +| Get credentials microflow | Only for the **Microflow** authentication type. The microflow that returns the HTTP headers to authorize your API call. For more information, see the [Authenticating with a Microflow](#get-credentials-microflow) section below. | #### Microsoft Foundry Configuration {#azure-openai-configuration} @@ -84,8 +86,9 @@ Microsoft Foundry configuration requires the following inputs: | Display name | The name identifier of a configuration (for example, *MyConfiguration*). | | API type | Select `AzureOpenAI` for Microsoft Foundry deployments. | | Endpoint | The API endpoint (for example, `https://your-resource-name.openai.azure.com/openai/deployments/`).
For details on how to obtain `your-resource-name`, see the [Obtaining Resource Name](#azure-resource-name) section below. | -| Azure key type | The type of token entered in the API key field. For Azure OpenAI, two types of keys are currently supported: Microsoft Entra token and API key.
For details on generating a Microsoft Entra access token, see [How to Configure Azure OpenAI Service with Managed Identities](https://learn.microsoft.com/en-gb/azure/ai-services/openai/how-to/managed-identity). Alternatively, if your organization allows it, you can use the Azure `api-key` authentication mechanism. For details on obtaining an API key, see the [Obtaining API Keys](#azure-api-keys) section below. For more information, see the [Technical Reference](#technical-reference) section. | -| Token / API key | The access token to authorize your API call. | +| Authentication type | The way your API calls are authorized. The following authentication types are supported:For more information, see the [Technical Reference](#technical-reference) section. | +| Token / API key | Only for the **Microsoft Entra token** and **API key** authentication types. The access token to authorize your API call. | +| Get credentials microflow | Only for the **Microflow** authentication type. The microflow that returns the HTTP headers to authorize your API call. | ##### Obtaining the Project Endpoint and Resource Name {#azure-resource-name} @@ -109,12 +112,29 @@ The steps below are intended for the Microsoft Foundry portal (released in 2026) | Display name | The name identifier of an Azure AI Search Resource (for example, *MySearchResource*). | | Endpoint URL | The API endpoint (for example, `https://your-resource-name.search.windows.net`).
For details on how to obtain `your-resource-name`, see [Azure AI Search service in the Azure portal](https://learn.microsoft.com/en-us/azure/search/search-create-service-portal). | | API version | The version of the REST API. | -| API key | The access token to authorize your API call. | +| Authentication type | The way your API calls are authorized. Select **API Key** to use a stored API key, or **Microflow** to get the credentials from a microflow before each request. For more information, see the [Authenticating with a Microflow](#get-credentials-microflow) section below. | +| API key | Only for the **API Key** authentication type. The access token to authorize your API call. | +| Get credentials microflow | Only for the **Microflow** authentication type. The microflow that returns the HTTP headers to authorize your API call. | After saving, the indexes in this resource are automatically synced and displayed in the configuration page. All indexes can be added to the request when using Chat completions. -{{% alert color="warning" %}} -Currently, the only supported authorization method for Azure AI Search resources is the API key. +#### Authenticating with a Microflow {#get-credentials-microflow} + +API keys work well for testing, but production apps often need other credentials, such as short-lived tokens from Microsoft Entra ID or another identity provider, tokens that are specific to the current user, or additional headers for an API gateway. These credentials change more often than an administrator can update a configuration. To provide them at runtime, set **Authentication type** to **Microflow** and select a microflow in the **Get credentials microflow** field. + +You can use a get credentials microflow for OpenAI configurations, Microsoft Foundry configurations, and Azure AI Search resources. Connectors that build on the OpenAI connector, such as the [Google Gemini connector](/agents/agents-kit-2/reference-guide/external-connectors/gemini/) and the [Mistral connector](/agents/agents-kit-2/reference-guide/external-connectors/mistral/), support it as well. + +The connector runs the microflow before every request to the API, for example, for chat completions, embeddings, image generation, and Azure AI Search calls. It adds the HTTP headers that the microflow returns to the request, instead of using a stored API key. This way, the credentials are valid at the moment the request is sent. + +The microflow must meet the following requirements: + +* It returns a list of `System.HttpHeader` objects. Each object contains the header name in the `Key` attribute and the header value in the `Value` attribute, for example, `Authorization` with the value `Bearer `. +* It has either no input parameters or a single input parameter that accepts the corresponding configuration object. For model resources, use `OpenAIConnector.Configuration` or a specialization, such as `GoogleGeminiConnector.GeminiConfiguration`. For Azure AI Search resources, use `OpenAIConnector.AzureAISearchResource`. + +The **Get credentials microflow** field only lists microflows that meet these requirements. If the microflow fails or returns no headers, the operation fails and the error is logged. + +{{% alert color="info" %}} +Because the microflow runs before every request, keep its logic fast. If you request tokens from an identity provider, consider reusing a token until it expires instead of requesting a new one for every call. Do not hard-code secrets in the microflow. Store them, for example, in constants or encrypted using the [Encryption module](/appstore/modules/encryption/). {{% /alert %}} #### Configuring the OpenAI Deployed Models diff --git a/content/en/docs/genai/v2/reference-guide/genai-commons.md b/content/en/docs/genai/v2/reference-guide/genai-commons.md index 835f920d14d..d3e052a0ef5 100644 --- a/content/en/docs/genai/v2/reference-guide/genai-commons.md +++ b/content/en/docs/genai/v2/reference-guide/genai-commons.md @@ -85,6 +85,18 @@ The `DeployedModel` entity replaces the capabilities that the `Connection` entit | `SupportsStreaming` | Enum to specify if the model supports calling the streaming API. | | `SupportsSystemPrompt` | Enum to specify if the model supports system prompts. | | `IsActive` | Boolean to specify if the model is active/usable with the current authentication settings and user preference. | +| `ModelDocumentID` | The ID of the model document for models created in Studio Pro. This is empty if the model was created in the running app. | +| `_QualifiedName` | The qualified name of the model document for models created in Studio Pro. | + +#### `ConsumedModelResource` {#consumed-model-resource} + +The `ConsumedModelResource` represents the connection details of a model provider, such as endpoints and credentials. Each connector module implements its own specialization, for example, the `Configuration` entity of the [OpenAI connector](/agents/agents-kit-2/reference-guide/external-connectors/openai/). Admins configure these objects at runtime, or they are created from model documents defined in Studio Pro. + +| Attribute | Description | +| --- | --- | +| `ModelDocumentID` | The ID of the model document for resources created in Studio Pro. This is empty if the resource was created in the running app. | +| `_QualifiedName` | The qualified name of the model document for resources created in Studio Pro. | +| `GetCredentialsMicroflow` | The name of an optional microflow that returns the credentials for calling the provider's API as a list of `System.HttpHeader` objects. If the microflow has an input parameter, it accepts the specialization. Whether and when the microflow is run depends on the connector. For the OpenAI connector, see [Authenticating with a Microflow](/agents/agents-kit-2/reference-guide/external-connectors/openai/#get-credentials-microflow). | #### `ConsumedKnowledgeBase` {#consumed-knowledge-base} @@ -102,9 +114,20 @@ The `ConsumedKnowledgeBase` entity was introduced in module version 6.0.0. To mi | `Architecture` | The architecture of the consumed knowledge base, for example, Mendix Cloud or Amazon Bedrock. | | `CollectionIdentifierLabel` | The name of a deployed knowledge base (collection) in the language of the provider (for example, **Index** for Azure Search Resources). This is used in the front end when building agents. | | `RetrievalMicroflow` | The microflow to retrieve information for the specified knowledge base resource. | -| `GetCollectionsMicroflow` | The microflow to run to retrieve selectable options for collections present in the specified consumed knowledge base. | -| `GetDeployedKnowledgeBaseMicroflow` | The microflow to retrieve selectable options for collections present in the specified consumed knowledge base. | +| `GetCollectionsMicroflow` | The microflow to run to retrieve selectable options for collections present in the specified consumed knowledge base. The microflow returns a list of [CollectionOption](#collection-option) objects. | +| `GetDeployedKnowledgeBaseMicroflow` | The microflow to retrieve the connector-specific specialization of `DeployedKnowledgeBase` based on the chosen collection identifier. | | `IsSelectable` | Boolean to specify if the knowledge base resource is active or usable when defining agents. | +| `ModelDocumentID` | The ID of the model document for knowledge bases created in Studio Pro. This is empty if the knowledge base was created in the running app. | +| `_QualifiedName` | The qualified name of the model document for knowledge bases created in Studio Pro. | + +#### `CollectionOption` {#collection-option} + +A `CollectionOption` represents a selectable collection of data (for example, an index) inside a [ConsumedKnowledgeBase](#consumed-knowledge-base). The microflow stored in the `GetCollectionsMicroflow` attribute of the consumed knowledge base returns a list of these objects, which are shown as options in the front end, for example, when building agents. + +| Attribute | Description | +| --- | --- | +| `Identifier` | The technical identifier of the collection. | +| `DisplayName` | The display name of the collection. | #### `DeployedKnowledgeBase` {#deployed-knowledge-base} @@ -120,7 +143,7 @@ The `DeployedKnowledgeBase` entity replaces the capabilities covered by the `Con | `Microflow` | The microflow to run to retrieve information for the specified knowledge base. | | `IsActive` | Boolean to specify if the knowledge base is active and usable with the current authentication settings and user preference. | -#### `InputModality` {#Usage} +#### `InputModality` {#input-modality} Accepted input modality of the associated deployed model. @@ -165,6 +188,8 @@ The data stored in this entity is to be used later on for traceability use cases | `HasError` | Indicates if any span call has failed. | | `_AgentVersionId` | The ID of the agent version (if applicable) as sent via the request. | | `_ConversationId` | The ID of the conversation (if applicable) as sent via the request. Usually created by the model provider. | +| `_AgentName` | The name of the agent (if applicable) as sent via the request. | +| `_AgentVersionNumber` | The version number of the agent (if applicable) as sent via the request. | #### `Span` {#span} @@ -199,7 +224,9 @@ A tool span is created for each tool call requested by the LLM. The tool call is | `ToolName` | The name of the tool that was called. | | `ToolDescription` | The description of the tool. | | `_ToolCallId` | The ID of the tool call used by the model to map an assistant message containing a tool call with the output of the tool call (tool message). | -| `ToolCallStatus` | The current status of the tool call. | +| `ToolCallStatus` | The current status of the tool call. For more information, see the [ENUM_ToolCallStatus](#enum-toolcallstatus) section. | +| `DisplayName` | The name of the tool as shown to users. This is the `DisplayTitle` of the [Tool](#tool), or its `Name` if no display title is set. | +| `DisplayDescription` | The description of the tool as shown to users. This is the `DisplayDescription` of the [Tool](#tool), or its `Description` if no display description is set. | #### `KnowledgeBaseSpan` {#knowledge-base-span} @@ -226,13 +253,16 @@ The `Request` is an input object for the chat completions operations defined in | Attribute | Description | | --- | --- | -| `_Id` | The unique identifier of the session. Reuse the same value to continue the same session. | +| `_ID` | The unique identifier of the session. Reuse the same value to continue the same session. | | `SystemPrompt` | Provides the model with context, instructions, or guidelines. | | `MaxTokens` | Maximum number of tokens per request. | | `Temperature` | Controls the randomness of the model response. Low values generate a more predictable output, while higher values allow creativity and diversity. Mendix recommends steering either the temperature or `TopP`, but not both. | | `TopP` | An alternative to temperature for controlling the randomness of the model response. `TopP` defines a probability threshold so that only words with probabilities greater than or equal to the threshold will be included in the response. Mendix recommends steering either the temperature or `TopP`, but not both. | | `ToolChoice` | Controls which (if any) tool is called by the model. For more information, see the [ENUM_ToolChoice](#enum-toolchoice) section containing a description of the possible values. | | `_AgentVersionId` | The `AgentVersionId`, set if the execution of the request was called from an Agent. | +| `_AgentName` | The name of the agent, set if the execution of the request was called from an Agent. | +| `_AgentVersionNumber` | The version number of the agent, set if the execution of the request was called from an Agent. | +| `_IsStudioProPlaygroundCall` | Set to *true* for requests created from the Agent Editor playground in Studio Pro to bypass certain features, such as human-in-the-loop settings. Do not set this manually. | | `SaveToolCallHistory` | Indicates if the tool calls are stored for later continuation (must be implemented). | | `UseStreamingAPI` | Indicates whether the LLM call uses streaming. | | `StreamingResponseWriterId` | Indicates whether streaming data is pushed to the UI. Do not set this manually. It is set in the backend only when a Conversational UI chat interface is used with an agent that has streaming enabled. | @@ -302,6 +332,10 @@ A tool of the type *function*. This is a specialization of [Tool](#tool) and rep | `MinimumSimilarity` | The minimum similarity score (usually 0-1) of the passed chunk and the knowledge chunks in the knowledge base. | | `MaxNumberOfResults` | The maximum number of results to retrieve from the knowledge base. | +#### `Computer` {#computer} + +A tool of the type *computer*. This is a specialization of [Tool](#tool) and represents a microflow that can communicate with a virtual machine to enable computer use. Computer use is a beta capability that is not supported by all providers and models. + #### `StopSequence` {#stopsequence} For many models, `StopSequence` can pass a list of character sequences (for example, a word) along with the request. The model stops generating content when a word from that list occurs next. @@ -316,7 +350,7 @@ The response returned by the model contains usage metrics and a response message | Attribute | Description | | --- | --- | -| `_ID_` | The unique identifier of the session. Reuse the same value to continue the same session. If no ID was set by the LLM connector, an internal ID is created. | +| `_ID` | The unique identifier of the session. Reuse the same value to continue the same session. If no ID was set by the LLM connector, an internal ID is created. | | `RequestTokens` | Number of tokens in the request. | | `ResponseTokens` | Number of tokens in the generated response. | | `TotalTokens` | Total number of tokens (request + response). | @@ -334,9 +368,10 @@ A tool call object may be generated by the model in certain scenarios, such as a | `ToolType` | The type of the tool. View AI provider documentation for supported types. | | `ToolCallId` | A model-generated ID of the proposed tool call. It is used by the model to map an assistant message containing a tool call with the output of the tool call (tool message). | | `Input` | The raw tool JSON input generated by the model, usually passed for external tools where no mapping to a microflow is required. | -| `Status` | The current status of the ToolCall to determine next steps and UI display. | +| `Status` | The current status of the ToolCall to determine next steps and UI display. For more information, see the [ENUM_ToolCallStatus](#enum-toolcallstatus) section. | | `ToolResult` | The result of the tool call. | | `IsError` | Indicates if the tool call failed. | +| `InternalToolType` | Internal attribute that helps to determine the type of tool. Do not use. | #### `Reference` {#reference} @@ -348,7 +383,7 @@ An optional reference for a response message. | `Content` | The content of the reference. | | `Source` | The source of the reference (for example, a URL). | | `SourceType` | The type of the source. For more information, see [ENUM_SourceType](#enum-sourcetype). | -| `Index` | Used to make references identifiable and sortable.| +| `_Index` | Used to make references identifiable and sortable.| #### `Citation` {#citation} @@ -587,7 +622,7 @@ Use this microflow to add a file to an existing [FileCollection](#filecollection | `URL` | String | Either URL or FileDocument is required. | The URL of the file. | | `FileDocument` | `System.FileDocument` | Either URL or FileDocument is required. | The file for which the contents are part of a message. | | `ENUM_FileType` | [ENUM_FileType](#enum-filetype) | mandatory | The type of the file. | -| `TextContent` | String | mandatory | An optional text content describing the file content or giving it a specific name. | +| `TextContent` | String | optional | An optional text content describing the file content or giving it a specific name. | ###### Return Value @@ -934,7 +969,7 @@ This microflow creates a new [MetadataCollection](#metadatacollection-entity) an | Name | Caption | Description | | --- | --- | --- | -| `URL` | **Url** | The content of the file can be found on a (publicly available) URL which is provided in the `FileContent` attribute. | +| `Url` | **Url** | The content of the file can be found on a (publicly available) URL which is provided in the `FileContent` attribute. | | `Base64` | **Base64** | The content of the file can be found as a base64-encoded string in the `FileContent` attribute. | #### `ENUM_FileType` {#enum-filetype} @@ -963,9 +998,23 @@ This microflow creates a new [MetadataCollection](#metadatacollection-entity) an | Name | Caption | Description | | --- | --- | --- | -| `HiddenForUser` | **HiddenForUser** | Automatic tool approval; tools are not shown to users. (default value) | -| `VisibleForUser` | **VisibleForUser** | Automatic tool approval; tools are visible to users. | -| `UserConfirmationRequired` | **UserConfirmationRequired** | User decides if tools are called or not. | +| `HiddenForUser` | **Hidden for User** | Automatic tool approval; tools are not shown to users. (default value) | +| `VisibleForUser` | **Visible for User** | Automatic tool approval; tools are visible to users. | +| `UserConfirmationRequired` | **User Confirmation Required** | User decides if tools are called or not. | + +#### `ENUM_ToolCallStatus` {#enum-toolcallstatus} + +`ENUM_ToolCallStatus` provides a list of statuses of a [ToolCall](#toolcall). The status determines whether a tool is executed and how the tool call is shown to users. The final status after execution depends on the `UserAccessApproval` of the [Tool](#tool). For more information, see the [ENUM_UserAccessApproval](#enum-useraccessapproval) section. + +| Name | Caption | Description | +| --- | --- | --- | +| `Pending` | **Pending** | The tool call has not been approved or declined yet. Tool calls that require user confirmation keep this status until the user decides. (default value) | +| `Approved` | **Approved** | The tool call was approved, either automatically or by the user, and the tool can be executed. | +| `Declined` | **Declined** | The user declined the tool call. The tool is not executed. | +| `ExecutedHidden` | **ExecutedHidden** | The tool was executed automatically and is not shown to users. | +| `ExecutedVisible` | **ExecutedVisible** | The tool was executed automatically and is shown to users. | +| `ExecutedApproved` | **ExecutedApproved** | The tool was executed after the user approved the tool call. | +| `ExecutedDeclined` | **ExecutedDeclined** | The user declined the tool call, and the model was informed that the tool call was declined. | #### `ENUM_SourceType` {#enum-sourcetype} diff --git a/static/attachments/genai/genaicommons/GenAICommons_domain_model.png b/static/attachments/genai/genaicommons/GenAICommons_domain_model.png index 9cb84e1b080..600171d7b0a 100644 Binary files a/static/attachments/genai/genaicommons/GenAICommons_domain_model.png and b/static/attachments/genai/genaicommons/GenAICommons_domain_model.png differ diff --git a/static/attachments/genai/genaicommons/genai-commons-domain-model-embeddings.png b/static/attachments/genai/genaicommons/genai-commons-domain-model-embeddings.png index b39d319351f..59846926515 100644 Binary files a/static/attachments/genai/genaicommons/genai-commons-domain-model-embeddings.png and b/static/attachments/genai/genaicommons/genai-commons-domain-model-embeddings.png differ diff --git a/static/attachments/genai/howto-byo/GenAICommons_DeployedModel_DM.png b/static/attachments/genai/howto-byo/GenAICommons_DeployedModel_DM.png index ce293fb7244..294a30a0c0c 100644 Binary files a/static/attachments/genai/howto-byo/GenAICommons_DeployedModel_DM.png and b/static/attachments/genai/howto-byo/GenAICommons_DeployedModel_DM.png differ diff --git a/static/attachments/genai/howto-byo/GenAICommons_TextFiles_DomainModel.png b/static/attachments/genai/howto-byo/GenAICommons_TextFiles_DomainModel.png index 7a5da25a38a..24da8e64717 100644 Binary files a/static/attachments/genai/howto-byo/GenAICommons_TextFiles_DomainModel.png and b/static/attachments/genai/howto-byo/GenAICommons_TextFiles_DomainModel.png differ