A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.
audit: fix research_team - rewrite em dashes, add docstrings, remove invalid pip reference
Tiioluwanieba130b64641
diff --git a/ai_agents/research_team/.env.example b/ai_agents/research_team/.env.exampleindex c798c95..7b2e989 100644--- a/ai_agents/research_team/.env.example+++ b/ai_agents/research_team/.env.example@@ -1,3 +1,2 @@-# OpenRouter — required-# Get your API key at https://openrouter.ai+# OpenRouter API key (required). Get yours at https://openrouter.aiOPENROUTER_API_KEY=your_openrouter_api_key_herediff --git a/ai_agents/research_team/README.md b/ai_agents/research_team/README.mdindex f67086b..7cb16cf 100644--- a/ai_agents/research_team/README.md+++ b/ai_agents/research_team/README.md@@ -8,7 +8,7 @@Research Team is a two-agent AI system that tackles deep research questions by splitting work between specialists. Seek searches the web for external information while Scout looks through local documents. A team leader powered by **MiniMax M2.5** coordinates both, then synthesises their findings into a clean, structured report.-You give it a question like "Research Anthropic — their products, key people, and recent developments" and it comes back with an executive summary, sourced key findings, and open questions.+You give it a question like "Research Anthropic: their products, key people, and recent developments" and it comes back with an executive summary, sourced key findings, and open questions.## Features@@ -16,24 +16,24 @@ You give it a question like "Research Anthropic — their products, key people,- **Scout agent**: Reads local files from the `knowledge/` directory to surface internal context- **Team leader**: Delegates work to each specialist, cross-references findings, and produces a unified report- **Streaming UI**: Report appears progressively in the Gradio interface as the team works-- **File upload**: Upload `.txt`, `.md`, or `.pdf` files directly from the UI — Scout reads them instantly on the next query+- **File upload**: Upload `.txt`, `.md`, or `.pdf` files directly from the UI. Scout reads them instantly on the next query.## Tech Stack**Frameworks and Libraries:**-- [Agno](https://github.com/agno-agi/agno) — agent and team framework-- [Gradio](https://www.gradio.app/) — web UI with streaming support+- [Agno](https://github.com/agno-agi/agno): agent and team framework+- [Gradio](https://www.gradio.app/): web UI with streaming support**Models and APIs:**-- [MiniMax M2.5](https://openrouter.ai/minimax/minimax-m2.5) via [OpenRouter](https://openrouter.ai/) — team leader and both agents-- [DuckDuckGo Search](https://pypi.org/project/duckduckgo-search/) — web search for Seek+- [MiniMax M2.5](https://openrouter.ai/minimax/minimax-m2.5) via [OpenRouter](https://openrouter.ai/): team leader and both agents+- [DuckDuckGo Search](https://pypi.org/project/duckduckgo-search/): web search for Seek## Prerequisites- Python 3.11 or higher- [uv](https://docs.astral.sh/uv/) (recommended) or pip- API keys for:- - [ ] OpenRouter — get yours at https://openrouter.ai+ - [ ] OpenRouter (get yours at https://openrouter.ai)## Installation@@ -50,12 +50,6 @@ cd Hands-On-AI-Engineering/ai_agents/research_teamuv sync```-Or with pip:--```bash-pip install -r requirements.txt-```-### 3. Set Up Environment Variables```bash@@ -83,7 +77,7 @@ Then open http://localhost:7860 in your browser.Enter a research query like:```-Research Anthropic — their products, key people, and recent developments+Research Anthropic: their products, key people, and recent developments```The team will search the web, check local docs, and stream back a structured report.@@ -112,6 +106,6 @@ The team leader receives a research query and breaks it into two tracks. It deleOnce both agents respond, the leader cross-references their findings, flags anything contradictory, and writes a final report with an executive summary, sourced key findings, and open questions.-The Gradio app uses the same stream-buffering technique as the other projects in this repo — output is held until the first markdown heading appears, so the UI never shows raw model narration.+The Gradio app uses the same stream-buffering technique as the other projects in this repo. Output is held until the first markdown heading appears, so the UI never shows raw model narration.[Back to Top](#research-team)diff --git a/ai_agents/research_team/agents/scout.py b/ai_agents/research_team/agents/scout.pyindex caff2ca..efa201b 100644--- a/ai_agents/research_team/agents/scout.py+++ b/ai_agents/research_team/agents/scout.py@@ -12,6 +12,7 @@ KNOWLEDGE_DIR = Path(__file__).parent.parent / "knowledge"def get_scout() -> Agent:+ """Build and return the Scout agent configured to read and surface information from local files in the knowledge directory."""return Agent(name="Scout",role="Internal knowledge navigator",diff --git a/ai_agents/research_team/agents/seek.py b/ai_agents/research_team/agents/seek.pyindex 9ec1962..f544922 100644--- a/ai_agents/research_team/agents/seek.py+++ b/ai_agents/research_team/agents/seek.py@@ -11,6 +11,7 @@ from models import get_modeldef get_seek() -> Agent:+ """Build and return the Seek agent configured for external web research using DuckDuckGo and WebsiteTools."""return Agent(name="Seek",role="External web researcher",diff --git a/ai_agents/research_team/app.py b/ai_agents/research_team/app.pyindex ccff855..23ca025 100644--- a/ai_agents/research_team/app.py+++ b/ai_agents/research_team/app.py@@ -1,5 +1,5 @@"""-Research Team — Gradio UI+Research Team: Gradio UISeek + Scout powered by MiniMax M2.5 via OpenRouter.Usage:@@ -64,6 +64,7 @@ def list_docs() -> str:# ── Research Function ──────────────────────────────────────────────────────────def run_research(query: str):+ """Run the research team on the given query and yield the report and status as it streams."""query = query.strip()if not query:yield PLACEHOLDER, ""@@ -82,6 +83,7 @@ def run_research(query: str):def clear_all():+ """Reset the query input, report output, and status box to their default empty state."""return "", PLACEHOLDER, ""diff --git a/ai_agents/research_team/models.py b/ai_agents/research_team/models.pyindex 2fb6925..0c6724a 100644--- a/ai_agents/research_team/models.py+++ b/ai_agents/research_team/models.py@@ -6,6 +6,7 @@ MODEL_ID = "minimax/minimax-m2.5:free"def get_model() -> OpenAILike:+ """Return a configured OpenAILike model instance pointed at MiniMax M2.5 via OpenRouter."""return OpenAILike(id=MODEL_ID,api_key=os.getenv("OPENROUTER_API_KEY"),diff --git a/ai_agents/research_team/team.py b/ai_agents/research_team/team.pyindex ffb2882..2c4d332 100644--- a/ai_agents/research_team/team.py+++ b/ai_agents/research_team/team.py@@ -36,6 +36,7 @@ def _has_knowledge() -> bool:def build_instructions() -> str:+ """Build the team leader's instruction string, adapting the workflow based on whether the knowledge directory has files."""if _has_knowledge():scout_note = ("- Scout: Internal knowledge navigator. Use Scout to search the "