AGENT SKILL

server-setup-and-cli

Install, initialize, configure, and start Langchain-Chatchat with the chatchat CLI, data root, model providers, and deployment options.

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

01 前言 Front Matter

name
server-setup-and-cli
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Install, initialize, configure, and start Langchain-Chatchat with the chatchat CLI, data root, model providers, and deployment options.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Server Setup and CLI

Use this sub-skill for Langchain-Chatchat installation, CHATCHAT_ROOT, YAML configuration, chatchat init, chatchat kb, chatchat start, Docker/Xinference deployment planning, and model-provider setup.

Read first

Setup workflow

  1. Choose environment. Use Python 3.10 or 3.11. Prefer a clean Chatchat environment. Keep heavy model-serving frameworks in separate envs/containers unless the user explicitly wants a combined setup.
  2. Install package. For normal users, use python -m pip install -U langchain-chatchat. For source development, install the server package editable from the server package root.
  3. Pick data root. Set CHATCHAT_ROOT to a persistent directory if the current working directory is not the desired data/config location.
  4. Initialize. Run chatchat init before any service startup. Do not use --recreate-kb until embedding provider settings are valid.
  5. Edit YAML. Update model platform, default LLM, default embedding model, server host/port, KB/vector-store settings, and tool settings as needed.
  6. Rebuild or update KB. Run chatchat kb -r for full vector rebuild only after the embedding model is reachable. Use update/increment/prune flags for lighter maintenance.
  7. Start service. Use chatchat start --api, chatchat start --webui, or chatchat start -a.
  8. Validate endpoints. Open API docs at the API service root redirect or use API/SDK probes from sibling sub-skills.

CLI quick reference

chatchat --help
chatchat init --help
chatchat kb --help
chatchat start --help

Common command sequence:

export CHATCHAT_ROOT=/path/to/chatchat-data
chatchat init
# edit generated YAML files: model_settings.yaml, kb_settings.yaml, basic_settings.yaml, tool_settings.yaml, prompt_settings.yaml
chatchat kb -r
chatchat start -a

If chatchat kb -r fails, do not retry blindly. Confirm the embedding provider endpoint and model name first.

Boundary with sibling sub-skills

  • After the API/WebUI process is running, use ../knowledge-base-and-api/SKILL.md for route payloads, RAG modes, tools, and vector-store API calls.
  • Use ../python-sdk-and-adapters/SKILL.md for SDK clients, open_chatcaht, and LangChain adapter classes.
  • Return here when an API/SDK failure points to missing config, wrong model names, CHATCHAT_ROOT, provider reachability, or service startup.

Safety rules

  • Do not start Docker Compose, model downloads, or AutoDL process-killing scripts without explicit user approval.
  • Do not run chatchat kb --clear-tables, prune commands, or --recreate-kb against user data until the target CHATCHAT_ROOT and backup status are clear.
  • Do not claim GPU/provider readiness from package import or CLI help. Provider readiness requires provider-specific checks.

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