# abdu9991/multi_agent_research architecture

> Architecture diagram of the GitHub repository abdu9991/multi_agent_research, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdu9991/multi_agent_research
- Repository: https://github.com/abdu9991/multi_agent_research

## Overview

This is a FastAPI research application for goal-directed problem solving and evaluation. A user reaches the web UI or submits a solve request; the app handles simple supported problems locally or dispatches other problems to a sequential CrewAI workflow, then records outcomes for run history and evaluation metrics. The graph also captures the documented protected dashboard and Firebase sign-in/sign-up capability. Source excerpts show the solve dispatch and agent/tool setup; some UI and authentication implementation details are documented but not sampled.

Main entry points: [`app.py`](https://github.com/abdu9991/multi_agent_research/blob/blog/app.py) (API and Routes), [`agents.py`](https://github.com/abdu9991/multi_agent_research/blob/blog/agents.py) (Specialist Agents), [`main.py`](https://github.com/abdu9991/multi_agent_research/blob/blog/main.py) (Crew Orchestrator), [`templates/index.html`](https://github.com/abdu9991/multi_agent_research/blob/blog/templates/index.html) (Dashboard Metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Application"]
  node_app["API and Routes<br/>[app.py]"]
  node_ui["Web UI"]
  node_firebase["Firebase Auth"]
  node_dashboard["Dashboard Metrics<br/>[index.html]"]
end

subgraph group_solving["Problem Solving"]
  node_fastpath["Fast-Path Solver<br/>[app.py]"]
  node_tools["Reasoning Tools<br/>[tools.py]"]
end

subgraph group_workflow["Agent Workflow"]
  node_crew["Crew Orchestrator<br/>[main.py]"]
  node_tasks["Task Builder<br/>[tasks.py]"]
  node_agents["Specialist Agents<br/>[agents.py]"]
  node_llm["LLM Provider"]
end

subgraph group_evaluation["Run Evaluation"]
  node_runstore[("Run History<br/>[app.py]")]
  node_metrics["Evaluation Metrics<br/>[metrics.py]"]
end

node_user(("User"))

node_user -->|"requests pages or APIs"| node_app
node_app -->|"renders templates"| node_ui
node_user -.->|"signs in or up"| node_firebase
node_firebase -.->|"authenticates access"| node_ui
node_app -->|"tries local solve"| node_fastpath
node_app -->|"dispatches solve"| node_crew
node_crew -->|"builds tasks"| node_tasks
node_crew -->|"runs agents"| node_agents
node_tasks -->|"assigns tasks"| node_agents
node_agents -->|"uses tools"| node_tools
node_agents -->|"calls selected model"| node_llm
node_app -->|"reads and writes runs"| node_runstore
node_app -->|"evaluates runs"| node_metrics
node_app -.->|"serves dashboard"| node_dashboard
node_dashboard -.->|"requests metrics and history"| node_app

click node_app "https://github.com/abdu9991/multi_agent_research/blob/blog/app.py"
click node_ui "https://github.com/abdu9991/multi_agent_research/tree/blog/templates"
click node_fastpath "https://github.com/abdu9991/multi_agent_research/blob/blog/app.py"
click node_crew "https://github.com/abdu9991/multi_agent_research/blob/blog/main.py"
click node_tasks "https://github.com/abdu9991/multi_agent_research/blob/blog/tasks.py"
click node_agents "https://github.com/abdu9991/multi_agent_research/blob/blog/agents.py"
click node_tools "https://github.com/abdu9991/multi_agent_research/blob/blog/tools.py"
click node_runstore "https://github.com/abdu9991/multi_agent_research/blob/blog/app.py"
click node_metrics "https://github.com/abdu9991/multi_agent_research/blob/blog/metrics.py"
click node_dashboard "https://github.com/abdu9991/multi_agent_research/blob/blog/templates/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_ui,node_firebase,node_dashboard,node_user toneBlue
class node_fastpath,node_tools toneAmber
class node_crew,node_tasks,node_agents,node_llm toneMint
class node_runstore,node_metrics toneRose
```

## Components

### Web Application

- [API and Routes](https://github.com/abdu9991/multi_agent_research/blob/blog/app.py): `app.py`
- [Web UI](https://github.com/abdu9991/multi_agent_research/tree/blog/templates): `templates`
- **Firebase Auth**
- [Dashboard Metrics](https://github.com/abdu9991/multi_agent_research/blob/blog/templates/index.html): `templates/index.html`

### Problem Solving

- [Fast-Path Solver](https://github.com/abdu9991/multi_agent_research/blob/blog/app.py): `app.py`
- [Reasoning Tools](https://github.com/abdu9991/multi_agent_research/blob/blog/tools.py): `tools.py`

### Agent Workflow

- [Crew Orchestrator](https://github.com/abdu9991/multi_agent_research/blob/blog/main.py): `main.py`
- [Task Builder](https://github.com/abdu9991/multi_agent_research/blob/blog/tasks.py): `tasks.py`
- [Specialist Agents](https://github.com/abdu9991/multi_agent_research/blob/blog/agents.py): `agents.py`
- **LLM Provider**

### Run Evaluation

- [Run History](https://github.com/abdu9991/multi_agent_research/blob/blog/app.py): `app.py`
- [Evaluation Metrics](https://github.com/abdu9991/multi_agent_research/blob/blog/metrics.py): `metrics.py`

### Other components

- **User**

## Connections

- User → API and Routes: requests pages or APIs (evidence: `README.md`)
- API and Routes → Web UI: renders templates (evidence: `app.py`)
- User → Firebase Auth: signs in or up (evidence: `README.md`)
- Firebase Auth → Web UI: authenticates access (evidence: `README.md`)
- API and Routes → Fast-Path Solver: tries local solve (evidence: `app.py`)
- API and Routes → Crew Orchestrator: dispatches solve (evidence: `app.py`)
- Crew Orchestrator → Task Builder: builds tasks (evidence: `main.py`)
- Crew Orchestrator → Specialist Agents: runs agents (evidence: `main.py`)
- Task Builder → Specialist Agents: assigns tasks (evidence: `tasks.py`)
- Specialist Agents → Reasoning Tools: uses tools (evidence: `agents.py`)
- Specialist Agents → LLM Provider: calls selected model (evidence: `agents.py`)
- API and Routes → Run History: reads and writes runs (evidence: `app.py`)
- API and Routes → Evaluation Metrics: evaluates runs (evidence: `app.py`)
- API and Routes → Dashboard Metrics: serves dashboard (evidence: `README.md`)
- Dashboard Metrics → API and Routes: requests metrics and history (evidence: `README.md`)
