AgentCrops
基于 LLM 的 AI 软件工程工具,支持自动代码修复、扫描、设计、开发、测试全流程。提供 CLI 命令行和 TUI 终端界面两种使用方式。
安装
pip install agentcrops
或从源码安装:
git clone <repo-url> AgentCrops
cd AgentCrops
pip install -e ".[dev]"
需要 Python >= 3.11。
快速开始
# 设置 API Key
export ANTHROPIC_API_KEY="sk-ant-..."
# 修复单个文件中的 bug
agentcrops fix src/app.py
# 扫描目录中的潜在问题
agentcrops scan src/
CLI 命令
| 命令 | 说明 |
|---|---|
agentcrops fix <文件> |
分析并修复文件中的 bug(多 Agent 协作) |
agentcrops scan [目录] |
扫描目录中的潜在 bug |
agentcrops design <需求.md> |
根据需求生成架构设计文档 |
agentcrops develop <需求.md> |
根据需求生成可运行代码 |
agentcrops test <目标> |
为指定代码编写并运行测试 |
agentcrops build <需求.md> |
运行完整构建流水线(设计→开发→测试) |
agentcrops serve |
启动 HTTP API 服务(供 TUI 使用) |
agentcrops config show |
查看当前配置 |
agentcrops config get <键> |
获取指定配置项 |
agentcrops config set <键> <值> |
设置配置项(仅运行时) |
agentcrops skill list |
列出已注册技能 |
agentcrops kb list |
列出知识库适配器 |
TUI 终端界面(actui)
除了 CLI 命令行,AgentCrops 还提供了一个 Ink/React 构建的终端 UI,支持多 Agent 协作的可视化操作。
启动
# 方式 1:一键启动脚本(推荐)
./actui.sh
# 方式 2:手动分别启动
# 终端 1 — 启动后端服务
agentcrops serve
# 终端 2 — 启动 TUI
cd src/actui && npm run dev
功能
- 多 Tab 切换 — 同时与多个 Agent(Leader / Architect / Coder / Tester / Reviewer)对话
- 实时 SSE 流 — Agent 回复逐字显示,支持 tool call 可视化
- 命令面板 — 输入
/fix、/scan、/build等命令直接触发工作流 - 团队面板 — 侧边栏实时显示各 Agent 状态和任务进度
- 键盘快捷键 —
Ctrl+C退出,Alt+1~9切换 Tab,Ctrl+B切换侧边栏
连接自定义服务端
默认连接 http://localhost:8730,可通过环境变量修改:
ACTUI_SERVER_URL=http://192.168.1.100:8730 npm run dev
核心特性
- 多 Agent 组队 — Leader 协调 + Architect / Coder / Tester / Reviewer 分工协作
- 多后端支持 — Claude Agent SDK、Cursor SDK 或任意 OpenAI 兼容 API
- 工具调用 — Agent 可读写文件、执行 shell、操作 git、运行测试
- 技能系统 — 可插拔分析模块(静态分析、测试生成等)
- 知识库 — 绑定团队文档、编码规范和 bug 历史以提升修复质量
- 安全保护 — Shell 沙箱、文件访问边界控制、API Key 脱敏、自动备份
配置
AgentCrops 使用 .agentcrops.toml 配置文件,优先级从高到低:
环境变量 (最高)
↓
项目 .agentcrops.toml
↓
用户 ~/.agentcrops/config.toml
↓
内置默认值 (最低)
详细配置参考见 docs/usage-guide.md。
文档
License
MIT — 详见 LICENSE。
Release files for agentcrops 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentcrops-0.2.1.tar.gz | 5.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentcrops-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:5.3 MB
Release files / agentcrops-0.2.1.tar.gz
| Download URL | agentcrops-0.2.1.tar.gz |
|---|---|
| Size | 5.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0afdeaf74e97de44a419ab65352d0b95720fbbbdc9aa6c72a408025d069d86d1
|
|
BLAKE2b-256 checksum How to use checksums |
a14a9cb2faff58cc95f34b92feca683f41e145cc10a8a465d54907302f38cec8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / agentcrops-0.2.1-py3-none-any.whl
| Download URL | agentcrops-0.2.1-py3-none-any.whl |
|---|---|
| Size | 186.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c32adf1d245d1ebf865029b46bea4292e4808ac98aae8c91776c40080ad8efb3
|
|
BLAKE2b-256 checksum How to use checksums |
141e1d1e3f465a7774d27e3b8947e8d3ac56651b0a4e720e99c9b2764b14e0c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|