Index of every page on this site: llms.txt
All skills
langchain-ai avatar

/swarm

@7a385cd official
Run it yourself

Retired skill, replaced by `langchain-build-agent`. Use for fanning work out to many parallel subagents with Deep Agents: it tells you to switch to `langchain-build-agent`.

Use this Skill: https://skilld.dev/gh/langchain-ai/langchain-skills/swarm

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈45 tokens for metadata: the name and description. ≈138 when used: this file.

Description uses 2.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈180 characters, or 2.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

swarm (retired)

swarm was retired from langchain-skills. Use the langchain-build-agent skill instead. The swarm runtime skill has no direct replacement; langchain-build-agent covers subagent and fan-out patterns in Deep Agents.

  1. If langchain-build-agent is available, use it for this task.

  2. Otherwise, install it, then use it:

    npx skills add langchain-ai/langchain-skills --skill langchain-build-agent --yes
  3. Tell the user that swarm is retired and that they can remove it with npx skills remove swarm.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1d3 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    This skill is a retirement notice that directs users to a replacement skill. It includes an installation command for a new skill from the same author, which is a standard operational pattern for software updates.

  • Socket1d

    No alerts

  • Snyk1d

    Risk: MEDIUM · 1 issue

Signed by skilld at 7a385cd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated yesterday
metadata
{
  "internal": "true"
}
  • swarm
  • parallel-processing
  • batch-dispatch
  • langchain
  • structured-output
  • table-based-workflow
  • subagents
  • aggregation

README badge

README badge for langchain-ai/langchain-skills/swarm

Dispatches work across many independent items in parallel using a table-based model: create a table from files or records, fan out instructions across rows, and merge results back. Each row represents one unit of work and batching is automatic. Requires the @langchain/quickjs code interpreter and swarm_task PTC tool.

Generated from the current SKILL.md.

Does this work with files larger than a few MB?
Yes, but you must read large files in chunks of up to 500 lines per call using the `offset` and `limit` parameters to avoid truncation. Store parsed records in `globalThis` across separate eval blocks, then pass them to `create()`.
When should I use `subagentType` versus omitting it?
Omit `subagentType` for classification, extraction, and labeling tasks that need only a single model call with structured output. Set `subagentType` when the task requires tools, file access, or multi-step reasoning — each dispatch will run a full agentic loop.
Can I retry only the rows that failed?
Yes. Call `run()` again with `filter: { column: "<col>", exists: false }` to reprocess only rows where the response column was not set.
What happens if my instruction references a column that doesn't exist in the rows?
The skill throws an error before any subagent is dispatched, preventing wasted work.
How do I aggregate results after running swarm?
Import `rows()` and use plain JavaScript to fetch and summarize the data — do not spawn additional subagents for aggregation. Console output is capped at 5 KB, so log only counts and short samples.

Generated from the current SKILL.md. These answers refresh after source changes.