A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.
Multi-Agent Research Assistant with AG2
A production-grade multi-agent research pipeline using AG2
(formerly AutoGen). Three specialists collaborate under GroupChat to research any topic
and produce a structured Markdown report, powered by Mistral Small 4
(mistral-small-latest) via AG2's native Mistral integration.
Features
- Multi-agent collaboration (researcher, analyst, writer) under GroupChat
- AG2's
register_function(caller=, executor=)tool registration pattern - Native Mistral support via AG2's
api_type: "mistral"config entry - Download report as Markdown
Demo

Prerequisites
- Python 3.10+
- Mistral API key from console.mistral.ai
Installation
cd multi_agent_research_assistant_ag2
pip install -r requirements.txt
cp .env.example .env # add your Mistral API key
Usage
streamlit run research_assistant.py
How It Works
- Researcher searches the web using DuckDuckGo API and summarises findings
- Analyst critically reviews the research and identifies gaps
- Writer synthesises all inputs into a structured Markdown report
- GroupChatManager orchestrates the analyst and writer in round-robin order
AG2 Concepts Demonstrated
GroupChatwithspeaker_selection_method="round_robin"register_function(caller=, executor=), which separates tool description from executionUserProxyAgentwithcode_execution_config, providing a built-in code execution sandbox- Native Mistral integration via
{"api_type": "mistral", "model": "mistral-small-latest", ...}inLLMConfig, instead of pointing an OpenAI-compatiblebase_urlat Mistral's endpoint
Security note:
use_docker=Falseincode_execution_configmeans any agent-generated code runs directly in your process. For production use, setuse_docker=Trueor run in an isolated environment.
Running Tests
Tests are fully mocked and require no API keys or network access.
pip install pytest
python -m pytest tests/ -v
Project Structure
multi_agent_research_assistant_ag2/
├── research_assistant.py # Agents, GroupChat orchestration, Streamlit UI
├── tools/
│ └── research_tools.py # web_search (DuckDuckGo API), fetch_page_content
├── tests/
│ ├── conftest.py # sys.path setup, Streamlit stub
│ ├── test_agent_setup.py # Agent instantiation, tool registration
│ └── test_research_tools.py # Mocked tool tests, SSRF validation
├── requirements.txt
└── .env.example