Community生产力与协作github.com

langchain-ai/swarm

并行派发大量独立任务:创建表格,扇出给子代理,汇总结果。每行代表一个工作单元。

swarm 是什么?

此技能旨在并行处理大量独立任务单元。它通过创建一个表格,将每个单元扇出给子代理,并最终汇总所有结果来高效地协调工作负载。该技能利用 LangChain 生态系统的能力,支持多代理并行执行,而非顺序执行,这使其非常适合需要高吞吐量和独立任务处理的场景。它不依赖于特定平台,可以作为独立技能使用,或集成到更复杂的 AI 代理工作流中作为并行化组件。其核心价值在于通过将任务分发到多个子代理来提升处理效率,开发者无需关注并行机制的底层实现细节,只需定义好每个单元的工作内容和聚合逻辑。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/langchain-ai/langchain-skills/tree/main/skills/swarm

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

swarm 是做什么的?

并行派发大量独立任务:创建表格,扇出给子代理,汇总结果。每行代表一个工作单元。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

langchain-ai/deep-agents-core

INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options.

langchain-ai/deep-agents-memory

INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.

langchain-ai/deep-agents-orchestration

INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents. Covers SubAgentMiddleware, TodoList for planning, and HITL interrupts.

langchain-ai/framework-selection

INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code. Determines which framework layer is right for the task: LangChain, LangGraph, Deep Agents, or a combination. Must be consulted before other agent skills.

langchain-ai/langchain-dependencies

INVOKE THIS SKILL when setting up a new project or when asked about package versions, installation, or dependency management for LangChain, LangGraph, LangSmith, or Deep Agents. Covers required packages, minimum versions, environment requirements, versioning best practices, and common community tool packages for both Python and TypeScript.

langchain-ai/langchain-fundamentals

Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.

langchain-ai/langchain-middleware

INVOKE THIS SKILL when you need human-in-the-loop approval, custom middleware, or structured output. Covers HumanInTheLoopMiddleware for human approval of dangerous tool calls, creating custom middleware with hooks, Command resume patterns, and structured output with Pydantic/Zod.

langchain-ai/langchain-rag

INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).

langchain-ai/langgraph-fundamentals

INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.

langchain-ai/langgraph-human-in-the-loop

INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.

langchain-ai/langgraph-persistence

INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.

相关技能