{"id":48594165,"url":"https://github.com/up2itnow0822/a0-parallel-swarm-plugin","last_synced_at":"2026-04-08T20:55:30.947Z","repository":{"id":343634546,"uuid":"1169615798","full_name":"up2itnow0822/a0-parallel-swarm-plugin","owner":"up2itnow0822","description":"Run multiple Agent Zero agents in parallel. Fan-out tasks, token budgets, shared memory, model routing.","archived":false,"fork":false,"pushed_at":"2026-04-04T11:31:25.000Z","size":44,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T20:55:26.247Z","etag":null,"topics":["agent-zero","ai","multi-agent","plugin","swarm"],"latest_commit_sha":null,"homepage":"https://github.com/up2itnow0822/agent-wallet-a0-plugin","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/up2itnow0822.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T00:10:39.000Z","updated_at":"2026-04-06T04:10:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/up2itnow0822/a0-parallel-swarm-plugin","commit_stats":null,"previous_names":["up2itnow0822/a0-parallel-swarm-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/up2itnow0822/a0-parallel-swarm-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2itnow0822%2Fa0-parallel-swarm-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2itnow0822%2Fa0-parallel-swarm-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2itnow0822%2Fa0-parallel-swarm-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2itnow0822%2Fa0-parallel-swarm-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up2itnow0822","download_url":"https://codeload.github.com/up2itnow0822/a0-parallel-swarm-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2itnow0822%2Fa0-parallel-swarm-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31573788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-zero","ai","multi-agent","plugin","swarm"],"created_at":"2026-04-08T20:55:29.821Z","updated_at":"2026-04-08T20:55:30.938Z","avatar_url":"https://github.com/up2itnow0822.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚡ Parallel Swarm — A0 Plugin\n\nRun multiple Agent Zero agents at the same time. Fan out tasks, collect results, share findings between agents mid-execution.\n\nWe built this because we needed our A0 agents to research 5 markets simultaneously instead of crawling through them one by one. Turns out it's useful for a lot more than that.\n\n## What it does\n\nYou give your agent a list of tasks. The plugin spins up parallel subordinate agents, runs them concurrently with bounded concurrency, manages token budgets so you don't blow your API bill, and collects all results back into one response.\n\n**Key features:**\n\n- **Parallel execution** — Up to 20 concurrent agents (default 5)\n- **Task dependencies** — Build DAGs: \"do A and B first, then C needs both results\"\n- **Token budgets** — Set total + per-task caps. No more surprise API bills.\n- **Smart model routing** — Simple tasks get a cheap model, complex ones get the big guns\n- **Shared memory** — Agents can pass findings to each other mid-execution via `swarm_share`\n- **Adaptive throttling** — Backs off automatically when hitting rate limits\n\n## Quick Start\n\n### 1. Install\n\n```bash\ngit clone https://github.com/up2itnow0822/a0-parallel-swarm-plugin.git\ncp -r a0-parallel-swarm-plugin /path/to/agent-zero/usr/plugins/parallel_swarm\n```\n\n### 2. Enable in Settings\n\nAgent Zero → Settings → Agent tab → Parallel Swarm → toggle on.\n\n### 3. Use it\n\nYour agent now has two new tools:\n\n**`call_swarm`** — Dispatch parallel tasks:\n```\nResearch these 3 topics simultaneously:\n1. Current Bitcoin market sentiment\n2. Ethereum DeFi TVL trends\n3. Solana NFT marketplace activity\n```\n\nThe agent will automatically use `call_swarm` to fan out the work.\n\n**`swarm_share`** — Agents share findings with each other during execution:\n```json\n{\n  \"key\": \"btc_sentiment\",\n  \"value\": \"Strongly bullish — 3 whale wallets accumulated 2000 BTC in 24h\",\n  \"tags\": \"crypto,sentiment\"\n}\n```\n\n## How it works\n\n```\nYou: \"Research X, Y, Z simultaneously\"\n    │\n    ▼\n┌──────────────┐\n│  call_swarm  │  ← Your agent dispatches tasks\n└──────┬───────┘\n       │\n   ┌───┼───┐\n   │   │   │\n   ▼   ▼   ▼\n  A1  A2  A3     ← Parallel subordinate agents\n   │   │   │\n   └───┼───┘\n       │\n       ▼         ← Results collected, formatted, returned\n  Combined Response + Token Usage Report\n```\n\n### Task Dependencies (DAG)\n\n```json\n{\n  \"tasks\": [\n    {\"id\": \"research\", \"message\": \"Find the top 5 competitors\"},\n    {\"id\": \"pricing\", \"message\": \"Get their pricing pages\"},\n    {\"id\": \"analysis\", \"message\": \"Compare and recommend\", \"depends_on\": [\"research\", \"pricing\"]}\n  ]\n}\n```\n\nLevel 0: `research` + `pricing` run in parallel\nLevel 1: `analysis` runs after both complete, with their results available\n\n### Model Routing\n\nWhen auto-classify is on, the plugin sorts tasks by complexity:\n\n| Complexity | Routed to | Example |\n|-----------|-----------|---------|\n| Simple | Cheap/fast model | \"Count items in this list\" |\n| Moderate | Default model | \"Summarize this document\" |\n| Complex | Heavy model | \"Design a system architecture\" |\n\nConfigure model overrides in the settings UI to use specific models per tier.\n\n## Settings\n\n| Setting | Default | Description |\n|---------|---------|-------------|\n| `max_concurrency` | 5 | Max parallel agents |\n| `token_budget` | 100,000 | Total token cap for all tasks |\n| `per_task_budget` | 20,000 | Per-task token cap |\n| `auto_classify` | true | Route tasks to models by complexity |\n| `shared_memory` | true | Enable `swarm_share` between agents |\n| `simple_model` | (default) | Model override for simple tasks |\n| `complex_model` | (default) | Model override for complex tasks |\n| `backpressure_threshold` | 0.8 | Throttle when this % of slots active |\n\n## Architecture\n\nThe plugin adds 5 modules to your A0 installation:\n\n- `SwarmOrchestrator` — Coordinates parallel dispatch with dependency resolution\n- `TokenPool` — Centralized budget management, pre-allocation prevents overruns\n- `ConcurrencyManager` — Semaphore-based parallelism with adaptive backpressure\n- `SwarmMemory` — Ephemeral shared key-value store for cross-agent communication\n- `ModelRouter` — Classifies task complexity and routes to appropriate models\n\nAll modules are async-native and thread-safe.\n\n## Example: Research 5 Markets Simultaneously\n\nHere's a concrete example dispatching 5 parallel market research tasks with a dependency chain — the final synthesis task waits for all research to complete:\n\n```json\n{\n  \"tasks\": [\n    {\n      \"id\": \"crypto\",\n      \"description\": \"Analyze cryptocurrency market\",\n      \"message\": \"Research current BTC and ETH price action, volume trends, and whale activity. Provide a 2-paragraph summary with key data points.\",\n      \"complexity\": \"moderate\",\n      \"priority\": 0\n    },\n    {\n      \"id\": \"equities\",\n      \"description\": \"Analyze US equities market\",\n      \"message\": \"Research S\u0026P 500, NASDAQ, and Dow performance over the past week. Note any sector rotation or unusual volume.\",\n      \"complexity\": \"moderate\",\n      \"priority\": 0\n    },\n    {\n      \"id\": \"forex\",\n      \"description\": \"Analyze forex market\",\n      \"message\": \"Research USD strength index, EUR/USD, and GBP/USD trends. Note central bank policy impacts.\",\n      \"complexity\": \"simple\",\n      \"priority\": 0\n    },\n    {\n      \"id\": \"commodities\",\n      \"description\": \"Analyze commodities market\",\n      \"message\": \"Research gold, oil, and natural gas price movements. Note supply/demand factors driving changes.\",\n      \"complexity\": \"simple\",\n      \"priority\": 0\n    },\n    {\n      \"id\": \"defi\",\n      \"description\": \"Analyze DeFi ecosystem\",\n      \"message\": \"Research total DeFi TVL, top protocol inflows/outflows, and emerging yield opportunities.\",\n      \"complexity\": \"moderate\",\n      \"priority\": 0\n    },\n    {\n      \"id\": \"synthesis\",\n      \"description\": \"Cross-market synthesis and recommendations\",\n      \"message\": \"Using findings from all 5 market analyses, identify cross-market correlations, risk factors, and provide 3 actionable trading recommendations with confidence levels.\",\n      \"complexity\": \"complex\",\n      \"priority\": 1,\n      \"depends_on\": [\"crypto\", \"equities\", \"forex\", \"commodities\", \"defi\"]\n    }\n  ],\n  \"max_concurrency\": 5,\n  \"token_budget\": 150000\n}\n```\n\n**Execution flow:**\n\n```\nLevel 0 (parallel): crypto + equities + forex + commodities + defi\n                     ↓           ↓         ↓          ↓          ↓\n                     └───────────┴─────────┴──────────┴──────────┘\n                                           ↓\nLevel 1 (sequential):              synthesis (uses all results)\n```\n\n**Expected output format:**\n\n```\n## Task: Analyze cryptocurrency market\n**Status:** completed\n\nBTC trading at $61,200 with 24h volume up 15%...\n\n---\n\n## Task: Analyze US equities market\n**Status:** completed\n\nS\u0026P 500 closed at 5,180, up 0.8% on the week...\n\n---\n\n... (3 more market tasks) ...\n\n---\n\n## Task: Cross-market synthesis and recommendations\n**Status:** completed\n\n**Cross-Market Correlations:**\n1. Risk-on sentiment across crypto and equities...\n\n**Recommendations:**\n1. Long BTC/USD (confidence: 72%) — whale accumulation + positive equity correlation\n2. Short EUR/USD (confidence: 65%) — ECB dovish signals vs Fed hold\n3. Long Gold (confidence: 58%) — geopolitical hedge with declining real yields\n\n---\n**Swarm Summary:** 6/6 tasks completed | Total tokens consumed: 47,832\n```\n\n## Requirements\n\n- Agent Zero (latest version with plugin support)\n- Enough API rate limit headroom for concurrent requests (check your provider)\n\n## Built By\n\n[AI Agent Economy](https://github.com/up2itnow0822) — Building infrastructure for autonomous AI agents.\n\nWe've been running parallel swarm execution in production for our trading research pipeline since January 2026. This plugin packages that battle-tested code for the A0 community.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup2itnow0822%2Fa0-parallel-swarm-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup2itnow0822%2Fa0-parallel-swarm-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup2itnow0822%2Fa0-parallel-swarm-plugin/lists"}