SWE-AF Engineering Factory
An autonomous engineering team that plans, codes, tests, and can deliver production PRs from a software goal.
What does this agent do, and when should you use it?
SWE-AF is an autonomous software-engineering team runtime built on AgentField and registered as the swe-planner and swe-fast nodes. A build generates a PRD, architecture, and issue dependency DAG, then coordinates coding, QA, review, and merging in isolated Git worktrees. It accepts a remote repo_url, a local repo_path, or a multi-repository configuration with primary and dependency roles. Outputs can include commits, branches, verification results, and optionally a GitHub pull request; execution state is available through AgentField execution endpoints. The repository maintains both a Python implementation and a Go node: af install installs the Go node, while the Python implementation runs through python -m swe_af or Docker Compose.
A swe-planner.build call runs run_product_manager, run_architect, run_tech_lead, and run_sprint_planner to turn a goal into an issue DAG. Each issue is handled in an isolated worktree by run_coder, run_qa, run_code_reviewer, and run_qa_synthesizer; failures can be adapted, split, accepted with debt, or escalated by run_issue_advisor, while run_replanner can restructure the remaining DAG. run_merger, run_integration_tester, and run_verifier then integrate changes and check acceptance criteria, with artifacts written under .artifacts/plan, execution, and verification. For already-scoped work, swe-planner.implement_issue skips planning and returns an isolated branch, commits, changed files, and verification data; enable_github_pr can push that branch and open a PR.
- An engineering lead managing one GitHub repository who wants a feature such as JWT authentication decomposed, implemented, tested, and prepared as a reviewable PR.
- A team changing a primary application and a shared SDK together, using config.repos to coordinate primary and dependency repositories.
- A Claude Code, Codex, or OpenCode user who has already scoped an issue and wants to delegate it through implement_issue while retaining control of merging.
- A repository maintainer who wants a bounded repair loop after GitHub Actions checks fail on a PR created by the system.
- A development team that needs work performed against a local checkout without changing the caller’s current branch or uncommitted working state.
What are this agent's strengths and limitations?
- Covers a full engineering path—requirements, architecture review, parallel implementation, QA, merge, integration testing, and acceptance verification—rather than a single coding loop.
- Dependency scheduling plus isolated Git worktrees supports parallel issue execution without branch collisions.
- Its documented three-level control system handles retries, issue-level adaptation, and remaining-DAG replanning.
- Supports role-specific model selection across claude_code, open_code, and codex runtimes.
- The implement_issue entry point offers issue-level delegation for other coding harnesses while preserving the caller’s checkout.
- The full build is a feature-level process that the documentation says can take hours and invoke hundreds or more model calls.
- Operation depends on AgentField, reachable Git repositories, network access, and provider credentials; private repositories and PR workflows also need GH_TOKEN.
- Role-model maps, retry budgets, provider selection, and Docker environment settings introduce meaningful operational and cost-management overhead.
- Codex deployments in the Docker image must set SWE_DEFAULT_MODEL or pass a Codex model per build, or model resolution can select an incompatible OpenCode model ID.
- Codex workspace-write depends on Linux user namespaces, so some WSL2 or hardened hosts can fail with bubblewrap permissions and prevent file writes.
How do you install or deploy this agent?
With an existing AgentField control plane, run:
af install https://github.com/Agent-Field/SWE-AF
af run swe-planner
The first run requires an LLM credential: ANTHROPIC_API_KEY or OPENROUTER_API_KEY. Add a GH_TOKEN with repo scope when builds need private-repository access, branch pushes, or PR creation. For the local Python implementation, create a Python 3.12+ virtual environment, run python -m pip install -e ".[dev]", start af, then run python -m swe_af.
How do you use this agent?
A minimal build request is:
curl -X POST http://localhost:8080/api/v1/execute/async/swe-planner.build \
-H "Content-Type: application/json" \
-d '{"input":{"goal":"Add JWT auth","repo_url":"https://github.com/user/my-project"}}'
For the Codex CLI runtime, set "runtime":"codex" and "models":{"default":"gpt-5.3-codex"} in config. ChatGPT subscription authentication requires the Codex CLI on the host, a completed codex login, and SWE_CODEX_AUTH_MODE=chatgpt or auto. For API-platform billing, set SWE_CODEX_AUTH_MODE=api_key and OPENAI_API_KEY.
How does this agent compare with similar options?
The repository reports a benchmark using the same Node.js CLI todo-app prompt: SWE-AF with haiku routing and with MiniMax M2.5 each scored 95/100, compared with Claude Code Sonnet at 73, Codex o3 at 62, and Claude Code Haiku at 59. This is a project-reported result for one evaluated task, useful for assessing the workflow but not a general performance guarantee.