langbot
Operate, extend, test, and troubleshoot the LangBot repo: Quart backend, React web UI, IM bots, pipelines, providers, plugins, Box, MCP, RAG, persistence, deployment, and QA workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- langbot
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate, extend, test, and troubleshoot the LangBot repo: Quart backend, React web UI, IM bots, pipelines, providers, plugins, Box, MCP, RAG, persistence, deployment, and QA workflows.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/api-route-map.md1.6 KB
- 参考文档references/repo-provenance.md2.6 KB
- 参考文档references/repo-routing-metadata.json503 B
- 参考文档references/testing-and-verification.md2.7 KB
- 参考文档references/troubleshooting.md3.2 KB
- 脚本scripts/extract_langbot_routes.py4.4 KB
- 脚本scripts/langbot_repo_doctor.py4.5 KB
- 脚本scripts/select_langbot_checks.py3.0 KB
03 SKILL.md 正文
LangBot Repo Skill
Use this repo skill when a task is about the LangBot main repository or an
installed langbot package. LangBot is a production IM-bot platform that wires
messaging adapters, LLM providers, agents, tools, plugins, RAG, MCP, Box
sandboxing, persistence, and a web management panel into one runtime.
Fast Orientation
- Python package:
langbot, import rootlangbot, console scriptlangbot. - Supported Python from package metadata:
>=3.11,<4.0. - Backend service: Quart/Hypercorn, default
api.port: 5300. - Frontend: Vite + React Router + shadcn/ui + Tailwind under
web/. - Plugin and Box contracts come from the
langbot-pluginSDK package; shared SDK changes must be made in the sibling SDK repository and then installed into LangBot for cross-repo checks. - Generated skill provenance and refresh baseline: read references/repo-provenance.md.
Minimal package smoke for a checkout or installed package:
python - <<'PY'
from importlib.metadata import version
import langbot
print('langbot', version('langbot'))
PY
langbot --help
Common local commands:
uv sync --dev
uv run main.py
uv run pytest tests/unit_tests -q
cd web && pnpm install && pnpm dev
Route by Task
| User task | Read |
|---|---|
Start LangBot, inspect boot stages, configure config.yaml, choose Docker/Compose/Kubernetes/runtime flags, diagnose /healthz, or reason about resource probes |
core-runtime |
| Add/change HTTP API endpoints, permissions, API keys, MCP tools, web UI calls, Page Bot embed, frontend build/lint/i18n | api-mcp-web |
| Debug message delivery, platform adapters, HTTP Bot callbacks, pipeline stages, providers/runners, model/tool loading, local agent request flow | platform-pipeline-provider |
| Work with Plugin Runtime, plugin connector/handler, Box sandbox runtime, native tools, stdio MCP hosting, skill CRUD, or in-repo skill assets | plugin-box-skills |
| Change persistence schemas, migrations, Workspace tenancy, RAG, vector backends, storage, monitoring, telemetry, or cloud tenant resource behavior | persistence-rag-workspaces |
| Choose verification scope, run focused pytest/pnpm/lbs gates, collect QA evidence, or interpret test readiness/fixtures/manual checks | testing-qa |
Shared References and Helpers
- references/troubleshooting.md covers cross-cutting install/import/config/service/credential failures before you open a workflow-specific troubleshooting page.
- references/testing-and-verification.md summarizes safe native candidate checks and when broader gates are justified.
- references/api-route-map.md explains how to extract the current HTTP route and MCP tool surface from a checkout.
- Run scripts/langbot_repo_doctor.py to inspect a target checkout/package layout, metadata, config-template keys, and selected imports without starting LangBot.
- Run scripts/extract_langbot_routes.py to statically extract HTTP routes and MCP tools from a checkout.
- Run scripts/select_langbot_checks.py to print or optionally execute focused verification command groups.
Change Rules to Preserve
- For non-trivial backend, frontend, runtime, plugin, Box, MCP, persistence, or SDK-boundary work, start from the architecture map and then the owning sub-skill; do not jump directly into a random module.
- HTTP API changes that should be agent-accessible must keep the service layer, route group, MCP tool surface, and relevant skill/testing guidance aligned.
- New schema changes use Alembic migrations; do not add new legacy
dbmXXXmigrations. - Platform adapters translate external platform shapes into LangBot's common message/event entities; pipeline/business logic belongs in pipeline stages or services, not vendor adapters.
- User-facing strings in product code need i18n coverage (
en_US,zh_Hans, andja_JPwhen nearby code already does). - Do not require real provider keys, platform credentials, Docker, PostgreSQL, vector services, browsers, or cloud cgroups unless the selected task truly touches that surface; use focused fake/unit checks first.
Boundaries
This skill teaches future Researcher sessions how to operate on LangBot. It is not an import/export workflow and it does not install itself into live routing. Use the generated references/scripts bundled here; do not rely on external docs or examples being present when answering a task.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).