freshcrate
Home > Frameworks > aiagentflow

aiagentflow

A local-first, CLI-driven multi-agent AI software engineering workflow orchestrator with feed specs, PRDs, and guidelines to auto-generate implementation plans and code.

Description

A local-first, CLI-driven multi-agent AI software engineering workflow orchestrator with feed specs, PRDs, and guidelines to auto-generate implementation plans and code.

README

aiagentflow

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.

npm version License: MIT Node.js


How It Works

Task โ†’ Architect โ†’ Coder โ†’ Reviewer โ†’ Tester โ†’ Fixer โ†’ Ship

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


Install

npm install -g @aiagentflow/cli

Or with pnpm:

pnpm add -g @aiagentflow/cli

Quick Start

# 1. Initialize in your project
cd /path/to/your/project
aiagentflow init

# 2. Run a task
aiagentflow run "Add a login form with email/password validation"

# 3. Or run autonomously (no approval prompts)
aiagentflow run "Refactor the auth module" --auto

# 4. Feed context docs to agents
aiagentflow run "Add auth" --context docs/api-spec.md docs/security.md

# 5. Generate a task list from specs, then batch-run
aiagentflow plan docs/prd.md -o tasks.txt
aiagentflow run --batch tasks.txt --auto

The init wizard walks you through:

  1. Auto-detect your project (language, framework, test framework, package manager)
  2. Select your LLM providers (Anthropic, OpenAI, Groq, Gemini, Ollama)
  3. Enter API keys
  4. Assign models per agent role
  5. Choose a workflow mode (fast, balanced, strict)
  6. Import existing docs (specs, requirements, guidelines) for auto-loading

Configuration is saved locally in .aiagentflow/config.json.


Features

  • Multi-agent pipeline โ€” 6 specialized agents, each with a distinct role
  • Context-aware โ€” feed specs, PRDs, architecture docs, and guidelines to every agent
  • Plan from docs โ€” generate batch-ready task lists from your existing documentation
  • Local-first โ€” runs entirely on your machine, no code leaves your system
  • Provider-agnostic โ€” Anthropic (Claude), OpenAI (GPT), Groq, Google Gemini, Ollama (local/free)
  • Workflow modes โ€” fast, balanced, or strict presets for iterations, approval, and temperatures
  • Smart detection โ€” auto-detects language, framework, test runner, and package manager
  • Configurable โ€” tune models, temperature, and iteration limits per agent
  • Git-native โ€” auto-creates branches, auto-commits on QA pass
  • Human-in-the-loop โ€” approve or override at any stage, or go full auto
  • QA policies โ€” configurable quality gates (max critical issues, test requirements)
  • Batch mode โ€” process multiple tasks from a file
  • Session persistence โ€” crash recovery with automatic session saving
  • Token tracking โ€” monitor LLM usage per agent and per run
  • Customizable prompts โ€” edit agent prompts in .aiagentflow/prompts/

CLI Commands

Command Description
aiagentflow init Interactive setup wizard
aiagentflow config View current configuration
aiagentflow doctor Health check โ€” verify providers and setup
aiagentflow run <task> Run a workflow for a task
aiagentflow run <task> --auto Autonomous mode (no approval prompts)
aiagentflow run <task> --context <files...> Run with reference documents
aiagentflow run --batch tasks.txt Process multiple tasks from a file
aiagentflow plan <docs...> Generate a task list from documentation
aiagentflow plan <docs...> -o tasks.txt Write task list to file (batch-ready)

Agent Roles

Agent Role What it does
๐Ÿง  Architect Plan Analyzes the task and creates an implementation plan
๐Ÿ’ป Coder Implement Writes production-ready code based on the plan
๐Ÿ” Reviewer Review Reviews code for bugs, security, and quality
๐Ÿงช Tester Test Generates tests and runs them
๐Ÿ› Fixer Fix Addresses review comments and test failures
โœ… Judge QA Final quality gate โ€” pass or fail

Supported Providers

Provider Type Default Model Setup
Anthropic Cloud API claude-sonnet-4-20250514 Requires API key
OpenAI Cloud API gpt-4o-mini Requires API key
Groq Cloud API llama-3.3-70b-versatile Requires API key
Google Gemini Cloud API gemini-2.0-flash Requires API key
Ollama Local llama3.2:latest Requires Ollama running locally

You can mix providers โ€” use cloud APIs for reasoning agents (architect, reviewer, judge) and local models for generation agents (coder, tester, fixer).

Using with Ollama (free, local)

# Install and start Ollama
ollama serve

# Pull a model
ollama pull llama3.2

# Initialize aiagentflow with Ollama
aiagentflow init
# โ†’ Select "ollama" as provider
# โ†’ Enter model name: llama3.2

Configuration

After aiagentflow init, your project has:

.aiagentflow/
โ”œโ”€โ”€ config.json              # Main configuration
โ”œโ”€โ”€ prompts/                 # Customizable agent prompts
โ”‚   โ”œโ”€โ”€ architect.md
โ”‚   โ”œโ”€โ”€ coder.md
โ”‚   โ”œโ”€โ”€ reviewer.md
โ”‚   โ”œโ”€โ”€ tester.md
โ”‚   โ”œโ”€โ”€ fixer.md
โ”‚   โ””โ”€โ”€ judge.md
โ”œโ”€โ”€ policies/                # Quality standards
โ”‚   โ””โ”€โ”€ coding-standards.md
โ”œโ”€โ”€ context/                 # Reference docs (auto-loaded into every run)
โ”‚   โ”œโ”€โ”€ api-spec.md          # Example: your API specification
โ”‚   โ””โ”€โ”€ requirements.md      # Example: your PRD or requirements
โ””โ”€โ”€ sessions/                # Saved workflow sessions

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


