Inspiration

I built SupplySwarm because sourcing equipment for a new business is rarely just a search problem. You have to split the job into categories, compare options, keep everyone inside one budget, catch unreliable evidence, and make trade-offs when priorities conflict. A single chatbot can produce a list, but it does not naturally show that process. I wanted to make the collaboration visible: who is responsible for what, where the agents disagree, why a decision changes, and whether the swarm actually performs better than one agent working alone.

What it does

The user gives SupplySwarm a business idea, location, team size, and budget by typing or speaking to the Coordinator robot. The Coordinator designs a bespoke team and assigns each specialist a role, Alibaba search query, and share of the budget. Specialists then run separate Qwen calls with live web search in parallel.

The agents do not simply merge their first answers. A Supplier agent rejects cited URLs that were not present in the real search results. If a specialist overspends its share, that agent makes its own case to the Coordinator in one Qwen call; the Coordinator rules on the request in a separate call. Deterministic code clamps any agreed transfer to real unspent headroom, calculates shipping, VAT/duties and contingency, and checks the final ceiling. A Critic revises over-budget packages or upgrades heavily underspent ones.

Every live run also sends the identical brief and tools to one solo Qwen agent. Both outputs are scored by the same validators, so the results page shows a measured comparison rather than a scripted claim. In a fresh live verification run on 20 July, six agents produced a £9,753 budget-valid plan and parallel execution measured a 3.4× speed-up; the solo control returned an £8,066 budget-valid package.

SupplySwarm also remembers completed missions per role. Agents recall factual details such as previous spend, vetoed links and negotiated transfers on relevant future briefs. The memory layer uses deterministic keyword matching, so recall cannot invent a past event.

How I built it

The backend is a Node.js and Express service packaged as a Docker container for Alibaba Cloud ECS or Simple Application Server. planner.js orchestrates the Agent Society pipeline: deterministic memory recall, Coordinator planning, parallel specialist calls, a parallel solo-agent control, negotiation, validation, Critic revision and mission recording. qwen.js connects directly to Qwen Cloud / DashScope for JSON planning, grounded live search, speech recognition and concept-image generation.

The frontend is a Vite application with a Three.js/WebXR operations room. Agent events are replayed as robot movement, speech bubbles, thought bubbles and message pulses. A WebSocket session hub creates a five-letter pairing code so a phone can follow the same live run, inspect agents, send a request to a specific role and download the final PDF.

The arithmetic and evidence checks deliberately sit outside the model. Landed costs, budget validity, share normalisation, source allow-lists and negotiation limits are ordinary auditable code. That lets the agents reason and argue while keeping the final numbers deterministic.

Challenges I ran into

The hardest part was making disagreement genuine without letting it break the budget. If every conflict were resolved by fixed rules, it would not demonstrate agent negotiation. If the models controlled the numbers directly, the result could drift or hallucinate. I solved that by separating the conversation from the authority: agents make and judge the case in separate Qwen calls, then deterministic code enforces the real financial limits.

Grounding marketplace links was another challenge. A plausible-looking URL is not enough, so SupplySwarm keeps the actual search sources returned to each specialist and removes any citation the agent did not really see. In VR, I also had to balance readable world-space UI with natural head movement and controller-ray interaction.

Accomplishments I am proud of

  • The agents have distinct responsibilities and visibly talk to one another instead of acting like a hidden prompt chain.
  • Budget disputes are argued by the models but constrained by deterministic accounting.
  • Every live run includes a fair solo-agent control using the same brief, search tools and validators.
  • Per-role memory is factual, inspectable and carried into later missions.
  • The same live swarm can be followed in WebXR and from a paired phone, including agent-directed messages and a downloadable PDF.
  • The system degrades honestly: without a Qwen key it switches to a clearly labelled demo catalogue rather than pretending the data is live.

What I learned

Multi-agent systems become much easier to trust when their boundaries are explicit. Qwen is strongest here when each call has a clear role and context, while deterministic code owns validation, arithmetic and permissions. I also learned that “measurable improvement” needs a real control path. Running a solo agent beside the swarm made performance claims part of the product rather than a line in the pitch.

What is next

The next step is to add more marketplace adapters behind the same evidence policy and move mission memory from a single persistent volume to a queryable managed store. I would also add team-level approval policies so a business can decide which categories are fully autonomous and which require a human checkpoint before the swarm proceeds.

Built With

Share this project:

Updates