1 Problem
It started when the Ministerie van Binnenlandse Zaken en Koninkrijksrelaties (BZK), together with the Ministry for Housing and Spatial Planning (VRO), contacted Team Epoch to build something that might one day replace them. The government faces a twofold challenge: doing more with limited capacity, while policy processes keep getting more complex. To push current technology to its limit, the goal was full substitution: AI taking responsibility for the whole policy process, from identifying the problem to making the decision.
Replacing an entire ministry in 10 weeks is not realistic, so we looked for a first point of attack: Woondeals. These are formal agreements between the national government, a province and its municipalities that set targets for how many homes get built, where, in which price segments, and with which infrastructure. Producing one requires demographic research, spatial planning, negotiations between stakeholders with very different interests, and a full written report. If an AI system could come close to the real thing here, that would say a lot.
2 Approach
We modelled the system on how people actually make policy together. It runs in four phases, each carried out by its own set of agents, and each with its own loop until the output is good enough.
Research. The user's prompt is first turned into a proper research question and a research plan. Because this is a critical decision point, the user has to approve the plan (and can adjust it) before anything else happens. A lead researcher agent then hands out topics to assistant researchers. Each assistant loops through retrieving sources, filtering out irrelevant or low-quality ones and summarising what's left, using both our RAG pipeline over government documents and web search. The lead researcher keeps assigning topics until it can answer the main question, then compiles everything into an initial proposal.
Discussion. This is what sets the system apart. If research is the data-driven part, the discussion is the "old" way of doing things: putting all stakeholders around a table and finding the best compromise. Every stakeholder (ministers, the province, each municipality, a housing corporation, financial and legal advisors, a spatial planner) is a separate agent with its own system prompt, built by compiling documents such as the municipalities' official housing visions (woonvisies) and expert interviews. But for shock purposes we also added agents which mirrored real life ministers. Since ministers have lots of recorded speech we were able to mimic their speech patterns and let them take part in the simulated discussions.
A facilitator agent assigns turns and steers towards a conclusion, until a consensus check decides the discussion is done. During the discussion, agents can use tools: searching the document database, searching the web, or querying PDOK, the Dutch government's geodata service, for things like nitrogen levels or protected nature areas.
Reporting. We once again made an agentic system to tackle writing a full report. LLMs are at their best writing one or two pages at a time, so we utilised the orchestrator-worker architecture again. Junior agents each wrote a different section, which were then combined into the final policy proposal and an interactive report website with infographics.
Reflection. Finally, a reflection agent lets the user ask why certain choices were made, trace where specific numbers come from, and adapt parts of the proposal. It had full access to the entire 'context' of the project. In this way the user could still alter the report or ask about the chain of decisions which led to certain outcomes. Transparency was a priority throughout: every agent's messages and tool calls stream live to the web interface.
3 Technical note
Under the hood, the whole thing is built from the ground up. After messing about with LangChain, LangGraph and a Google agent implementation we found none of them satisfied all of our needs (we were also just stubborn and wanted to know how everything worked under the hood), so we decided to write our own agent framework! The models ran on Google's Vertex AI, although the system also supports other providers and locally hosted models. A FastAPI backend streams events over WebSockets to a React frontend, and the RAG database was filled exclusively with public government documents. (because we weren't allowed access to the rest haha)
4 Results
After 10 weeks, the system produced its own demographic research, spatial planning, stakeholder discussion and a full report website, all agent-based.
The system was developed on the Utrecht region, so to test whether it generalises, we let it draft a Woondeal for the province of Zeeland and compared it to the real, negotiated agreement. Its total came out about 12% higher, but the distribution over municipalities was very similar: like the real deal, it spread most of the homes over the many smaller towns instead of concentrating them in the cities.
| Woondeal Zeeland, 2023–2030 | Real agreement | VirtueleKamer |
|---|---|---|
| Total homes | 16,520 | 18,610 |
| Goes | 16.6% | 13.4% |
| Vlissingen | 15.8% | 14.0% |
| Middelburg | 13.8% | 16.1% |
| Other municipalities | 53.8% | 56.4% |
We also stress-tested the negotiations. In 15 runs, we made one municipality, Nieuwegein, refuse any new housing, and compared the outcomes to 15 fully cooperative runs. Nieuwegein's share collapsed from around its real target of about 5,000 homes to almost nothing, and, interestingly, the neighbouring municipalities did not pick up the slack: those homes simply disappeared from the regional total. In a few runs it did accept, but only under impossible conditions, such as a €150,000 contribution per home to a "livability fund".
We presented the results to a fully booked room of government officials, including the Secretary-General.
5 Reflections
I could write a book about everything that happened during this project. In terms of team dynamics this was the biggest learning experience I had so far. I was the project lead of a large ambitious project for the first time and made a lot of rookie mistakes. Balancing between keeping a good overview, giving everyone full ownership of their deliverables and keeping the team synchronized was a lot for someone who had never worked on something of this scale before. Especially coming from a mathematics background instead of computer science.
Apart from the teamwork aspects we also learned a lot about agentic projects and LLMs. To be fair, some aspects worked really well, and some didn't work at all. While discussing these it is important to consider the needs of our client. The ministry wanted a proof of concept, not a finished product. They needed something to show off the potential of AI to their fellow bureaucrats to make them feel the urgency of coming to grips with this technology.
So what worked well? The research phase consistently worked very well: the system finds relevant information in both internal documents and the web, and writes proposals based on real information in the right format. However, that was to be expected. We basically recreated the Deep Research functionality commonly found in all major chatbots. What was unique though was a RAG integration which we suggested could be used to efficiently comb through the enormous amounts of documents in the government's data.
Perhaps more interesting: What did not work? Let's start off with the discussion. Trying to capture how a municipality behaves in a written persona really tests the limits of natural language. Try writing how you would behave in a discussion, what you find important, what your goals are and what you would never agree with. Give it as a system prompt to one of the agents and see how it behaves. You will find that it's an almost impossible task to let the agent behave as you would like. On a more fundamental level, this was not even a problem suitable to be solved by AI. Many aspects of the discussion stage of these proposals lend themselves very poorly to agents. However, this is where we needed to assess the needs of our client. They did not want a system to replace or streamline government ministries, rather a proof of concept to get AI development within the government kickstarted.
My final note will be on my first interaction with model alignment / reward hacking. You might wonder how our model got such accurate results? Because we needed to verify our results we had to compare to historical reports. This resulted in the model figuring out it could just find the actual Woondeals during its research and base its numbers on the original. You can imagine our disappointment when we found out. This presented us with a dilemma: do we let the system use the internet? Because even if we banned it from using the woondeal directly, it was almost always possible to piece together the Woondeal from newsreports and other outlets. In the end we restricted its internet access and based it purely on RAG results, which forced it to reason about population forecasts and zoning plans. This result was far more interesting to us, as it showed the true capabilities of the models.
These reflections have been a bit of a stream of thought, but I hope you enjoyed learning about the project as much as I did! Always open to work on similar challenges or discuss the topic, so feel free to reach out!