r2r
Route R2R tasks to the correct Python, JavaScript, ingestion, retrieval, graph, and server workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- r2r
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route R2R tasks to the correct Python, JavaScript, ingestion, retrieval, graph, and server workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/package-overview.md2.5 KB
- 参考文档references/repo-provenance.md735 B
- 参考文档references/repo-routing-metadata.json474 B
- 参考文档references/troubleshooting.md1.4 KB
- 脚本scripts/check_r2r_environment.py2.6 KB
03 SKILL.md 正文
R2R
Use this skill when a user asks about the R2R server, the Python or JavaScript SDK, document ingestion, retrieval and RAG, graph workflows, deployment/configuration, or troubleshooting across those surfaces.
Start here:
- Install the public package with
pip install r2r. - If you need server and config extras, use
pip install 'r2r[core]'. - Verify the public Python surface with
python scripts/check_r2r_environment.py. - Route the task to the nearest sub-skill instead of packing every workflow into the root.
Routing map
sub-skills/python-sdk/— Python sync/async client setup, auth, method groups, downloads, pagination, streaming, and response wrappers.sub-skills/ingestion-documents/— document creation, chunking, metadata, filters, exports, and collection/document lifecycle.sub-skills/retrieval-rag/— search, RAG, streaming citations, agent/research mode, completion, and embedding.sub-skills/graph-workflows/— extraction, graph build/pull/reset, entities, relationships, communities, and graph lifecycle.sub-skills/server-configuration/— install,r2r.serve, config TOML/env, Docker, providers, and ops troubleshooting.sub-skills/javascript-sdk/— Node/browser client usage, auto-refresh, stream handling, and JS-specific payload shape.
Useful bundled files
references/package-overview.mdreferences/troubleshooting.mdreferences/repo-provenance.mdreferences/repo-routing-metadata.jsonscripts/check_r2r_environment.py
Safe first checks
- Prefer
python scripts/check_r2r_environment.pyoverr2r-serve --helpwhen you only need a safe verification path. r2r-servestarts server initialization and may need database and provider settings, so it is not a safe help-only probe.- For any client workflow, decide early whether the request is Python SDK, JS SDK, document ingestion, retrieval/RAG, graph operations, or server configuration.
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).