Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏭 ACODA FACTORY

ACODA FACTORY β€” Give it a repo + task. Wake up to a PR.

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.

License: MIT Built with Temporal Built with Rust Powered by FORGE


What It Does

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

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              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.

Quick Start

# 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.


Components

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

How FORGE Works

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.


Self-Hosted. Sovereign. Yours.

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_URL at a local Ollama instance
  • Extend it β€” add your own agent types, custom workflows, new skills

Requirements

  • 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)

Roadmap

v0.1 β€” Ship βœ…

  • 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

v0.2 β€” Connect

  • 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

v0.3 β€” Operate

  • 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)

v0.4 β€” Expand

  • Multi-repo support
  • Custom agent types (add your own beyond FORGE)
  • AgentCore kernel sandbox integration (hardened execution)
  • Visual workflow editor

v0.5 β€” Mobile Control Layer

  • 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)

Future

  • 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.

Built By

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.


Contributing

PRs welcome. See CONTRIBUTING.md.


License

MIT β€” do whatever you want with it.

Releases

Packages

Contributors

Languages