Agent Builder Starter App
Overview
Build your own agents with this starter app, which comes with all components of Mendix Agents Kit to help you build smart, agentic AI apps with Mendix.
The Agent Builder comes with a template for a conversational support agent (MyFirstSupportAgent) which is grounded in private knowledge like static reference guides and can take advantage of live data in the app, like tickets. It serves as a practical example of how to leverage the capabilities of platform-supported modules in a unified use case, providing a solid foundation to explore and kickstart the implementation of your own agent.
Key highlights & customization opportunities:
- Take advantage of all the capabilities of Conversational UI, and the GenAI Commons and Agent Commons modules. Agents created with the Agent Builder are fully integrated & compatible with these components.
- System Prompt Adaptation and Function calling: Modify your agent's prompts, available functions and knowledge bases to leverage in-app data and perform actions on behalf of the user within the chat.
- Conversation Starters: Tailor the suggested conversation starters to fit your specific use cases.
- UI: Redesign the chatbot and overview pages to align with your needs and branding.
- Custom Agent Logic: Integrate custom pre- or post-processing logic into the action microflow that interacts with the Large Language Model (LLM) to refine and control the interaction between the agent and the end-user.
- Private Data Integration: Combine in-app and external data sources using Function Calling, RAG, and Knowledge Base interactions to provide contextually rich and more accurate responses.
- Bring your own knowledge base: seamlessly integrate it into the support agent logic.
- LLM Provider Flexibility: Use any of the supported connectors to leverage a variety of large language models in your agent from OpenAI, Amazon Bedrock, Mendix Cloud or Bring Your Own.
Explore the full potential of generative and agentic AI in your Mendix applications with this starter app template and start building today!
Contact Us
For support and questions, feel free to reach out via email genai-components-feedback@mendix.com or Community Slack.
Documentation
Introduction
This starter app contains Agent Commons and all other dependencies needed to create agents. It is set up with a Support Agent template to show how it works. It allows developers and prompt engineers to collaborate and build agentic systems.
First-time Support Agent setup
To experience full functionality using Mendix Cloud GenAI resources, you need to obtain and import keys for Mendix Cloud GenAI resources (Text Generation model and a Knowledge base).
For (Azure) OpenAI and Amazon Bedrock text generation & embeddings models, you can hook up a PostgreSQL database as a knowledge base using the included PgVectorKnowledgeBase module.
1a. Configure the LLM
Make sure the encryption key is set, run the app & login as an administrator.
- To use Mendix Cloud GenAI you need to obtain and import keys for Mendix Cloud GenAI resources. You will need to import two key, one for a text generation resource and one for a knowledge base.
- To use Amazon Bedrock models, configure your credentials (see AWS Authentication) before starting the application. Only the AWS region and whether to use static credentials can be selected at runtime (check out which models are available in which region, see AWS Model Support).
- To use (Azure) OpenAI models, configure access to OpenAI or Azure OpenAI at runtime (see OpenAI Configuration for details).
1b. Configure the PgVector Knowledge Base (optional, but recommended for Amazon Bedrock or (Azure) OpenAI models)
To experience the full set of the GenAI functionalities that are currently possible in a Mendix app, connecting to a knowledge base is needed. If you use Mendix Cloud, this is part of 1a.
For (Azure) OpenAI and Amazon Bedrock, the connection to your PostgreSQL server needs to be configured at runtime, for more information, see PgVector Knowledge Base.
2. Configure the App settings (optional, but recommended)
In the app settings, you can select which knowledge base (configured in step 1a (Mendix Cloud) or 1b (PgVector)) to use within in the app.
3. Agent configuration
The app contains a pre-configured support agent. Click on the in-use version in the version dropdown and select a text generation model from step 1a, you want to use. You can also create make changes to your agent by creating a new version. In order for the version to be used in the app, you need to set it as in-use.
4. Populate the Knowledge Base
This is a one-time manual initialization action that must be executed, if applicable, after the knowledge base has been configured in steps 2 and 3. That way the knowledge base is in sync with the Mendix app data and the support agent can search through historical tickets and reference guides.
Defining new Agents
- Use the demo user switcher to login as demo_administrator.
- On the Admin homepage, go to Agent configuration.
- Create and edit agents at runtime. Write the prompts, use variable placeholders, add microflows as tools and connect knowledge bases to define the tasks and capabilities of the agents.
- Configure the deployed model (LLM) that the agent should use, and connect the agent to it.
- Create various versions of the agents and test in an isolated setup to rapidly iterate, compare and evaluate the agentic behavior
- Set a version as "in use" to allow it to be called from the actual logic in the app.
- Use the user switcher to login as a demo_user account and try out the agent in the app!