swarm

Dispatches parallel subagent tasks across table rows and merges structured results.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/agnivon/viral_thread_generator --skill swarm-agnivon
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: swarm
Source: https://github.com/agnivon/viral_thread_generator/tree/main/.agents/skills/swarm
Command: npx skills add https://github.com/agnivon/viral_thread_generator --skill swarm-agnivon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Processing hundreds of independent items (files, records, texts) one-by-one through an LLM is slow and error-prone. This Skill fans work out to parallel subagents, batches rows automatically, and merges structured results back into a queryable table. ## Core Features & Use Cases - Parallel Fan-Out: Create a table from a glob pattern, file list, or pre-parsed records, then dispatch an instruction template across every row with bounded concurrency. - Structured Output & Batching: Enforce JSON Schema responses that become row columns, with automatic or custom batch sizing to control dispatch counts. - Filtering, Retry & Aggregation: Re-run only failed rows with exists-filters, chain multiple passes to accumulate columns, and aggregate results with plain JavaScript. - Use Case: Classify the sentiment of 200 customer feedback records from a JSONL file, then run a second pass summarizing only the negative ones. ## Quick Start Use the swarm skill to classify the sentiment of every record in feedback.jsonl in parallel and summarize the counts by label.

Frequently Asked Questions about swarm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process many files in parallel with subagents?▼

Create a table with a glob pattern so each file becomes a row, then call run with an instruction template containing a {file} placeholder. Swarm dispatches subagents across rows with bounded concurrency and merges results back into the table.

How do I batch LLM calls for classification or extraction tasks?▼

Pass pre-parsed records via the tasks source and call run with an instruction and a responseSchema. Omit subagentType so each dispatch is a direct model call with structured output, which is cheaper and faster than a full agentic loop.

When should I set subagentType versus omit it?▼

Omit subagentType for classification, extraction, and labeling where a single model call with structured output suffices. Set it when the task needs tools, file access, or multi-step reasoning, since each dispatch then runs a full agentic loop.

How do I retry only the rows that failed in a swarm run?▼

Re-call run with the same instruction and a filter of { column: "<col>", exists: false }, where <col> is a field from your responseSchema. Only rows missing that result column are redispatched.

What are the limitations of the swarm skill?▼

It requires the @langchain/quickjs interpreter with a swarm_task PTC tool, caps concurrency at 10 dispatches, clamps batch sizes to 1-50, and keeps at most 5 tables before evicting the oldest. Console output is limited to about 5 KB.