Cloud AI, Table 57
Inspiration
We spent 12 hours brainstorming and finally settled on this idea at midnight, mostly so we could go to sleep.
Before that, the whiteboard held a lot of agent-to-agent (A2A) ideas:
- Emergency dispatch using ElevenLabs voice agents that negotiate who responds to which call
- AI twin dating apps, where your digital twin goes on the first date for you
- Supply chain logistics with agents bargaining over shipments and inventory
- Policy-making agents that represent different stakeholders
Every one of them ran into the same problem: to demo it, we would have to build a simulated environment anyway. So we stopped fighting that and leaned in. If we need a simulation, why not use the oldest one there is, a civilization? A city-management game is a controlled, repeatable sandbox where we can test and score LLM decision-making.
The idea is bigger than a game, though. One agent holding every goal, every number, and every argument in a single context window starts to suffer from context rot. We wanted to see what happens when you split the data and the agendas across several agents and make them argue their way to one decision. The same setup applies to:
- Model alignment: watching how agents with competing objectives reach, or fail to reach, a shared outcome
- Policy and decision-making under conflicting stakeholder interests
- Resource scarcity, where every bushel spent on one goal is taken from another
- Scaling up to many agents, each with its own agenda
What it does
Council of Sumer takes Hamurabi (1968), the original city-management game, and replaces the king with a council of five AI advisors. There is no ruler to break ties.
Each year the city decides how much land to trade, how much grain to feed its people, and how much to plant. Five autonomous agents, each running as its own process, debate one speaker at a time over AGNTCY SLIM and then vote.
| Advisor | Extra preference |
|---|---|
| Provider | Keep everyone fed |
| Farmer | Plant as much grain as possible |
| Merchant | Own the most land at the end |
| Priest | Keep the most grain in reserve |
| Villager | None, plays for the score alone |
All of them maximize the same city score over the whole reign:
$$ S = 10P + \frac{G + 20A}{100} - 15\,X - 2000\cdot\mathbb{1}[\text{overthrown}] $$
where $$P$$ is population, $$G$$ is grain, $$A$$ is acres, and $$X$$ is total starved. On top of that, each advisor pulls toward its own preference, and those preferences collide: grain spent feeding people cannot also be seed or land.
Each seat has a bias $$b \in [0, 1]$$ that sets how hard the advisor resists compromise. At $$b = 0$$ it bargains freely; at $$b = 1$$ it holds out.
You play the gods. After every round you can send an omen (plague, rats, a good or bad harvest, cheap or costly land). The omen changes the real game state, a herald announces it in an ElevenLabs voice, and every advisor votes again.
Adoption rules for a council of $$n$$:
- Consensus: every advisor backs one plan
- Strong majority (from round 2): $$\max\left(\lfloor n/2 \rfloor + 1,\ \lceil 2n/3 \rceil\right)$$ votes
- Majority: $$\lfloor n/2 \rfloor + 1$$ votes with no tie
- Runoff: the top plan has only $$\lfloor n/2 \rfloor$$ votes, or there is a tie at the top
- Ask a human: no majority can form, so you decide
How we built it
- Agents: five separate A2A agent processes that serve agent cards over AGNTCY SLIM (via
slim-bindings, so no Docker is needed) - The clerk: sends a
Briefonly to the advisor whose turn it is and collects itsBallot. It applies the public rules and never ranks plans itself - Verified turns: every ballot is bound to its run, year, round, speaker, state, and request. SQLite stores proposals, receipts, and commitments, and the engine re-checks the evidence before advancing
- Private rulebooks and learned beliefs: each advisor has an editable private rulebook and a belief record that persists across turns. Each claim carries its evidence, a confidence level, and its remaining uncertainty
- Seeded game engine: every die is pre-rolled from the seed, so every decider, whether a council, a single LLM, or a rule-based ruler, faces the same luck
- Voices: ElevenLabs gives each advisor a distinct voice, plus a narrator, a herald, and an optional "clamoring" crowd mode
- Stack: Python, FastAPI with SSE, a hand-built browser chamber UI, OpenTelemetry for AGNTCY Observe, and
uv
Challenges we ran into
- LLMs "know" Hamurabi. Models kept importing rules from the classic game. We took the numeric mechanics out of the shared prompt, so advisors have to learn food, seed, and planting limits from their notes, the debate, and corrections to rejected proposals
- Real disagreement without gridlock. Without enough bias, everyone agrees immediately. With too much, nothing passes. Tuning the stop rules, the runoff, and the human escalation path took many iterations
- Fair benchmarking. Comparing a council to a single LLM is only fair if both face identical luck, which is why the dice are pre-rolled per seed and every reply is cached by prompt hash for replay
- Cost control. A five-agent debate can use up to 30 LLM calls per year, so we added a hard budget cap and offline replay of rehearsed seeds
- Timeline. We committed to the idea at midnight, which did not leave much time to build it
Accomplishments that we're proud of
The council beats a single LLM on every measure. Over 16 seeded five-year reigns, using the same model for both:
| Decider | Reigns survived | Starved per reign | Mean score |
|---|---|---|---|
| Council of five LLM advisors | 73% | 29.3 | -75 |
| One LLM with every goal in one prompt | 56% | 40.4 | -722 |
That is 27% fewer people starved, and the mean score is almost $$10\times$$ better.
We are also proud that:
- The disagreement is real: opening plans differ by hundreds of acres and bushels, and advisors rebut each other by name
- No code-level veto or hidden policy steers the outcome. The LLMs reason from their mandates, and the clerk only counts votes
- Watching five voiced advisors argue over grain while you drop a plague on them is a lot of fun
What we learned
- Splitting context across agents helps. Giving each agent one agenda and one slice of the problem produced better collective decisions than one agent juggling everything
- Consensus is not always the goal. Forcing unanimity can water a plan down. Sometimes the right move is to keep the dissent on record, vote it out, or ask a human
- New information is the real test. How a group reacts to a shock, and whether it actually updates, says more about its reasoning than its opening positions do
- Simulations make good testbeds. A seeded, scorable environment turns vague "agent collaboration" claims into measurable results
What's next for Council of Sumer
- Bigger councils: scale from 5 agents to dozens (the setup already supports up to 21), each with its own agenda, and study how coalitions form
- Alignment research: use the council as a sandbox for how agents with conflicting objectives negotiate, defect, or cooperate
- Real-world domains: bring the same deliberation protocol back to the ideas we started with, such as emergency dispatch, supply chains, and policy-making
- Mixed-model councils: seat different LLMs together and see whether diversity of models beats diversity of prompts
- Closing the gap: the rule-based rulers still score about 1,200, so there is plenty of room for LLM councils to improve
Built With
- a2a
- agntcy
- agntcy-app-sdk
- bayleaf
- css3
- deepseek
- elevenlabs
- fastapi
- html5
- httpx
- javascript
- opentelemetry
- pydantic
- pytest
- python
- ruff
- server-sent-events
- slim
- sqlite
- uv
- uvicorn
Log in or sign up for Devpost to join the conversation.