Skip to content

schow9527/Multiagents-Codereview

Repository files navigation

PR Auto Review Multi-Agent System

基于 uv + LangGraph + FastAPI + Celery 的 PR 自动化 Code Review 系统。

Quick Start

  1. 安装依赖
uv sync
  1. 配置环境变量
cp .env.example .env
  1. 启动 API
uv run uvicorn apps.api.main:app --reload --host 0.0.0.0 --port 8000
  1. 启动 Worker
uv run celery -A apps.worker.celery_app:celery_app worker -l INFO
  1. 回放 webhook(本地联调)
uv run python scripts/replay_webhook.py --payload samples/pull_request_opened.json --secret "$GITHUB_WEBHOOK_SECRET"

Architecture

FastAPI(Webhook) -> Celery -> LangGraph -> GitHub Comment/Label/Check

Tool agents (security/readability/performance/test) now run in a ReAct loop with bind_tools + ToolNode for tool-calling orchestration. Reflexion memory is persisted in SQLite and injected into future agent runs. Runtime control adds trace/span logging, per-step latency metrics, token budget, LLM concurrency quotas, and dynamic prompt trimming.

Notes

  • Worker 只扫描 PR 变更的 Python 文件,避免全仓扫描造成噪音和性能问题。
  • Parser / Supervisor / Consensus 不执行 PR 代码,仅做 API/LLM 逻辑。

About

This is a system to do code-review automatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages