AGENT SKILL

lazy-llm

Guides LazyLLM low-code LLM application workflows including modules, flows, RAG, agents, tools, writer review, CLI, and deployment.

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

01 前言 Front Matter

name
lazy-llm
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guides LazyLLM low-code LLM application workflows including modules, flows, RAG, agents, tools, writer review, CLI, and deployment.
disable-model-invocation
true

02 资源文件 7

03 SKILL.md 正文

LazyLLM Repo Skill

Use this skill when a task asks how to build, debug, test, or adapt LazyLLM applications: low-code LLM modules, composable flows, RAG/document pipelines, agents/tools/MCP, writer/review workflows, model deployment, online providers, or the lazyllm CLI.

First actions for any LazyLLM task

  1. Read Repository provenance if you need to decide whether this skill matches a current checkout or whether a refresh is required.
  2. Pick the focused sub-skill from the route map below before opening details.
  3. Check dependency class early. Base LazyLLM imports do not include every optional RAG, agent, model-serving, multimodal, tracing, or provider dependency.
  4. Prefer the bundled diagnostic scripts over ad hoc probes:
  5. Never assume a model, provider key, vector database, parser service, Kubernetes/Slurm cluster, npm MCP server, or GPU backend is available unless the user explicitly provided it.

Route map

User task or signal Read this
Install LazyLLM, inspect extras, use lazyllm CLI, configure lazyllm.config, launcher/service basics, components/prompters, package import failures core-runtime
Use TrainableModule, OnlineModule, OnlineChatModule, ServerModule, deploy/fine-tune models, choose local vs online vs multimodal backend, diagnose provider/model type behavior model-deployment
Compose pipeline, parallel, diverter, switch, ifs, loop, bind, or traceable application graphs flow-orchestration
Build RAG/document workflows with Document, DocNode, readers, transforms, retrievers, rerankers, BM25, vector stores, parser service, Milvus/OpenSearch rag-document-processing
Register function-call tools, use ToolManager, build React/ReWOO/PlanAndSolve agents, use sandbox flags, SQL/HTTP/search tools, SkillManager, MCP agents-tools
Use writer IR/artifacts, writer tools, revision/stream utilities, Feishu adapter boundaries, lazyllm review or local review workflows writer-review

Installation and extras quick guide

Read Installation and optional extras for the full matrix. Typical choices:

python -m pip install lazyllm
lazyllm install rag              # document/RAG imports
lazyllm install agent-advanced   # MCP/advanced agent dependencies
lazyllm install standard         # broad app stack; may install heavy model/vector packages
lazyllm install full             # all optional stacks; use only when explicitly needed

For a source checkout, use an editable install with a supported Python (>=3.10,<3.14) and then install only the extras required by the selected workflow. Do not install full just to answer a base CLI/config/flow question.

Minimal no-network smoke check:

python scripts/check_lazyllm_env.py --require-rag --require-agent --require-writer

Run that command from inside this skill directory after copying or locating the script, or pass the script path explicitly from any working directory. It only imports LazyLLM modules and does not call a provider.

High-signal API surfaces

Read API surface map when a task names a class/function or when you need exact routing. Verified public entry points include:

  • lazyllm.pipeline, parallel, diverter, switch, ifs, loop, bind
  • TrainableModule, OnlineModule, OnlineChatModule, ServerModule, ActionModule
  • Document, Retriever, Reranker, DocNode, BM25 and store/index helpers
  • fc_register, ToolManager, SkillManager, ReactAgent, ReWOOAgent, PlanAndSolveAgent
  • writer artifact models and WriterToolBase
  • CLI commands: install, deploy, run, skills, review, review-local

Backend and safety policy

  • Safe by default: import checks, config/CLI inspection, flow graphs with Python callables, BM25/local RAG smoke, writer artifact round trips, tool schema registration.
  • Ask or require explicit evidence: cloud provider calls, model downloads, local GPU serving/fine-tuning, multimodal generation, external vector databases, parser-service workers, MCP servers launched through npx/npm, Kubernetes/Slurm/SCO jobs, PR posting.
  • Do not post or mutate remote systems from review, MCP, Feishu, database, or provider helpers unless the user asks for that side effect and provides credentials.

Troubleshooting shortcuts

Start with cross-cutting troubleshooting, then the owning sub-skill's troubleshooting file. Common LazyLLM symptoms:

  • ImportError: Missing package(s): ... You can install them by: lazyllm install rag → read the RAG or install reference; install the exact extra, not full, unless the task needs heavy backends.
  • lazyllm --help exits with a usage error → this CLI prints usage from its dispatcher; use concrete subcommands such as lazyllm skills list or inspect the command table in core-runtime.
  • Provider/API-key errors → route to model-deployment and keep provider tests optional.
  • Flow result mismatch → route to flow-orchestration and verify bind, skip/kept items, and input tuple handling.

When not to use this skill

Do not use this skill for generic LLM theory, non-LazyLLM frameworks, model architecture research unrelated to LazyLLM modules, or direct production deployment to a user cluster without first checking the model-deployment and core runtime dependency/back-end constraints.

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