PhishGuard AI is a modular AI-powered system for detecting phishing emails using an Agent-to-Agent (A2A) communication architecture. The system is built with:
- LangGraph for agent logic (Analyzer & Verifier)
- FastAPI for hosting agents as microservices
- Ollama (LLaMA/DeepSeek) as the local LLM backend
- Streamlit for an interactive and styled web interface
The system allows users to analyze emails in two ways:
- Structured Input – Enter subject, sender, and email body
- Raw Email Input – Paste entire email content for analysis
Agent A analyzes the email and forwards results to Agent B, which verifies and confirms phishing status. Results are displayed with color-coded risk levels in the UI.
- Agent-to-Agent (A2A) Architecture for modular communication
- Two Input Modes: Structured fields & raw email paste
- Styled Streamlit UI with color-coded results (Safe/Warning/Danger)
- Local LLM Inference using Ollama (free)
- Scalable Microservices (FastAPI agents can be deployed separately)
- **Agent A**: Detects phishing indicators using LLM prompts
- **Agent B**: Performs secondary verification (keywords, domains)
---
## Tech Stack
- **Backend (Agents):** Python, FastAPI, LangGraph
- **LLM Backend:** Ollama (LLaMA 3 / DeepSeek)
- **Frontend (UI):** Streamlit
- **Communication:** A2A (HTTP between agents)
---
## Installation & Setup
### 1. Clone Repository
```bash
git clone <repo-url>
cd phishguard-ai
uv pip install -r requirements.txtRun both agents via batch script:
start_agents.batOR manually:
python -m uvicorn services.agent_b_service:app --port 8001 --reload
python -m uvicorn services.agent_a_service:app --port 8000 --reloadstreamlit run app.pyOpen browser: http://localhost:8501
- Enter Subject, Sender, Body OR paste full email content.
- Click Analyze Email.
- View:
- Agent A (Analyzer) response
- Agent B (Verifier) final decision
- Results are color-coded (Safe, Suspicious, Phishing).
- Run LangGraph logic directly inside Streamlit app (no A2A)
Pull requests and feature suggestions are welcome. Open an issue for discussion before major changes.