Skip to main content

AIFactory — the open-source AI software engineer you can self-host and audit

AIFactory is an open-source, self-hostable platform that turns a task into shipping code through a pipeline you can watch and verify: spec → plan → code → QA, with human-review gates at each step.

Most AI coding tools ask you to either (a) ship your source to someone else's cloud, or (b) trust an unsupervised agent's diff. If you work somewhere that can't do either — a bank, a hospital, a government team — you've been stuck. AIFactory is built for exactly that gap.

You bring an issue (or a one-line task). AIFactory's planner agent produces a tight spec and an implementation plan; you review it. A coder agent (Claude, OpenAI, Gemini, Codex, or a local Ollama / OpenAI-compatible model — your call per phase) works inside an isolated git worktree. A QA reviewer agent validates the output against the spec's acceptance criteria. Every action lands in a hash-chained audit log. You merge when you're happy — and you can prove, afterwards, exactly what happened.

You watch the whole thing happen live in the Agent Console — read-only by default, one-click Attach when you want to drive.

New to the project? Start with Why AIFactory for the problem we're solving and the principles behind it.

Who it's for

  • Platform & security engineers in regulated orgs (banking, healthcare, government, defense) who need an autonomous coding capability they can run inside their own perimeter — self-hosted, SSO, audit trail, isolation — without failing the next audit.
  • Self-hosters and homelab/platform teams who want to run an AI software engineer on their own infrastructure, against their own choice of model (including fully local), with no data leaving the network.
  • Solo developers and small teams who want an autonomous-but-supervisable pipeline for routine work — and a written spec, plan, diff, and QA pass they can actually review instead of a black box.

What makes it different

  • Self-hosted, in your perimeter. Runs on your own Kubernetes via the Helm chart (or docker-compose on a laptop). Your code never has to leave your network.
  • Spec-first, not vibe-first. Every run starts from a written spec with acceptance criteria. You approve the plan before code is written and the diff before it merges.
  • Auditable by design. Every action is journaled in a hash-chained audit log; every spec, plan, and QA report is on disk and in version control. SOC2 / ISO evidence in the enterprise build.
  • No vendor lock-in. Pick a model per phase — Claude, OpenAI, Gemini, Codex, or a local Ollama / OpenAI-compatible endpoint. You own your model bill.
  • Isolated by default. Each task runs in its own git worktree on its own branch. Nothing touches your working tree until you merge.
  • MCP control plane. 27 MCP tools across stdio + HTTP+SSE transports let any MCP-aware editor (Claude Code, Cursor, Continue.dev) inspect and direct AIFactory tasks, including autonomous hand-off via the /handover skill.

Recently shipped (May–June 2026)

June 2026 — the PARR loop grew a real deploy-then-verify leg

  • Deploy-then-verify on real AWS — after the build, AIFactory ships the services to AWS App Runner with deterministic Terraform, proves the live HTTPS endpoint works, runs the acceptance tests against the deployed URL, and tears it all down. Cost-guarded (factory-ephemeral tags), opt-in via AIFACTORY_AUTO_DEPLOY (default off). See Deploy-then-verify.
  • PR endgame — auto-open a PR, request review, merge, and re-test, configurable per project (AIFACTORY_AUTO_PR, AIFACTORY_AUTO_MERGE). The pre-merge reviewer is selectable (AIFACTORY_PR_REVIEWER = aifactory | copilot | any); the built-in engine needs no Copilot credits. On changes-requested a bounded auto-feedback loop fixes and re-reviews (up to 2 cycles) before handing to a human. See guides/pr-endgame.md.
  • Contract-carrying handoff to TFactory — a signed Task Contract v2 (RFC-0002) carries the declared acceptance criteria, lanes, and endpoints downstream, so verification tests the declared profile instead of guessing. See Task Contract.
  • Opt-in direct-API-key auth — OAuth-only by default (a stray ANTHROPIC_API_KEY is scrubbed from agents so it can never silently bill); operators who bill via a direct key opt in with AIFACTORY_ALLOW_API_KEY=1. See API-key auth.
  • Test authenticated web apps — deploy behind a login, have the browser test log in as a test user, exercise the UI, and record screenshots + findings as proof. See guides/testing-authenticated-web-apps.md.
  • Multi-agent Live Console grid — stream every active agent's console for a project at once at /console/:projectId. See Live Console.

May 2026 — MCP control plane + delegation

  • Stdio MCP server at apps/backend/mcp_server/aifactory_server.py exposes 15 task-control tools (task_list, task_create_and_run, task_approve_plan, etc.) to any Claude Code session opening this repo via the project-scoped .mcp.json.
  • Remote HTTP+SSE MCP server at /api/mcp-remote/sse (opt-in via AIFACTORY_MCP_REMOTE_ENABLED=true) exposes 12 tools to non-Claude clients with acw_ API key + scope-gating (mcp:read / mcp:write).
  • /handover skill for Claude Code in this repo — captures conversation context, calls the MCP task_create_and_run primitive, returns a portal URL. See guides/HANDOVER_WORKFLOW.md.
  • Delegation (#92) — hand the coder phase to GitHub Copilot Coding Agent or GitLab Duo Workflow while AIFactory keeps planning + governance. See Delegation.
  • Portal-managed Git clones (#82) — point the portal at a Git URL; repos clone into the workspace root (laptop) or PVC (K8s) with encrypted-at-rest credential storage. See Portal-managed clones.
  • Scoped MCP API keys (#154) — per-developer acw_ keys with scope-gating replace the host-wide admin token.
  • Default MCP server catalog (Kubernetes, AWS, Azure, GitHub) auto-enables based on project markers + credential probes. Read-only by default.
  • Remote Control — drive a running AIFactory agent from claude.ai/code on any device. See Remote Control.

Full detail in the Configuration Reference and the CHANGELOG.

Get started