Inspiration
Marketers drown in dashboards, knowing what happened but not why. We were inspired by Agent-to-Agent (A2A) communication to solve the Smadex Hackathon Challenge. We wanted to combine hard statistical data with human-like subjective analysis through an autonomous, transparent AI debate.
What it does
Ad Courtroom convenes 5 specialized AI agents (Performance, Fatigue, Risk, Visual, Audience) to decide an ad creative's fate. They debate over 3 rounds:
- Independent Verdict: (
SCALE,PAUSE,PIVOT, orTEST_NEXT). - Cross-Examination: Agents challenge conflicting peer claims.
- Revision: Agents defend their stance or officially change their mind.
Users receive a weighted final verdict alongside a fully readable transcript of the argument.
How we built it
We used a custom Python stack, avoiding bloated agent frameworks:
- Data: DuckDB and Pandas aggregate the dataset. We detect creative fatigue using the 7-day CTR linear regression slope ( \beta ): $$ \beta = \frac{\sum_{i=1}^{n} (t_i - \bar{t})(y_i - \bar{y})}{\sum_{i=1}^{n} (t_i - \bar{t})^2} $$
- A2A Protocol Backend: Agents are independent FastAPI microservices communicating strictly via Pydantic models. An async orchestrator manages the rounds concurrently.
- Frontend: Built with Streamlit to visualize the real-time courtroom transcript.
Challenges we ran into
- AI Groupthink: LLMs naturally agree with each other. Prompting them to logically challenge peers without looping was an engineering puzzle.
- Strict JSON Formatting: A single markdown hallucination breaks the A2A pipeline, requiring us to build robust fallback parsers.
- Multimodal Latency: Processing tabular data ( x_i ) and base64 images together required aggressive SQLite caching to keep the debate under 20 seconds.
Accomplishments that we're proud of
We are proud of building a custom, deterministic A2A protocol from scratch. Our favorite feature is the "Hero Moment" in the UI: watching an AI agent actively change its mind after a peer presents compelling, conflicting data.
What we learned
Explainable AI (XAI) is incredibly effective through multi-agent debate. Users trust AI much more when they can read its internal arguments. We also validated that strict typing is absolutely mandatory to bridge unpredictable LLM outputs with deterministic app logic.
What's next for Ad Courtroom
- Brand Safety Agent: A new plug-and-play agent to instantly flag uncompliant ads.
- Automated Bulk Consensus: Running debates overnight across thousands of creatives, surfacing only the most controversial courtroom sessions for human review each morning.
Live Demo
Check out the fully functional deployment on Render: [https://hackupc-2-26.onrender.com]
Log in or sign up for Devpost to join the conversation.