Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Agentic App Builder

Turn a natural-language idea into a runnable full-stack app bundle, using a multi-agent LangGraph pipeline with a self-healing generation loop. Runs fully offline with no API keys, or against a local Ollama model for real generation.

idea
 └─▶ Intent layer   classify → recommend stack → clarify → validate → agent_spec.json
        ▼
   agent_spec.json  (canonical contract: features · API contracts · data models · env · style)
        ▼
 Sub-agent layer (LangGraph)
   lead orchestrator → shared context
     → FE · BE · BE-Test · Config agents
     → self-healing loop: inspect vs spec → fix → re-run only the failing agent
       → escalate to the next model → build
        ▼
   app.zip

See diagram.md for the full architecture.

Quickstart (offline, no keys)

pip install -e ".[dev]"

# Build an app bundle from an example spec — deterministic, no model calls:
MODEL_PROVIDER=offline python -m appforge.pipeline --spec examples/todo.json --out app.zip

app.zip contains a runnable React + FastAPI + Docker Compose project. Offline mode uses fake models so the whole graph (orchestration, validation, packaging) runs without credentials — it's what the test suite and CI use.

Real generation with a local model (Ollama)

# 1. Install Ollama (https://ollama.com) and pull a coding model:
ollama pull qwen2.5-coder:7b

# 2. Point the builder at Ollama and build for real:
MODEL_PROVIDER=ollama python -m appforge.pipeline --spec examples/todo.json --out app.zip

The model must support tool/function calling (Qwen2.5-Coder and Llama 3.1/3.3 do). Set AUTO_SELECT=true to let the builder choose a model from your hardware.

Hardware-aware model selection

With MODEL_PROVIDER=ollama and AUTO_SELECT=true, the builder detects your machine and picks a sensible default (an explicit MODEL_OVERRIDE or *_MODELS always wins):

Detected Basis Picks (example)
NVIDIA / AMD dedicated GPU real VRAM 24 GB → :32b
Apple Silicon (unified memory) shared RAM 16 GB → :14b
Integrated GPU (Iris / APU) system RAM (CPU) 32 GB RAM → :7b
CPU only system RAM 16 GB RAM → :3b

Integrated GPUs aren't accelerated by stock Ollama, so they're treated as CPU inference (keyed off system RAM, not the misleading "shared VRAM" number) and run slower.

Other providers

Any OpenAI-compatible provider works — set MODEL_PROVIDER and the matching key:

MODEL_PROVIDER=groq   GROQ_API_KEY=...   python -m appforge.pipeline --spec examples/todo.json
MODEL_PROVIDER=gemini GEMINI_API_KEY=... python -m appforge.pipeline --spec examples/todo.json

Copy .env.example to .env and edit it instead of exporting each time.

Testing

pytest -q      # runs offline — no keys, no network

The RAG test additionally needs chromadb + sentence-transformers (installed with .[dev]); it self-skips if they're absent.

Project layout

src/appforge/
  config.py            # provider-agnostic settings
  pipeline.py          # idea -> spec -> bundle entrypoint
  cli.py               # sub-agent runner (spec -> bundle)
  llm/
    factory.py         # pluggable model factory (offline/ollama/groq/gemini/openai)
    hardware.py        # cross-platform GPU/RAM detection -> default model
    offline.py         # deterministic fake models
  models/              # AgentSpec + shared contracts
  graph/               # LangGraph wiring + agent nodes + self-healing
  intent/              # interactive intent layer + Chroma RAG over templates
  services/, validation/, execution/
  templates/           # stack patterns the intent layer retrieves
examples/              # neutral example specs

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages