An autonomous GitHub issue fixer powered by 11 specialized AI agents built with LangGraph StateGraph. Give it a GitHub issue. It researches, fixes, tests, audits, and ships a Pull Request — automatically.
\
GitHub Issue → Code Reader → Router ──► SIMPLE ──────────────────► Planner
└──► COMPLEX ──► Researcher ──► Planner
│
Code Writer
│
Test Writer
│ │
PASSED FAILED (retry x3)
│ │
└───────┘
│
Security Auditor
│
Summarizer
│
PR Opener
│
Notifier
│
Discord Notification
\\
| # | Agent | Role | Type |
|---|---|---|---|
| 01 | Code Reader | Reads relevant repo files via GitHub API | Core |
| 02 | Router | Classifies issue as SIMPLE or COMPLEX | Core |
| 03 | Researcher | Deep research for complex issues only | NEW |
| 04 | Planner | Creates step-by-step fix strategy | Core |
| 05 | Code Writer | Writes the patch with self-healing | Core |
| 06 | Test Writer | Writes + runs pytest unit tests | Core |
| 07 | Security Auditor | Scans for vulnerabilities | NEW |
| 08 | Summarizer | Writes professional PR description | NEW |
| 09 | PR Opener | Opens Pull Request on GitHub | Core |
| 10 | Notifier | Posts comment on original issue | Core |
| 11 | Discord Notifier | Sends rich embed to Discord | NEW |
The Router agent classifies each issue before the pipeline runs:
- SIMPLE issues skip straight to the Planner (fast path)
- COMPLEX issues trigger the Researcher agent first (deep path)
This is implemented using LangGraph conditional edges — the core difference between graph-based and chain-based agent systems.
If the generated tests fail, the system automatically:
- Sends the test error back to the Code Writer
- Code Writer rewrites the patch with the error as context
- Test Writer runs again
- Repeats up to 3 times before continuing
This is a cycle in the graph — the most advanced LangGraph pattern.
Built with FastAPI + Server-Sent Events (SSE). Every agent lights up in real time as it runs. No polling — pure streaming.
| Tool | Purpose |
|---|---|
| LangGraph | Agent orchestration (StateGraph) |
| Groq (llama-3.1-8b-instant) | Free LLM inference |
| PyGithub | GitHub API — branches, PRs, comments |
| FastAPI + SSE | Real-time dashboard backend |
| Vanilla JS | Live frontend (no framework needed) |
| pytest | Automated test execution |
| Discord Webhooks | Rich notifications |
\\�ash git clone https://github.com/ggbadbi/multi-agent-test cd multi-agent-test python -m venv venv venv\Scripts\activate # Windows pip install -r requirements.txt \\
\
GROQ_API_KEY=gsk_...
GITHUB_TOKEN=ghp_...
GITHUB_REPO=username/repo-name
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
\\
\\�ash uvicorn dashboard.app:app --reload --port 8000 \\
Go to http://localhost:8000, enter a GitHub issue number, hit Run Pipeline.
\\�ash python main.py \\
Every pipeline run automatically:
- Opens a Pull Request with the fix + tests
- Posts a comment on the original issue
- Sends a Discord notification with full summary
\
multi-agent-orchestrator/
├── agents/
│ ├── state.py # Shared AgentState TypedDict
│ ├── code_reader.py # GitHub repo reader
│ ├── router.py # Complexity classifier
│ ├── researcher.py # Deep research (complex issues)
│ ├── planner.py # Fix strategy creator
│ ├── code_writer.py # Patch writer (self-healing)
│ ├── test_writer.py # Test writer + runner
│ ├── security_auditor.py # Vulnerability scanner
│ ├── summarizer.py # PR description writer
│ ├── pr_opener.py # GitHub PR creator
│ ├── notifier.py # GitHub comment poster
│ └── discord_notifier.py # Discord webhook sender
├── dashboard/
│ ├── app.py # FastAPI + SSE backend
│ └── static/
│ └── index.html # Live dashboard UI
├── main.py # CLI entry point + graph builder
├── requirements.txt
└── .env # API keys (never commit)
\\
- LangGraph StateGraph — graph-based vs chain-based agent orchestration
- Conditional edges — routing agents based on live state
- Cyclic graphs — self-healing feedback loops
- Server-Sent Events — real-time streaming without WebSockets
- GitHub API — programmatic branch/PR/comment management
- Agentic design patterns — single responsibility, shared state, error recovery
Built by @ggbadbi
This project was built to demonstrate real-world multi-agent system design using modern AI engineering tools.
