AGENT SKILL

flow-orchestration

Guides LazyLLM pipeline, parallel, branching, looping, binding, graph, and traceable flow orchestration workflows.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
flow-orchestration
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guides LazyLLM pipeline, parallel, branching, looping, binding, graph, and traceable flow orchestration workflows.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

LazyLLM Flow Orchestration

Use this sub-skill when a task asks how to compose LazyLLM flows with pipeline, parallel, diverter, switch, ifs, loop, warp, barrier, bind, nested contexts, or traceable graph execution.

Start here when

  • The user wants to turn Python functions, model modules, RAG retrievers, or agents into a LazyLLM workflow.
  • A flow returns an unexpected tuple/list/dict shape.
  • The task mentions _skip_items, _kept_items, _scatter, _concurrent, bind, pipeline() context managers, nested subflows, or conditional/loop execution.
  • You need to replace model/RAG/agent nodes with deterministic callables before debugging orchestration.

Files to read

Safe flow-building sequence

  1. Sketch the data shape at each node before adding LazyLLM primitives.
  2. Prototype with deterministic Python callables rather than models/providers.
  3. Choose the primitive.
    • pipeline: sequential composition.
    • parallel: same input through multiple stages; can return tuples and skip/keep items.
    • diverter: distribute positional/list/tuple/dict inputs to separate functions.
    • switch/ifs: conditional routing.
    • loop: repeated execution with count or stop condition.
    • bind: bind flow inputs or prior stage outputs into callable parameters.
  4. Run scripts/flow_smoke.py to confirm the environment and expected semantics.
  5. Swap in heavy nodes last and route their setup to model-deployment, RAG, agents-tools, or writer-review.

Verified examples from tests

  • pipeline(add_one, add_one)(1) == 3.
  • Context manager pipelines can name stages and bind the original input or previous outputs into later stages.
  • parallel(add_one, add_one)(1) == (2, 2).
  • _skip_items and _kept_items select by index or by named stage, but cannot be provided together.
  • switch supports predicate-to-action maps, default cases, conversion functions, and full-input judging.
  • ifs supports booleans and callable conditions and propagates real condition exceptions.
  • loop supports fixed counts, stop conditions, and runtime limit expansion.

Cross-sub-skill links

  • Use model-deployment when a flow node calls OnlineModule, TrainableModule, or ServerModule.
  • Use rag-document-processing when a flow node ingests documents, retrieves nodes, or reranks contexts.
  • Use agents-tools when a flow node is a tool manager or agent.
  • Use writer-review when flow output is a writer artifact or review command plan.

Handoff checklist

When you finish a flow task, provide:

  • primitive choice and why,
  • input/output shape for each stage,
  • minimal deterministic smoke result,
  • where model/RAG/agent/writer nodes are configured,
  • any concurrency/multiprocessing or side-effect warnings.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351