This is a Streamlit-based interactive web application that leverages multiple autonomous AI agents to generate and critique responses to a user's query. The agents work independently and collaboratively in a feedback loop, enabling a richer and more critical multi-perspective analysis.
- Multiple AI agents generate diverse responses
- Peer evaluation system where agents review each other's output
- Modular architecture with extensibility for new tools or agent roles
- Lightweight and easy-to-deploy using Streamlit
This application implements a multi-agent reasoning loop:
- User enters a query.
- Multiple response agents generate answers.
- One or more evaluation agents assess those answers based on criteria like accuracy, relevance, or creativity.
- The evaluation helps highlight the most compelling responses or guide further refinement.
multi-agent-app/
├── agents/
│ ├── base_agent.py # Abstract base class for all agents
│ └── evaluator.py # Agent that evaluates generated responses
├── models/
│ └── model_loader.py # Loads external LLMs
├── tools/
│ └── web_search.py # Web search tool for agents needing context
├── main.py # Streamlit entry point
- OpenAI API (e.g., GPT-4) via
openai
library - Streamlit for UI rendering
- LangChain for agent structuring and tools
- Python Standard Libraries:
abc
,typing
,os
,dotenv
, etc.
git clone https://github.com/anshulraj10/multi-llm-agents-feedback.git
cd multi-llm-agents-feedback
We recommend Python 3.10 or later.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Create a .env
file in the root directory:
HF_ACCESS_TOKEN=your-huggingface-token-here
streamlit run main.py
- Open the app in your browser.
- Enter a query like: "What are the pros and cons of AI in education?"
- Review how each agent responds and how they critique one another.
- Use this tool to explore multi-faceted viewpoints or generate collaborative AI-driven content.
Contributions are welcome! To contribute:
- Fork the repository
- Create your feature branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m 'Add YourFeature'
- Push to the branch:
git push origin feature/YourFeature
- Open a Pull Request
This project is licensed under the MIT License.
Developed by Anshul Raj
Special thanks to the open-source community behind:
This app demonstrates the power of collaborative reasoning through autonomous agents. Ideal for research, brainstorming, or prototyping decision-making systems.