Multi-agent code review system using LangGraph
Project description
SCX Code Agent
多智能体代码审查系统,基于 LangGraph 构建。
安装
poetry install
配置
方式一:配置文件(推荐)
在项目根目录创建 .scx-code-agent.yaml:
provider:
name: deepseek
model: deepseek-v4-flash
api_key: ${LLM_API_KEY}
base_url: https://api.deepseek.com
review:
max_workers: 5
skip_dirs:
- node_modules
- .venv
示例配置文件:
cp .scx-code-agent.yaml.example .scx-code-agent.yaml
方式二:环境变量
复制 .env.example 为 .env 并配置:
cp .env.example .env
配置优先级
命令行参数 > 配置文件 > 环境变量 > 默认值
使用
全量审查
# 扫描当前目录
poetry run scx-code-agent --all
# 扫描指定路径
poetry run scx-code-agent --path src/
增量审查(PR)
poetry run scx-code-agent --diff origin/main
输出选项
# 输出到文件
poetry run scx-code-agent --path src/ --output dist/report.md
# JSON 格式输出
poetry run scx-code-agent --path src/ --format json --output dist/report.json
PR 评论(CI/CD)
在 GitHub Actions 等环境中,可将审查结果发表为 PR 评论:
# 设置 GitHub Token
export GITHUB_TOKEN=ghp_xxx
# 发表 PR 评论
poetry run scx-code-agent --diff origin/main --pr-comment
环境变量:
GITHUB_TOKEN: GitHub Personal Access Token(需要repo:status权限)GITHUB_REPOSITORY: 仓库路径(可选,通常自动检测)
架构
- Coordinator: 文件收集与分发
- Security Expert: 安全审查
- Architecture Expert: 架构审查
- Performance Expert: 性能审查
- Reporter: 报告生成与格式化
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scx_code_agent-0.1.1.tar.gz
(19.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scx_code_agent-0.1.1.tar.gz.
File metadata
- Download URL: scx_code_agent-0.1.1.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b1bb27fec8fad8e82bd1c936989a4a2dbd9dc5d8a19090fff190a725c54f276
|
|
| MD5 |
c344202e07d29dca3f6e56abb853b0ad
|
|
| BLAKE2b-256 |
6191fef2fef4a3eaf45a13071aee4e5865125c55cf4614d4deb5be3f63e7360d
|
File details
Details for the file scx_code_agent-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scx_code_agent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1cd31b69f1da22f68307e44def6b83be68862acbef0409ac9659bcd5a46ed24
|
|
| MD5 |
7231b893f8001162fb4f28c47a2eee96
|
|
| BLAKE2b-256 |
fc6b5da5783b42b7d8d04db1fe0376909788d46dcdc174510353df64f2f969b3
|