A local-first CLI that orchestrates multi-agent AI workflows for software development. Give it a task — or feed it your specs, PRDs, and guidelines — and it coordinates specialized agents to architect, code, review, test, and ship automatically. No cloud dependency. Bring your own API keys. Your code stays on your machine. Each stage uses a specialized AI agent with tuned prompts and parameters. T
Add this skill
npx mdskills install aiagentflow/aiagentflow1# aiagentflow23A local-first CLI that orchestrates multi-agent AI workflows for software development. Give it a task — or feed it your specs, PRDs, and guidelines — and it coordinates specialized agents to architect, code, review, test, and ship automatically.45**No cloud dependency. Bring your own API keys. Your code stays on your machine.**67[](https://www.npmjs.com/package/@aiagentflow/cli)8[](LICENSE)9[](https://nodejs.org)1011---1213## How It Works1415```16Task → Architect → Coder → Reviewer → Tester → Fixer → Ship17```1819Each stage uses a specialized AI agent with tuned prompts and parameters. The loop repeats until quality thresholds pass — like a small AI engineering team running on your machine.2021---2223## Install2425```bash26npm install -g @aiagentflow/cli27```2829Or with pnpm:3031```bash32pnpm add -g @aiagentflow/cli33```3435---3637## Quick Start3839```bash40# 1. Initialize in your project41cd /path/to/your/project42aiagentflow init4344# 2. Run a task45aiagentflow run "Add a login form with email/password validation"4647# 3. Or run autonomously (no approval prompts)48aiagentflow run "Refactor the auth module" --auto4950# 4. Feed context docs to agents51aiagentflow run "Add auth" --context docs/api-spec.md docs/security.md5253# 5. Generate a task list from specs, then batch-run54aiagentflow plan docs/prd.md -o tasks.txt55aiagentflow run --batch tasks.txt --auto56```5758The `init` wizard walks you through:591. Auto-detect your project (language, framework, test framework, package manager)602. Select your LLM providers (Anthropic, OpenAI, Gemini, Ollama)613. Enter API keys624. Assign models per agent role635. Choose a workflow mode (fast, balanced, strict)646. Import existing docs (specs, requirements, guidelines) for auto-loading6566Configuration is saved locally in `.aiagentflow/config.json`.6768---6970## Features7172- **Multi-agent pipeline** — 6 specialized agents, each with a distinct role73- **Context-aware** — feed specs, PRDs, architecture docs, and guidelines to every agent74- **Plan from docs** — generate batch-ready task lists from your existing documentation75- **Local-first** — runs entirely on your machine, no code leaves your system76- **Provider-agnostic** — Anthropic (Claude), OpenAI (GPT), Google Gemini, Ollama (local/free)77- **Workflow modes** — fast, balanced, or strict presets for iterations, approval, and temperatures78- **Smart detection** — auto-detects language, framework, test runner, and package manager79- **Configurable** — tune models, temperature, and iteration limits per agent80- **Git-native** — auto-creates branches, auto-commits on QA pass81- **Human-in-the-loop** — approve or override at any stage, or go full auto82- **QA policies** — configurable quality gates (max critical issues, test requirements)83- **Batch mode** — process multiple tasks from a file84- **Session persistence** — crash recovery with automatic session saving85- **Token tracking** — monitor LLM usage per agent and per run86- **Customizable prompts** — edit agent prompts in `.aiagentflow/prompts/`8788---8990## CLI Commands9192| Command | Description |93|---------|-------------|94| `aiagentflow init` | Interactive setup wizard |95| `aiagentflow config` | View current configuration |96| `aiagentflow doctor` | Health check — verify providers and setup |97| `aiagentflow run <task>` | Run a workflow for a task |98| `aiagentflow run <task> --auto` | Autonomous mode (no approval prompts) |99| `aiagentflow run <task> --context <files...>` | Run with reference documents |100| `aiagentflow run --batch tasks.txt` | Process multiple tasks from a file |101| `aiagentflow plan <docs...>` | Generate a task list from documentation |102| `aiagentflow plan <docs...> -o tasks.txt` | Write task list to file (batch-ready) |103104---105106## Agent Roles107108| Agent | Role | What it does |109|-------|------|-------------|110| 🧠 Architect | Plan | Analyzes the task and creates an implementation plan |111| 💻 Coder | Implement | Writes production-ready code based on the plan |112| 🔍 Reviewer | Review | Reviews code for bugs, security, and quality |113| 🧪 Tester | Test | Generates tests and runs them |114| 🐛 Fixer | Fix | Addresses review comments and test failures |115| ✅ Judge | QA | Final quality gate — pass or fail |116117---118119## Supported Providers120121| Provider | Type | Default Model | Setup |122|----------|------|---------------|-------|123| **Anthropic** | Cloud API | `claude-sonnet-4-20250514` | Requires API key |124| **OpenAI** | Cloud API | `gpt-4o-mini` | Requires API key |125| **Google Gemini** | Cloud API | `gemini-2.0-flash` | Requires API key |126| **Ollama** | Local | `llama3.2:latest` | Requires [Ollama](https://ollama.com) running locally |127128You can mix providers — use cloud APIs for reasoning agents (architect, reviewer, judge) and local models for generation agents (coder, tester, fixer).129130### Using with Ollama (free, local)131132```bash133# Install and start Ollama134ollama serve135136# Pull a model137ollama pull llama3.2138139# Initialize aiagentflow with Ollama140aiagentflow init141# → Select "ollama" as provider142# → Enter model name: llama3.2143```144145---146147## Configuration148149After `aiagentflow init`, your project has:150151```152.aiagentflow/153├── config.json # Main configuration154├── prompts/ # Customizable agent prompts155│ ├── architect.md156│ ├── coder.md157│ ├── reviewer.md158│ ├── tester.md159│ ├── fixer.md160│ └── judge.md161├── policies/ # Quality standards162│ └── coding-standards.md163├── context/ # Reference docs (auto-loaded into every run)164│ ├── api-spec.md # Example: your API specification165│ └── requirements.md # Example: your PRD or requirements166└── sessions/ # Saved workflow sessions167```168169Edit the prompt files to customize how each agent behaves. Edit `coding-standards.md` to set project-specific rules that all agents follow. Drop `.md` or `.txt` files into `context/` and they'll be automatically included as reference material for all agents.170171---172173## Context Documents174175Agents work best when they understand your project's requirements, API contracts, and standards. There are three ways to provide reference documents:176177**1. Auto-loaded (recommended)** — Drop files into `.aiagentflow/context/`:178179```bash180cp docs/api-spec.md .aiagentflow/context/181cp docs/security-guidelines.md .aiagentflow/context/182aiagentflow run "Implement user registration"183# Both docs are automatically included in every agent's context184```185186**2. Per-run via `--context` flag:**187188```bash189aiagentflow run "Add OAuth support" --context docs/oauth-spec.md docs/auth-arch.md190```191192**3. During init** — The setup wizard asks if you have existing docs and copies them for you.193194### What to include195196| Document type | Example | Why it helps |197|---------------|---------|-------------|198| API specs | `api-spec.md` | Agents generate correct endpoints and contracts |199| Requirements / PRDs | `requirements.md` | Architect plans match your actual requirements |200| Security guidelines | `security.md` | Reviewer catches violations against your policies |201| Architecture docs | `architecture.md` | Coder follows your patterns and conventions |202| Development guidelines | `dev-guidelines.md` | All agents follow your team's standards |203204### Plan command205206Turn documentation into an actionable task list, then batch-run it:207208```bash209# Generate tasks from a PRD210aiagentflow plan docs/prd.md -o tasks.txt211212# Review the generated tasks213cat tasks.txt214215# Run them all216aiagentflow run --batch tasks.txt --auto --context docs/architecture.md217```218219---220221## Project Structure222223```224src/225├── cli/ # CLI entry point and commands226├── core/ # Config system, workflow engine, QA policies227├── providers/ # LLM provider adapters (Anthropic, OpenAI, Gemini, Ollama)228├── agents/ # Agent implementations and prompt library229├── git/ # Git operations wrapper230├── prompts/ # Default prompt templates231└── utils/ # Shared utilities (logger, fs, validation)232```233234---235236## Development237238```bash239# Clone and install240git clone https://github.com/aiagentflow/aiagentflow.git241cd aiagentflow242pnpm install243244# Run in dev mode245pnpm dev run "your task here"246247# Type check248pnpm typecheck249250# Run tests251pnpm test252253# Lint & format254pnpm lint255pnpm format256```257258---259260## Contributing261262Contributions are welcome! Here's how to get started:2632641. **Fork** the repo and clone your fork2652. **Create a branch** for your feature: `git checkout -b feature/your-feature`2663. **Follow the coding standards:**267 - Functions: `camelCase`, Classes: `PascalCase`, Files: `kebab-case`268 - All public functions need JSDoc, types, and error handling269 - Use custom `AppError` subclasses — never raw `throw new Error()`2704. **Check your work:** `pnpm typecheck && pnpm lint && pnpm test`2715. **Open a PR** against `main` with a description of what and why272273### Architecture rules274275- Dependency direction flows downward: `cli → core → utils → types`276- Config types are inferred from Zod schemas, never manually defined277- New providers only require one adapter file + registry entry278279---280281## Roadmap282283- [x] Project scaffolding, config system, LLM provider layer284- [x] Workflow engine, agent implementations, Git integration285- [x] QA policies, token tracking, session persistence286- [x] Context documents — feed specs, PRDs, and guidelines to agents287- [x] Plan command — generate task lists from documentation288- [x] Multiple providers — Anthropic, OpenAI, Gemini, Ollama289- [x] Project auto-detection — language, framework, test runner, package manager290- [x] Auto-commit on QA pass291- [x] Workflow mode presets — fast, balanced, strict292- [ ] VSCode extension293- [ ] Desktop GUI294295---296297## License298299[MIT](LICENSE)300301---302303<p align="center">304 <a href="https://aiagentflow.dev">aiagentflow.dev</a>305</p>306
Full transparency — inspect the skill content before installing.