Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

langgraph-parallel语言图并行

Agent Skill

langgraph-parallel 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

428

周安装

18

GitHub Stars

公开资料未说明

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:langgraph-parallel(语言图并行)
来源仓库:https://github.com/yonatangross/skillforge-claude-plugin
仓库路径:skills/langgraph-parallel
安装命令:
npx skills add yonatangross/skillforge-claude-plugin --skill "langgraph-parallel"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add yonatangross/skillforge-claude-plugin --skill "langgraph-parallel"

简介

语言图并行用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 它通过关键词、任务场景或来源线索辅助信息组织,提升研究效率。
  • 安装命令为 npx skills add yonatangross/skillforge-claude-plugin --skill "langgraph-parallel"。
  • 需确认权限范围和维护状态,注意是否会触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
langgraph-parallel
description
LangGraph parallel execution patterns. Use when implementing fan-out/fan-in workflows, map-reduce over tasks, or running independent agents concurrently.
tags
[langgraph, parallel, concurrency, fan-out]
context
fork
agent
workflow-architect
version
1.0.0
author
OrchestKit
user-invocable
false

LangGraph Parallel Execution

Run independent nodes concurrently for performance.

Fan-Out/Fan-In Pattern

from langgraph.graph import StateGraph

def fan_out(state):
    """Split work into parallel tasks."""
    state["tasks"] = [{"id": 1}, {"id": 2}, {"id": 3}]
    return state

def worker(state):
    """Process one task."""
    task = state["current_task"]
    result = process(task)
    return {"results": [result]}

def fan_in(state):
    """Combine parallel results."""
    combined = aggregate(state["results"])
    return {"final": combined}

workflow = StateGraph(State)
workflow.add_node("fan_out", fan_out)
workflow.add_node("worker", worker)
workflow.add_node("fan_in", fan_in)

workflow.add_edge("fan_out", "worker")
workflow.add_edge("worker", "fan_in")  # Waits for all workers

Using Send API

from langgraph.constants import Send

def router(state):
    """Route to multiple workers in parallel."""
    return [
        Send("worker", {"task": task})
        for task in state["tasks"]
    ]

workflow.add_conditional_edges("router", router)

Parallel Agent Analysis

from typing import Annotated
from operator import add

class AnalysisState(TypedDict):
    content: str
    findings: Annotated[list[dict], add]  # Accumulates

async def run_parallel_agents(state: AnalysisState):
    """Run multiple agents in parallel."""
    agents = [security_agent, tech_agent, quality_agent]

    # Run all concurrently
    tasks = [agent.analyze(state["content"]) for agent in agents]
    results = await asyncio.gather(*tasks, return_exceptions=True)

    # Filter successful results
    findings = [r for r in results if not isinstance(r, Exception)]

    return {"findings": findings}

Map-Reduce Pattern

def map_node(state):
    """Map: Process each item independently."""
    items = state["items"]
    results = []

    for item in items:
        result = process_item(item)
        results.append(result)

    return {"mapped_results": results}

def reduce_node(state):
    """Reduce: Combine all results."""
    results = state["mapped_results"]

    summary = {
        "total": len(results),
        "passed": sum(1 for r in results if r["passed"]),
        "failed": sum(1 for r in results if not r["passed"])
    }

    return {"summary": summary}

Error Isolation

async def parallel_with_isolation(tasks: list):
    """Run parallel tasks, isolate failures."""
    results = await asyncio.gather(*tasks, return_exceptions=True)

    successes = []
    failures = []

    for task, result in zip(tasks, results):
        if isinstance(result, Exception):
            failures.append({"task": task, "error": str(result)})
        else:
            successes.append(result)

    return {"successes": successes, "failures": failures}

Timeout per Branch

import asyncio

async def parallel_with_timeout(agents: list, content: str, timeout: int = 30):
    """Run agents with per-agent timeout."""
    async def run_with_timeout(agent):
        try:
            return await asyncio.wait_for(
                agent.analyze(content),
                timeout=timeout
            )
        except asyncio.TimeoutError:
            return {"agent": agent.name, "error": "timeout"}

    tasks = [run_with_timeout(a) for a in agents]
    return await asyncio.gather(*tasks)

Key Decisions

DecisionRecommendation
Max parallel5-10 concurrent (avoid overwhelming APIs)
Error handlingreturn_exceptions=True (don't fail all)
Timeout30-60s per branch
AccumulatorUse Annotated[list, add] for results

Common Mistakes

  • No error isolation (one failure kills all)
  • No timeout (one slow branch blocks)
  • Sequential where parallel possible
  • Forgetting to wait for all branches

Related Skills

  • langgraph-state - Accumulating state
  • multi-agent-orchestration - Coordination patterns
  • langgraph-supervisor - Supervised parallel execution

Capability Details

fanout-pattern

Keywords: fanout, parallel, concurrent, scatter Solves:

  • Run agents in parallel
  • Implement fan-out pattern
  • Distribute work across workers

fanin-pattern

Keywords: fanin, gather, aggregate, collect Solves:

  • Aggregate parallel results
  • Implement fan-in pattern
  • Collect worker outputs

parallel-template

Keywords: template, implementation, parallel, agent Solves:

  • Parallel agent fanout template
  • Production-ready code
  • Copy-paste implementation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.24%
按下载量换算47

OpenCode

20.25%
按下载量换算30

Antigravity

15.48%
按下载量换算23

Gemini CLI

11.69%
按下载量换算18

windsurf

8.53%
按下载量换算13

trae

3.2%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills