Part 2 of How to Build an AI Agent series with GMI Cloud
May 12, 2025

In Part 1, we laid the groundwork for our AI agent by defining the vision, use case, and success criteria. Now, it’s time to bring that vision to life. In this second installment, we’ll walk through the step-by-step process of building a minimum viable product (MVP) AI agent that helps users decide which industry conventions are worth attending based on relevance, cost, and potential ROI.
Let’s dive straight into the build.
Before building any functionality, we need a solid foundation for development. This includes selecting the right tools, configuring our environment, and setting up a workflow that enables rapid iteration.
Now, what about design? Here's the overall workflow from input to expected output:

We break each step down into individual modules in case for some reason we decide we want to shift things around. The framework enables flexibility and allows different parts of the system—like content retrieval or return on investment (ROI) scoring—to evolve independently without breaking the rest of the system.
Or so we hope!
For our purposes, we'll use a GMI-hosted LLM endpoint with OpenAI API compatibility, but you can do this with any endpoint with similar configurations. In our case, simply go to Settings → add “Model Provider” → add OpenAI-API-compatible.

Go to https://cloud.dify.ai/apps, make sure you're logged in, and you can begin to create a project. For our purposes, we'll use Chatflow.

We have our flow, now we assemble each individual module. First, let's look at what's going to be treated as the input because as we know: garbage in = garbage out!
Our AI agent needs to figure out which industry events are worth sending our teams to, so we're going to need to give it a way to search, extract, and aggregate that information in a format that's ready for the underlying LLM to process.
It's time to build.
Add your input parameters:

Search through the API


We'll add an iterator over our search results to understand source context. This step is important as search engines give many results, sorted by relevance. Event websites and aggregators tend to be top results, and the iterator's job is to extract the detailed information about these events.
This is where Firecrawl comes in for scraping.

Add GMI LLM
User prompt:

At this point, you need to parse the LLM output into a JSON format. By converting into JSON (a structured format), this enables the downstream steps to easily and accurately process the results.

Here's the code we used:
What next? Well, we now have input data, but it needs to be cleaned and sorted before the AI agent begins processing. So it's time to aggregate the structured events from different search results, deduplicate, and sort by date.

Here's the code we used:
And that's the data input step! So far, we have created a workflow pattern:
Next, it's time to teach our agent to search through this data for things we want it to do.
We have now built a simple pattern (compose web query → web search → parse output with LLM), which we can leverage to search for two key factors when determining ROI: ticket price and hotel price
Note: for a more accurate/advanced search (e.g. ticker price with discount), we can extend this step to inquire a separate agent built specifically for this purpose.

Now, we aggregate the results and output.

No MVP is complete without validation. We ran multiple rounds of testing to ensure the agent delivered value.
We checked:
We shared the MVP with internal stakeholders to gather early feedback. Based on this, we:
We also:
The final stage was getting the MVP into a usable state for broader testing.
We tested two deployment strategies:
With the core working, future iterations can:
Looking ahead, potential next features include:
This AI agent started as a simple idea—helping busy professionals decide which events are worth attending. Through methodical development, iterative testing, and the right tooling, we brought that idea to life with a lean, flexible MVP.
In Part 3, we’ll explore how to evolve this MVP into a production-ready system, optimize for performance, and integrate it more deeply into business decision-making workflows.
Until then—build fast, stay curious, and let the AI do the heavy lifting.
By the way, have you seen our Building an AI-Powered Voice Translator guide? It uses only open-source tooling!
Build AI Without Limits!
GMI Cloud helps you architect, deploy, optimize, and scale your AI strategies
