Skip to main content

Multi-agent LangGraph framework for autonomous software development

Project description

swe-forge

PyPI

Multi-agent LangGraph framework for autonomous software development.

swe-forge takes a one-line prompt and runs it through a 10-node graph (clarification → spec → plan → fan-out tasks → parallel quality gates → issue triage → ship), commits artifacts to a brand-new GitHub repo, filed issues for every finding, opens a pull request on a feature branch, and pushes a tagged release when the quality gates pass.

The PyPI distribution is swe-forge; the Python module is flowforge. Use the swe-forge command after installing.

Quick start

# 1. install from PyPI
pip install swe-forge

# 2. configure provider/model (one-time, interactive)
swe-forge setup

# 3. run a prompt — auto-creates a private GitHub repo and pushes there
swe-forge run "build tic-tac-toe web app"

# common flags
swe-forge run "<prompt>" --repo my-name      # use/create a specific repo
swe-forge run "<prompt>" --skip-github       # local-only, no remote
swe-forge run "<prompt>" --no-studio         # skip LangGraph Studio

Generated projects land in ~/flowforge-workspace/<slug>/ and are pushed to https://github.com/<you>/<slug>. The swe-forge source repo itself is never written to.

Prerequisites

  • Python ≥ 3.12
  • gh CLI authenticated (gh auth login) — for repo creation + issue filing
  • One provider credential, depending on swe-forge setup choice:
    • GitHub Copilot (default): gh auth token is used — no extra setup
    • OpenAI / Codex: export OPENAI_API_KEY=...
    • Claude Code: export ANTHROPIC_API_KEY=...

swe-forge setup — interactive walkthrough

$ swe-forge setup
━━━ FlowForge Setup ━━━

Which AI assistant integration do you use?
  1) GitHub Copilot (uses GitHub Models API)
  2) OpenAI Codex (uses OpenAI API)
  3) Claude Code (uses Anthropic API)
Select provider [1]: 1

  Using GitHub Models API at https://models.inference.ai.azure.com
  Authentication: `gh auth token` (ensure `gh` CLI is logged in)
  Model (gpt-4o-mini, gpt-4o, o1-mini, o1-preview) [gpt-4o-mini]: gpt-4o-mini

  Create repos as private by default? [Y/n]: Y
  LangGraph Studio port [8123]: 8123

✅ Config saved to ~/.flowforge/config.json
   Provider: copilot
   Model: gpt-4o-mini
   Studio port: 8123

Config persists at ~/.flowforge/config.json (mode 0600). Re-run swe-forge setup any time to switch model or provider.

Demo: build tic-tac-toe web app

Real run from pip install swe-forge (v0.1.42) using gpt-4o-mini via GitHub Copilot.

Command

swe-forge run "build tic-tac-toe web app" \
  --repo tic-tac-toe-demo --no-studio

Terminal output

  ✓ Created GitHub repo tic-tac-toe-demo → https://github.com/<you>/tic-tac-toe-demo
  ✓ Created feature branch flowforge/run-20260606-000022
======================================================================
FlowForge — AI-Powered Code Generation Pipeline
======================================================================

  Prompt: build tic-tac-toe web app
  Provider: copilot
  Model: gpt-4o-mini
  Workdir: ~/flowforge-workspace/tic-tac-toe-demo
  Branch:  flowforge/run-20260606-000022

━━━ Running Pipeline via LangGraph API ━━━

  ━━━ Node: clarification_node ━━━
     + docs/spec/tic-tac-toe-web-app.md
     ✓ clarification_node done in 4.9s
  ━━━ Node: spec_node ━━━
     · 5 acceptance criteria | stack: HTML5, CSS3, JavaScript >= ES6, React 17+
     + docs/plans/tic-tac-toe-web-app.md
     ✓ spec_node done in 8.3s
  ━━━ Node: plan_node ━━━
     · 3 phases | 6 tasks | 6 deps
     ✓ plan_node done in 0.0s
  ━━━ Node: task_fanout_router ━━━
     + package.json
     + public/index.html
     + src/GameBoard.js
     + src/GameBoard.test.js
     + src/components/GameControls.js
     + src/components/GameControls.test.js
     + src/index.js
     + src/scoreTracker.js
     + src/styles/responsive.css
     + test/scoreTracker.test.js
     + tests/setup.test.js
     ✓ task_fanout_router done in 59.2s
  ━━━ Node: task_node ━━━
     · 6 tasks: succeeded=4, failed=2 | 12 artifacts
     ✓ task_node done in 0.0s
  ━━━ Node: quality_gate_join ━━━
     + docs/reviews/code-review-checkpoint-1.md
     + docs/security-audits/security-audit-1.md
     + docs/test-reports/test-report-1.md
     ✓ quality_gate_join done in 9.1s
  ━━━ Node: security_audit_node ━━━
     · security: 2 findings (high=1, medium=1)
  ━━━ Node: test_engineer_node ━━━
     · test: 3 findings (critical=1, high=1, medium=1)
  ━━━ Node: code_review_node ━━━
     · review: 5 findings (critical=2, high=1, medium=2)
  ━━━ Node: quality_gate_merge ━━━
     + docs/triage/triage-report-1.md
     ✓ quality_gate_merge done in 25.5s
  ━━━ Node: issue_orchestrator_node ━━━
     · 10 triaged: can_follow_up=8, must_fix_before_ship=2
     ~ README.md
     ✓ issue_orchestrator_node done in 9.5s
  ━━━ Node: ship_node ━━━
     · shipped=False | commit=23f3b926 | push=pushed
     ✓ ship_node done in 0.0s

