{"slug": "building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what", "title": "Building a 13-Agent Marketing Society on Qwen Cloud — What Actually Broke, and What I Learned Fixing It", "summary": "A developer built Nexus AI, a 13-agent marketing society on Qwen Cloud, where specialized agents like Social Manager and Brand Guardian independently review each other's work. The project revealed critical bugs: silent data routing failures where agents returned wrong outputs due to naive keyword matching, and a mid-project migration from async PostgreSQL to sync SQLite that left the codebase broken. Fixing these required re-keying agent routing off fixed system prompts and systematically auditing every agent's output.", "body_md": "*Written for the Qwen Cloud Global AI Hackathon 2026 — Track 3: Agent Society.*\n\nMost \"AI marketing\" tools are one LLM wearing a lot of hats — a single prompt that\n\ngenerates a social post, then a different prompt that pretends to be an ads\n\nanalyst, then another that pretends to audit its own compliance. Track 3 of this\n\nhackathon asks for something different: an *agent society* — specialized agents\n\nthat actually divide the work and can disagree with each other, the way a real\n\nteam does.\n\nThat's what I set out to build with **Nexus AI**: 13 specialized agents —\n\nSocial Manager, Brand Guardian, Digital Marketer, Ads Manager, SEO Expert,\n\nAnalytics, Conversion Optimizer, Community Engagement, Market Intelligence,\n\nDynamic CFO, Security SRE, Calendar Planner, and Media Generator — coordinated\n\nby a central orchestrator, all powered by **Qwen-Max through Alibaba Cloud's\nDashScope SDK**.\n\nThe feature I care about most isn't any single agent — it's what happens\n\n*between* two of them. Social Manager drafts a LinkedIn post. Before anything\n\ngets auto-published, Brand Guardian independently reviews that exact draft.\n\nIn one real run, Social Manager's draft included the line *\"Guaranteed 4.2x ROAS\nin 14 days, or your money back.\"* Brand Guardian caught it, flagged it as an\n\nThat's the whole pitch, actually working: two agents, one veto, a real reason\n\nattached. Not a shared script producing two outputs that happen to look\n\ndifferent.\n\nThe honest version of this build: the codebase I inherited had been through a\n\nmid-project migration — from an async PostgreSQL design to a synchronous\n\nSQLite one — that never finished. The database layer had moved to sync, but\n\nevery router still expected an async session; the config file had been\n\nrewritten with different field names than the code still expected; the test\n\nsuite's fixtures were still async. None of it would even boot.\n\nGetting to a working demo meant tracing that mismatch through the entire stack\n\nbefore a single agent could run — config, database session handling, every\n\nrouter, the orchestrator, the test fixtures. Once it booted, the harder bug was\n\nquieter: some agents were *silently* returning the wrong shaped data. A social\n\npost that happened to mention \"SEO\" as a topic would make Brand Guardian's\n\nreview get hijacked by the SEO agent's response template instead of its own,\n\nbecause the underlying simulator routed responses by naive keyword matching,\n\nand \"SEO\" is a normal thing for a marketing post to mention.\n\nI only found this by refusing to trust \"the API call returned 200\" as proof of\n\ncorrectness, and instead systematically auditing what every one of the 13\n\nagents actually produced, end to end, for a full cycle. Two of thirteen were\n\nquietly wrong. Fixing it meant re-keying every agent's routing off something\n\nthat can *never* collide with user content: each agent's own fixed system\n\nprompt, instead of generic words its output might happen to share with\n\nsomeone else's.\n\nThe integration itself, once the plumbing was fixed, was straightforward:\n\n`dashscope.Generation.call()`\n\nagainst Alibaba Cloud's native endpoint, one\n\nunified `QwenClient`\n\nthat every agent shares, with a high-fidelity local\n\nsimulator as a fallback so a demo never depends on live network conditions or\n\nAPI quota. I verified the real path independently of the simulator — sent a\n\nliteral \"reply with exactly: REALAPIWORKED\" through the actual client class,\n\ngot the real word back from Qwen-Max, confirmed the simulator wasn't quietly\n\nintercepting it.\n\nReal OAuth so the agents can act on real social accounts (starting with\n\nX/Twitter), and deployment so this isn't just a local demo. The agent logic\n\nand the Qwen integration were always the easy part in hindsight — the real\n\nwork was making sure \"multi-agent\" was a fact I could prove, not a claim I\n\ncould just assert.\n\n*Built for the Qwen Cloud Global AI Hackathon 2026, Track 3: Agent Society.*\n\n*Code: github.com/MelekhYomi/mark-agen-nexus-ai*\n\n*Whatsapp +2347068561873*", "url": "https://wpnews.pro/news/building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what", "canonical_source": "https://dev.to/iyomichrist/building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what-i-learned-23n3", "published_at": "2026-07-21 23:39:35+00:00", "updated_at": "2026-07-22 00:02:14.640302+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "large-language-models", "ai-infrastructure", "developer-tools"], "entities": ["Qwen Cloud", "Alibaba Cloud", "DashScope", "Nexus AI", "Qwen-Max", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what", "markdown": "https://wpnews.pro/news/building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what.md", "text": "https://wpnews.pro/news/building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what.txt", "jsonld": "https://wpnews.pro/news/building-a-13-agent-marketing-society-on-qwen-cloud-what-actually-broke-and-what.jsonld"}}