swarm

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

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/flemx/salesforce-langgraph-agent --skill swarm-flemx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swarm
Source: https://github.com/flemx/salesforce-langgraph-agent/tree/main/.agents/skills/swarm
Command: npx skills add https://github.com/flemx/salesforce-langgraph-agent --skill swarm-flemx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Processing hundreds of independent items (files, records, texts) one at a time through an agent is slow and error-prone. This Skill fans work out to parallel subagents, batches rows automatically, and merges structured results back into a single 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 merging: A required JSON Schema constrains each subagent response, and schema properties become new columns on the table for chaining multiple passes. - Batching, filtering, and retry: Auto-batching caps dispatches, filters select row subsets, and failed rows can be reprocessed with an exists: false filter. - Use Case: Classify the sentiment of 200 customer feedback records from a JSONL file, then run a second pass that summarizes only the negative ones. ## Quick Start Use the swarm skill to classify the sentiment of every record in feedback.jsonl in parallel and show me the counts per sentiment.

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 from a glob pattern or file list, then call run() with an instruction template containing {file} placeholders and a responseSchema. Each file becomes one row, and rows are dispatched to subagents with bounded concurrency and merged back automatically.

How do I classify records from a JSONL or CSV file in bulk?

Read and parse the file inside the eval sandbox, pass the records to create({ tasks: records }), then run() with an instruction like "Classify {text}" and a responseSchema defining the label field. One record equals one row; do not group multiple items into a single row.

When should I set subagentType versus omit it?

Omit subagentType for classification, extraction, and labeling where a single direct model call with structured output suffices. Set subagentType 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-run with filter: { column: "<col>", exists: false } to reprocess only rows missing a result column. The run() result also returns deduplicated failure groups with error messages and affected row ids for inspection.

What are the limitations of the swarm batching approach?

Batch sizes are clamped to 1-50, concurrency is capped at 10 dispatches, and console output is limited to about 5 KB. Tables are evicted after five tables per session, and subagents only see the instruction and context, never the agent's conversation.