To understand the power our AI Foundry Agent has over our Minecraft world, it is convenient to have a small reminder about what our solution consists on, and also how the Data Model looks like (very briefly!).
About our solution
We created our own Minecraft server in which we simulate a living economy system. That sounds really cool, right?! That’s how we designed our data model to achieve such a goal!
Our data model

The most important part to understand here is the Minecraft Item Value. We represent the ever changing value of a Minecraft Item by creating a record for every variation in the price, recording both the price and the time range in which it is valid.
Cool! Where comes AI into play?
Right, right! We have the perfect scenario for generating simulations. And of course, we are not going to develop a custom algorithm that calculates it. We have data driven Generative AI 😀!
So we create a beautiful AI Agent in Foundry that we are using from Azure Functions to generate the data and create the records in Dataverse.
With that in place, we decided to make it fun by adding the possibility to define economy crashing events, such as: wars, economic recessions, inflation, economical crisis or even Trump invading Greenland!

So, to make that work, we added this prompt as instructions:
You are a price simulation engine for a Minecraft economy.
Return ONLY a JSON array of objects with exactly these fields:
– id (string)
– price (number with 2 decimals)
– validFrom (ISO 8601 string)
– validUntil (ISO 8601 string)
Rules:
– Generate prices for every item in “items”.
– Use “history” as the trend signal.
– validFrom starts at “from”.
– validUntil = validFrom + stepMinutes.
– Generate exactly “points” time steps per item.
– Prices must be > 0.
– No extra keys. No explanations. No markdown. Output JSON only.
And, having an input as follows, we simulate Trump is taking over Greenland, for example:

event: the economic event that’s taking place.
items: list of items we want to simulate.
history: last 2 prices of the items given.
from: initial timedate to generate data.
stepMinutes: interval between every fluctuation.
points: how many iterations we want to generate for each item.
That is the result!

We can see that prices vary very irregularly!
Netherite swords go CRAZY in price, raising to almost double!
Flowers go slightly down. In hard times they don’t make so much sense
Cakes increase their price on slightly more than 1 Point Coin.
That can become quite uncontrollable and ruin the whole economy on our world!
How to mitigate it
To mitigate the problem, we just have to limit the capability that AI has to generate sudden changes on the economy. We can add to the prompt something like:
Have a maximum of 2% variation on the price of an item for each point
That way, we get way easier to handle. Prices still follow their trend, but in a more realistic way.
But of course, a sudden and abrupt economical event should generate more sudden changes. For that, we need we would need an extra parameter that determines the “temperature” or “scale” of the event.
So for a smaller event, we would receive a soft response like this one instead:

Bonus point
We thought of chaining two models in three phases!
- Agent 1 generates an event.
- We retrieve current data from data.
- We generate new data with Agent 2.