AGENT SKILL

serving-api

Operate LightLLM HTTP serving, request payloads, streaming, and profiler control.

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

01 前言 Front Matter

name
serving-api
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Operate LightLLM HTTP serving, request payloads, streaming, and profiler control.
disable-model-invocation
true

02 资源文件 2

03 SKILL.md 正文

serving-api

Use this sub-skill when a user wants to start a LightLLM server, send a request to one of its HTTP APIs, debug a streaming response, enable profiler control, or understand the serving-side request/response shapes.

Covers

  • python -m lightllm.server.api_server startup for single-node serving.
  • LightLLM-native /generate and /generate_stream calls.
  • OpenAI-compatible /v1/chat/completions and /v1/completions calls.
  • Anthropic-compatible /v1/messages and OpenAI Responses /v1/responses.
  • Health, readiness, liveness, model-info, token-load, metrics, and profiler endpoints.
  • Function calling, reasoning parser settings, and multimodal request payloads.
  • Response schema expectations for streamed and non-streamed outputs.

Does not cover

  • Whether a particular model family or backend is supported.
  • PD disaggregation or multi-node launch order.
  • Benchmark design beyond a single smoke request against a running server.

Read first

Use this route when the user says

  • “start the LightLLM API server”
  • “how do I call /generate?”
  • “how do I use the OpenAI / Anthropic compatibility APIs?”
  • “why is streaming empty or truncated?”
  • “how do I enable profiler start/stop or check metrics?”
  • “how should I format multimodal or tool-call requests?”

Minimal working sequence

  1. Confirm the package is installed and the CUDA/runtime environment is ready.
  2. Read the CLI and API references for the chosen endpoint family.
  3. Start the server with the smallest valid StartArgs subset.
  4. Use scripts/request_smoke.py for a single local request before any larger integration or benchmark call.
  5. If the request shape fails, compare the payload against the request models in references/api-reference.md.

Common decision points

  • Use /generate for the LightLLM-native string input path.
  • Use /v1/completions for completion-style prompts.
  • Use /v1/chat/completions for message lists, tool calls, and reasoning-aware chat flows.
  • Use /v1/messages only when Anthropic compatibility is explicitly needed.
  • Use /v1/responses when a client expects the newer OpenAI Responses schema.
  • Use /readiness rather than /health when a benchmark or deploy script needs a real launch signal.

Bundled helper scripts

  • ../../scripts/inspect_api_surface.py prints the live route table and schema signatures.
  • ../../scripts/request_smoke.py can send a tiny request to a running local server.
  • ../../scripts/inspect_start_args.py helps when a flag combination is not accepted.

Troubleshooting highlights

  • The server may import before the model is ready; check readiness, not only health.
  • Proxy variables can break local calls to localhost or the PD master host.
  • Streaming clients must handle SSE-style incremental output.
  • Multimodal payloads must use the structured message content blocks described in the API reference.
  • /v1/messages can fail if litellm is not installed.

Review standard

This sub-skill is complete when a future agent can:

  • start a serving process,
  • select the correct endpoint family,
  • construct a minimal valid payload,
  • interpret the first response shape,
  • and diagnose the common API/path/proxy failures without reopening the source repository.

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