======================================================================
PIPELINE COMPLETE
======================================================================

⚠️  Pipeline ended with status: blocked
   Local workdir: ~/flowforge-workspace/tic-tac-toe-demo
   PR: https://github.com/<you>/tic-tac-toe-demo/pull/17

End-to-end runtime: ~2m with gpt-4o-mini.

What was produced

Eight commits on a fresh feature branch, all pushed to the new repo:

$ cd ~/flowforge-workspace/tic-tac-toe-demo && git log --oneline
23f3b92 (HEAD -> flowforge/run-20260606-000022) release: v1.0.0  update README, CHANGELOG, version
ec46dbf docs: add triage report #1
52bee34 docs: add test coverage report #1
aa10a36 docs: add code review checkpoint 1
3dc284a docs: add security audit report #1
35233cb feat: implement 12 task artifact(s)
76322d9 docs: add implementation plan (tic-tac-toe-web-app.md)
e93d330 docs: add specification (tic-tac-toe-web-app.md)
1436664 (origin/main) chore: initial commit

A pull request is opened automatically against main with the triage summary as the PR body — listing must-fix issues, follow-ups, and artifact counts.

GitHub issues are filed for every finding, then the orchestrator dedupes and prioritizes them by severity and source.

Pipeline outcomes

Status When Behavior
succeeded All gates clean Tagged release pushed, PR opened, ready to merge
blocked One or more must_fix_before_ship issues Code still pushed to feature branch, PR still opened with issues called out as must-fix — quality gates inform the PR review, never silently drop work

Either way you get a feature branch, a pushed commit history, and a pull request you can review. The pipeline never blocks delivery of generated work — it just annotates it.

Architecture

START
  └─▶ clarification_node ─▶ spec_node ─▶ plan_node ─▶ task_fanout_router
                                                          │
                                                          ▼
                                                       task_node
                                                          │
                                                          ▼
                                                  quality_gate_join
                                       ┌──────────────────┼──────────────────┐
                                       ▼                  ▼                  ▼
                               code_review_node  security_audit_node  test_engineer_node
                                       └──────────────────┼──────────────────┘
                                                          ▼
                                                  quality_gate_merge
                                                          │
                                                          ▼
                                              issue_orchestrator_node
                                                          │
                                                          ▼
                                                      ship_node ─▶ END

All file writes, git commits, gh issue/label creation, and the final push happen with cwd=workdir, so the source repo of swe-forge is never touched.

Development

git clone https://github.com/shashankswe2020-ux/flowforge && cd flowforge
pip install -e ".[dev]"

pytest tests/ -q                # full test suite (441 tests)
ruff check flowforge tests      # lint
mypy flowforge                  # type-check
python -m build                 # build wheel + sdist

Server logs go to ~/.flowforge/langgraph-dev.log. Config lives at ~/.flowforge/config.json. Workspaces at ~/flowforge-workspace/.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swe_forge-0.1.43.tar.gz (87.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swe_forge-0.1.43-py3-none-any.whl (102.9 kB view details)

Uploaded Python 3

File details

Details for the file swe_forge-0.1.43.tar.gz.

File metadata

  • Download URL: swe_forge-0.1.43.tar.gz
  • Upload date:
  • Size: 87.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for swe_forge-0.1.43.tar.gz
Algorithm Hash digest
SHA256 d2c8dfddde3a2c4704016a08bfcf0112fc80be6f4c059a44603c3193ad7ccde8
MD5 b3253dee1c5b825e1eea67a8334e5d0a
BLAKE2b-256 f680bce94285d00955a4790a7a09bec2e6b573b79da394aa47b9bba453dc976a

See more details on using hashes here.

File details

Details for the file swe_forge-0.1.43-py3-none-any.whl.

File metadata

  • Download URL: swe_forge-0.1.43-py3-none-any.whl
  • Upload date:
  • Size: 102.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for swe_forge-0.1.43-py3-none-any.whl
Algorithm Hash digest
SHA256 a09263eeae719bfa40b3aaa037069f233db4583dfbbad2c186afaaf2c70088bf
MD5 9761f7ae0814b032d7f2ecbb9e01f9b2
BLAKE2b-256 3507b8bce859e186ec1e54af04ed98cf3b0dd231db461266f73a7db372e64821

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page