Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Building an AI Devil's Advocate: A Multi-Agent Debate App with LangGraph & Streamlit

Description and use

The AI Devil's Advocate app showcases a resilient multi‑agent debate system that automatically switches LLM providers when rate limits are hit, maintaining continuous operation and offering transcript export.

Problem

Managing API rate limits while running a multi-agent debate application.

Outcome

The app demonstrates a resilient multi‑agent debate system that automatically switches LLM providers on rate‑limit errors, maintaining continuous operation and providing a polished UI with transcript export and usage monitoring.

Workflow

  • Configure multiple LLM providers in llm_factory.py
  • Wrap providers with FallbackLLMWrapper
  • Run debate agents via LangGraph state machine
  • If a 429 error occurs, wrapper routes prompt to next provider
  • Continue debate until verdict is generated
  • Export transcript as PDF or Markdown
  • Display real‑time API call counter in sidebar

Evidence

If the primary LLM throws a 429 Too Many Requests error, the wrapper catches it and immediately routes the prompt to the next available provider in the list.

Source

Multi-Provider Architecture: Switch between Groq, Gemini, and OpenRouter on the fly.

Source

  • Record date: 2026-10-11T07:56:03.976Z