Context Documents

Agents work best when they understand your project's requirements, API contracts, and standards. There are three ways to provide reference documents:

1. Auto-loaded (recommended) โ€” Drop files into .aiagentflow/context/:

cp docs/api-spec.md .aiagentflow/context/
cp docs/security-guidelines.md .aiagentflow/context/
aiagentflow run "Implement user registration"
# Both docs are automatically included in every agent's context

2. Per-run via --context flag:

aiagentflow run "Add OAuth support" --context docs/oauth-spec.md docs/auth-arch.md

3. During init โ€” The setup wizard asks if you have existing docs and copies them for you.

What to include

Document type Example Why it helps
API specs api-spec.md Agents generate correct endpoints and contracts
Requirements / PRDs requirements.md Architect plans match your actual requirements
Security guidelines security.md Reviewer catches violations against your policies
Architecture docs architecture.md Coder follows your patterns and conventions
Development guidelines dev-guidelines.md All agents follow your team's standards

Plan command

Turn documentation into an actionable task list, then batch-run it:

# Generate tasks from a PRD
aiagentflow plan docs/prd.md -o tasks.txt

# Review the generated tasks
cat tasks.txt

# Run them all
aiagentflow run --batch tasks.txt --auto --context docs/architecture.md

Project Structure

src/
โ”œโ”€โ”€ cli/            # CLI entry point and commands
โ”œโ”€โ”€ core/           # Config system, workflow engine, QA policies
โ”œโ”€โ”€ providers/      # LLM provider adapters (Anthropic, OpenAI, Groq, Gemini, Ollama)
โ”œโ”€โ”€ agents/         # Agent implementations and prompt library
โ”œโ”€โ”€ git/            # Git operations wrapper
โ”œโ”€โ”€ prompts/        # Default prompt templates
โ””โ”€โ”€ utils/          # Shared utilities (logger, fs, validation)

Development

# Clone and install
git clone https://github.com/aiagentflow/aiagentflow.git
cd aiagentflow
pnpm install

# Run in dev mode
pnpm dev run "your task here"

# Type check
pnpm typecheck

# Run tests
pnpm test

# Lint & format
pnpm lint
pnpm format

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repo and clone your fork
  2. Create a branch for your feature: git checkout -b feature/your-feature
  3. Follow the coding standards:
    • Functions: camelCase, Classes: PascalCase, Files: kebab-case
    • All public functions need JSDoc, types, and error handling
    • Use custom AppError subclasses โ€” never raw throw new Error()
  4. Check your work: pnpm typecheck && pnpm lint && pnpm test
  5. Open a PR against main with a description of what and why

Architecture rules

  • Dependency direction flows downward: cli โ†’ core โ†’ utils โ†’ types
  • Config types are inferred from Zod schemas, never manually defined
  • New providers only require one adapter file + registry entry

Roadmap

  • Project scaffolding, config system, LLM provider layer
  • Workflow engine, agent implementations, Git integration
  • QA policies, token tracking, session persistence
  • Context documents โ€” feed specs, PRDs, and guidelines to agents
  • Plan command โ€” generate task lists from documentation
  • Multiple providers โ€” Anthropic, OpenAI, Groq, Gemini, Ollama
  • Project auto-detection โ€” language, framework, test runner, package manager
  • Auto-commit on QA pass
  • Workflow mode presets โ€” fast, balanced, strict
  • VSCode extension
  • Desktop GUI

License

MIT


aiagentflow.dev

Release History

VersionChangesUrgencyDate
v1.0.2## What's Changed * feat: lint and format enforcement after code generation by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/46 * Bump version to 1.0.2 by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/47 **Full Changelog**: https://github.com/aiagentflow/aiagentflow/compare/v1.0.1...v1.0.2High4/15/2026
v1.0.1## What's Changed * Delete stale bump branch before pushing in release.yml by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/41 * Add /update-website skill by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/42 * update README: add OpenRouter, missing commands by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/43 * fix: actionable error and warning for Groq 413 with compound models by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/44 * Bump veHigh4/14/2026
v1.0.0## What's Changed * Fix publish.yml not triggering after automated release creation by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/36 * Add OpenRouter provider and fix 429 retry backoff by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/37 * Use RELEASE_PAT in release.yml to trigger CI on bump PRs by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/39 * Bump version to 1.0.0 by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/40 **Full ChanHigh4/12/2026
v0.10.0## What's Changed * Add /release project skill by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/32 * Rename /release skill to /do-release by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/33 * Fix Groq compound model streaming returning empty content by @raj-khan in https://github.com/aiagentflow/aiagentflow/pull/35 * Bump version to 0.10.0 by @github-actions[bot] in https://github.com/aiagentflow/aiagentflow/pull/34 ## New Contributors * @github-actions[bot] made tHigh4/11/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

mcp-anythingOne command to turn any codebase into an MCP serverv0.1.0
rundownA Markdown-native task runtime for agentic workflows. (AI Generated)main@2026-04-21
ClawRouterThe agent-native LLM router for OpenClaw. 41+ models, <1ms routing, USDC payments on Base & Solana via x402.v0.12.158
simBuild, deploy, and orchestrate AI agents. Sim is the central intelligence layer for your AI workforce.v0.6.51
gemini-cliAn open-source AI agent that brings the power of Gemini directly into your terminal.v0.38.2