SWE-AF — AI Agent 工作流中文教程 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.3 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
SWE-AF — AI Agent 工作流中文教程 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
SWE-AF — AI Agent 工作流中文教程 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install swe-af
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install swe-af
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/Agent-Field/SWE-AF
cd SWE-AF
pip install -e .
# 验证安装
python -c "import swe_af; print('安装成功')"
# 命令行使用
swe-af --help
# 基本用法
swe-af input_file -o output_file
# Python 代码中调用
import swe_af
# 示例
result = swe_af.process("input")
print(result)
# swe-af 配置文件示例(config.yml) app: name: "swe-af" debug: false log_level: "INFO" # 运行时指定配置文件 swe-af --config config.yml # 或通过环境变量配置 export SWE_AF_API_KEY="your-key" export SWE_AF_OUTPUT_DIR="./output"
af)Rust-based Python compiler benchmark (built autonomously):
| Metric | CPython (subprocess) | RustPython (SWE-AF) | Improvement |
|---|---|---|---|
| Steady-state execution | Baseline (~19ms) | Optimized in-process runtime | **88.3x-602.3x faster** |
| Geometric mean | 1.0x baseline | 253.8x | **253.8x** |
| Peak throughput | ~52 ops/s | 31,807 ops/s | **~612x** |
<details> <summary>Measurement methodology</summary>
Throughput comparison measures different execution models: CPython subprocess spawn (~19ms per call → ~52 ops/s) vs RustPython pre-warmed interpreter pool (in-process). This is the real-world tradeoff the system was built to optimize — replacing repeated subprocess invocations with a persistent pool for short-snippet execution.
</details>
Artifact trail includes 175 tracked autonomous agents across planning, coding, review, merge, and verification.
One click deploys SWE-AF + AgentField control plane + PostgreSQL. Set two environment variables in Railway:
CLAUDE_CODE_OAUTH_TOKEN — run claude setup-token in Claude Code CLI (uses Pro/Max subscription credits)GH_TOKEN — GitHub personal access token with repo scope for PR creationOnce deployed, trigger a build:
curl -X POST https://<control-plane>.up.railway.app/api/v1/execute/async/swe-planner.build \
-H "Content-Type: application/json" \
-H "X-API-Key: this-is-a-secret" \
-d '{"input": {"goal": "Add JWT auth", "repo_url": "https://github.com/user/my-repo"}}'
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
```bash
<p align="center"> <img src="assets/archi.png" alt="SWE-AF architecture" width="100%" /> </p>
Typical runs spin up 400-500+ agent instances across planning, execution, QA, and verification. For larger DAGs and repeated adaptation/replanning cycles, SWE-AF can scale into the high hundreds to thousands of agent invocations in a single build.
```bash cp .env.example .env
Pass repo_url instead of repo_path to let SWE-AF clone and open a PR after execution.
curl -X POST http://localhost:8080/api/v1/execute/async/swe-planner.build \
-H "Content-Type: application/json" \
-d @- <<'JSON'
{
"input": {
"repo_url": "https://github.com/user/my-project",
"goal": "Add comprehensive test coverage",
"config": {
"runtime": "claude_code",
"models": {
"default": "sonnet",
"coder": "opus",
"qa": "opus"
}
}
}
}
JSON
Requirements:
GH_TOKEN in .env with repo scopePOST /api/v1/execute/async/swe-planner.build
Coding and review agents can look up external documentation, library APIs, error messages, and version/deprecation status during a build. This is opt-in via two env vars on the deployment:
OPENCODE_ENABLE_EXA=1
EXA_API_KEY=...
When set, opencode's built-in websearch and webfetch tools become available to every reasoner running through the open runtime — the model decides when to use them based on the task. Get a key at exa.ai.
The coder reasoner additionally gets a brief restraint guideline appended to its system prompt, so a long coding loop doesn't rabbit-hole on searches it could answer by reading the codebase. No setup required beyond the env vars; the wiring inherits parent env naturally through agentfield's CLI harness.
This works on the open runtime (opencode). The Claude runtime uses Anthropic's first-party WebSearch/WebFetch and is currently not wired here — file an issue if you want it.
docker compose up -d
Submit a build:
bash
curl -X POST http://localhost:8080/api/v1/execute/async/swe-planner.build \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "input": { "goal": "Add JWT auth", "repo_url": "https://github.com/user/my-repo", "config": { "runtime": "open_code", "models": { "default": "openrouter/minimax/minimax-m2.5" } } } } JSON
curl -X POST http://localhost:8080/api/v1/execute/async/swe-planner.build \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "input": { "goal": "Add JWT auth", "repo_url": "https://github.com/user/my-project", "config": { "runtime": "codex", "models": { "default": "gpt-5.3-codex" } } } } JSON
curl -X POST http://localhost:8080/api/v1/execute/async/swe-fast.build \ -H "Content-Type: application/json" \ -d @- <<'JSON' { "input": { "goal": "Add a focused bug fix", "repo_url": "https://github.com/user/my-project", "config": { "runtime": "codex", "models": { "default": "gpt-5.3-codex" } } } } JSON
<details> <summary><strong>Agent endpoints</strong></summary>
Core async endpoints (returns an execution_id immediately):
```bash
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,SWE-AF — AI Agent 工作流中文教程 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | SWE-AF |
| 原始描述 | Autonomous software engineering fleet of AI agents for production-grade PRs on AgentField: plan, code, test, and ship. |
| Topics | agent-factoryagentfieldagentic-aiai-agentsai-factoryautonomous-agentsagent |
| GitHub | https://github.com/Agent-Field/SWE-AF |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-05-22 · 更新时间:2026-05-22 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端