Skip to main content

Parallel multi-agent pipeline for code analysis and transformation, powered by Claude

Project description

parallel-agents

A parallel multi-agent pipeline for code analysis and transformation, powered by Claude.

Fan out code analysis to 8 specialist AI agents running concurrently, then merge results into a unified report with patches, risk assessments, and PR summaries.

Architecture

User Task / GitHub Issue / Repo
        ↓
   Planner Agent (analyzes repo, creates task plan)
        ↓
   Task Splitter (dependency resolution, batch grouping)
        ↓
   Parallel Workers (asyncio fan-out)
    ┌──────────┬──────────┬──────────┬──────────┐
    │ Security │ Test     │ Perf     │ DevOps   │
    │ Arch     │ Docs     │ Code     │ Review   │
    └──────────┴──────────┴──────────┴──────────┘
        ↓
   Evidence Store (JSON / SQLite)
        ↓
   Judge Agent (merge, resolve conflicts, produce patch)
        ↓
   Final Output (patch + PR summary + risk report)

Installation

From PyPI

pip install parallel-agents
# or with pipx for isolated CLI
pipx install parallel-agents

From npm (wrapper)

npx parallel-agents run --repo ./my-project "Fix security issues"

Standalone binary

Download from GitHub Releases — no Python required.

Quick Start

# Analyze a local repo
parallel-agents run --repo ./my-project "Fix security issues and improve code quality"

# From a GitHub issue
parallel-agents run "https://github.com/org/repo/issues/42" --repo ./local-clone

# Select specific workers
parallel-agents run --workers security,code,review "Refactor the auth module"

# Use SQLite evidence store
parallel-agents run --store sqlite --repo ./project "Add input validation"

# Output as JSON or patch
parallel-agents run --output json --repo ./project "Fix bugs"
parallel-agents run --output patch --repo ./project "Fix bugs" > fix.patch

CLI Commands

Command Description
parallel-agents run <task> Run the pipeline
parallel-agents workers List available workers
parallel-agents show <run-id> View results of a previous run
parallel-agents history List all previous runs
parallel-agents init Generate default configuration

Run Options

Flag Description
--repo, -r Path to repository
--workers, -w Comma-separated workers to enable
--disable-workers, -d Comma-separated workers to disable
--output, -o Output format: rich, json, patch
--model, -m Override model for all agents
--store, -s Evidence store: file or sqlite
--streaming/--no-streaming Toggle live progress display

Programmatic Usage

import asyncio
from parallel_agents import Pipeline, PipelineConfig
from parallel_agents.config import WorkerConfig

config = PipelineConfig(
    workers={
        "security": WorkerConfig(enabled=True),
        "code": WorkerConfig(enabled=True, model="opus"),
        "review": WorkerConfig(enabled=True),
    },
    max_parallel_workers=3,
)

async def main():
    pipeline = Pipeline(config)
    result = await pipeline.run(
        "Review for security issues",
        repo_path="./my-project",
    )
    print(result.summary)
    if result.patch:
        print(result.patch)

asyncio.run(main())

Workers

Worker Focus Area
security OWASP Top 10, dependency vulns, secret scanning
test Coverage gaps, edge cases, test generation
perf Complexity analysis, N+1 queries, bottlenecks
devops CI/CD, Docker, deployment configuration
arch SOLID principles, design patterns, coupling
docs README, docstrings, API documentation
code Implementation, refactoring (uses Opus)
review Code style, best practices, anti-patterns

Configuration

Set via environment variables (prefix PA_), .env file, or programmatically:

export PA_PLANNER_MODEL=opus
export PA_JUDGE_MODEL=opus
export PA_MAX_PARALLEL_WORKERS=4
export PA_STORE_BACKEND=sqlite

Requirements

  • Python 3.11+
  • Claude Code CLI installed and authenticated
  • An Anthropic API key (via Claude Code authentication)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parallel_agents-0.2.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parallel_agents-0.2.0-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file parallel_agents-0.2.0.tar.gz.

File metadata

  • Download URL: parallel_agents-0.2.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for parallel_agents-0.2.0.tar.gz
Algorithm Hash digest
SHA256 54990e619e375bbf967090c44e3c9af58b385eb7ea897e08c971e4e720b8a3a0
MD5 5fffd5215af230756c307259378b09a1
BLAKE2b-256 cee40ca53422ed7630b8fd81bfdcda55081f80e9e43a904bb199fa00a1b91a93

See more details on using hashes here.

File details

Details for the file parallel_agents-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for parallel_agents-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 931e7e2204e12ab6bc267cc821cd06476349e7e82404eb2440d4e2f9b91d6226
MD5 363f02f8b51183216e186b6d5298b5a9
BLAKE2b-256 5c98cec76b7ac8640d03a9c69df5e3288b947a50bc5c6391f92230c3b0c376bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page