Give it a GitHub repo and a task. Wake up to a PR.
A self-hosted, open-source AI software factory. Fully autonomous. Runs 24/7 on your own server. No cloud lock-in. No per-seat pricing. Your code never leaves your infrastructure.
You: "Add dark mode to the settings page"
Factory: β
Analysing repo...
β
Planning implementation (3 files)...
β
Implementing changes...
β
Running tests... (passed)
β
Self-reviewing diff...
β
PR opened β github.com/your/repo/pull/42
You: *wakes up* β reviews PR over coffee
ββββββββββββββββββββββββββββββββββββββββββββββββ
β ACODA FACTORY β
β β
β Job Submitted (API or UI) β
β β β
β βββββββββββββββββββββ β
β β Temporal β Durable orchestrationβ
β β (workflow engine)β Survives crashes β
β ββββββββββ¬βββββββββββ Runs for hours/days β
β β β
β βββββββββββββββββββββ β
β β Pool Manager β 3 warm FORGE slots β
β β (Rust + Axum) β Instant job pickup β
β ββββββββββ¬βββββββββββ TTL auto-release β
β β β
β βββββββββββββββββββββ β
β β FORGE Agent β Analyse β Plan β β
β β (TypeScript) β Implement β Test β β
β βββββββββββββββββββββ Review β PR β
ββββββββββββββββββββββββββββββββββββββββββββββββ
Stack:
- Temporal β durable workflow orchestration. Jobs survive server restarts, crashes, and deploys. Each coding job is a long-running Temporal workflow β pause it, resume it, cancel it at any stage.
- FORGE Agent β the AI coding agent. Clones your repo, writes code, runs tests, opens PRs.
- Pool Manager β keeps 3 FORGE workers warm and ready. Zero cold-start latency.
- Any OpenAI-compatible LLM β OpenAI, Ollama, local models, Azure, Anthropic via proxy.
# 1. Clone
git clone https://github.com/leoaicloud-source/acoda-factory
cd acoda-factory
# 2. Configure
cp factory-core/forge-agent/.env.example .env
# Fill in: GITHUB_TOKEN, LLM_API_KEY
# 3. Start
docker compose up -d
# 4. Submit a job
curl -X POST http://localhost:3020/api/forge/jobs \
-H "Content-Type: application/json" \
-d '{
"repoUrl": "https://github.com/your/repo",
"taskDescription": "Add input validation to the login form",
"targetBranch": "main"
}'Watch it work β open http://localhost:3020 for the job dashboard.
acoda-factory/
βββ factory-core/
β βββ forge-agent/ β FORGE: the AI coding agent
β β βββ src/
β β β βββ workflows/ β Temporal workflow (full SDLC)
β β β βββ activities/ β Individual steps (analyse, implement, test...)
β β β βββ services/ β LLM client, GitHub client
β β β βββ workers/ β Temporal worker process
β β βββ .env.example
β βββ pool-manager/ β Warm pool manager (Rust)
β βββ src/main.rs
βββ docker-compose.yml β One-command startup (coming soon)
βββ README.md
FORGE is a Temporal workflow with 7 stages. Temporal ensures every job is durable β if your server crashes mid-implementation, the job resumes exactly where it left off when it comes back online.
| Stage | What happens |
|---|---|
| Analyse | Clones repo, reads structure, understands codebase |
| Plan | Decides which files to create/modify/delete |
| Branch | Creates a feature branch |
| Implement | Writes each file using LLM, one at a time |
| Test | Runs your test command, captures output |
| Self-review | Reviews its own diff β approves or flags issues |
| PR | Pushes branch, opens PR with summary |
Pause, resume, or cancel any job in-flight via signals.
This is the key difference from cloud coding agents:
- Your code never leaves your server β FORGE clones repos locally, LLM calls go to your chosen provider
- No per-seat pricing β run as many jobs as your server handles
- Works offline β point
LLM_BASE_URLat a local Ollama instance - Extend it β add your own agent types, custom workflows, new skills
- Docker + Docker Compose
- GitHub personal access token (repo + pull_request scope)
- An LLM API key (OpenAI, or any OpenAI-compatible endpoint)
- 2GB RAM minimum (4GB recommended for parallel jobs)
- Autonomous analyse β plan β code β commit β PR pipeline
- Two-model architecture (Claude orchestrator + DeepSeek coder)
- Docker Compose one-command startup
- Self-hosted Temporal (no account required)
- Factory UI β dark mission control dashboard
- GitHub OAuth + repo picker in dashboard UI
- Job submission form (no API knowledge needed)
- WebSocket live updates (replace 5s polling)
- PR auto-merge option with test gate
- Post-merge verifier agent (checks nothing broke)
- Incident responder agent (detects + fixes regressions)
- Weekly digest β PRs shipped, cost saved, time saved
- Webhook triggers (auto-factory on GitHub issue label)
- Multi-repo support
- Custom agent types (add your own beyond FORGE)
- AgentCore kernel sandbox integration (hardened execution)
- Visual workflow editor
- Agent relay daemon β lightweight process in each Factory container, connects outbound to relay server (no inbound ports needed)
- Self-hosted relay server β WebSocket hub routing phone β agent containers
- iOS + Android app (React Native) β built in-house, no third-party SaaS dependency
- List all running agents + live session streaming
- Submit jobs from your phone
- Push notification when PR opens
- One-tap PR review + merge
- Works with Raspberry Pi / ARM64 home devices (Cotex X3, Pi 4/5)
- Raspberry Pi pre-built image (flash + go)
- USB stick distribution (plug into any machine)
- TV kiosk mode (HDMI out, mission control on big screen)
- Fully air-gapped enterprise deployment
- Pi coding agent integration (pi.dev) β replace custom LLM orchestration layer with Pi SDK/RPC mode as the coding engine; ride a maintained open-source harness instead of rolling our own. Pi's RPC mode (stdin/stdout JSONL) slots directly into forge-agent as a drop-in for
forgeLLM.ts. Also unlocks Termux on Android β submit jobs from your phone terminal with zero native app needed.
LeoAi Labs β building autonomous AI infrastructure.
This factory was built using its own tools. Meta.
Open sourced as a base for the community. Fork it. Break it. Make it yours.
PRs welcome. See CONTRIBUTING.md.
MIT β do whatever you want with it.