extensions
Build and customize Kotaemon/ktem components, indexes, pages, settings, plugins, and project templates for developers.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- extensions
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Build and customize Kotaemon/ktem components, indexes, pages, settings, plugins, and project templates for developers.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/component-development.md5.7 KB
- 参考文档references/index-extension.md8.1 KB
- 参考文档references/plugin-ui-extension.md6.8 KB
- 参考文档references/troubleshooting.md5.3 KB
- 脚本scripts/scaffold_component_check.py7.6 KB
03 SKILL.md 正文
Kotaemon Extensions
Use this sub-skill when the task is to add or review developer-facing Kotaemon extensions: custom BaseComponent pipelines, file indexing/retrieval classes, flowsettings.py registrations, ktem app pages, settings surfaces, pluggy extensions, or project/component templates.
Use This For
- Creating or reviewing
BaseComponentclasses with typed params/nodes and arun(...)method. - Registering custom reasoning/indexing/retrieval pipelines through
flowsettings.pydotted paths. - Extending file indexes with custom indexing pipelines, retriever pipelines, selector/index pages, or new
BaseIndextypes. - Adding developer settings exposed in the Settings page through
get_user_settings,get_admin_settings,get_info, andget_pipelinecontracts. - Packaging ktem pluggy extensions with
ktem_declare_extensionsand project scaffolds based on Kotaemon templates.
Route Elsewhere
- End-user app install, launch,
.env, login, Docker, PDF.js, update, or data migration: use../app-deployment/SKILL.md. - Provider credentials, endpoint shapes, local model servers, LLM/embedding/reranking manager setup, or GraphRAG provider config: use
../model-providers/SKILL.md. - File readers, OCR/table parser implementation details, splitters, and document metadata validation: use
../document-ingestion/SKILL.md. - Core retrieval, reranking, QA, citation,
Document,RetrievedDocument, vectorstore/docstore internals, and RAG pipeline composition: use../rag-core/SKILL.md.
Fast Workflow
- Identify the extension surface: component, reasoning pipeline, file-index pipeline, retriever, index type, page/UI, pluggy package, or scaffold template.
- Use
references/component-development.mdfor theBaseComponentcontract, typed params/nodes, prompt UI settings, and contribution clues. - Use
references/index-extension.mdforBaseIndex,BaseFileIndexIndexing,BaseFileIndexRetriever,KH_INDEX_TYPES,KH_INDICES, andFILE_INDEX_*overrides. - Use
references/plugin-ui-extension.mdfor ktem pages/settings integration, pluggy declarations, and template packaging. - Run the bundled static checker before reviewing or registering a new component/template:
python skills/kotaemon/sub-skills/extensions/scripts/scaffold_component_check.py --path <component-file-or-template-dir>
Review Checklist
- Component classes subclass
kotaemon.base.BaseComponentor a ktem index base and implement the requiredrun/factory signatures. - Public settings dictionaries use supported Gradio component ids:
text,number,checkbox,dropdown,radio, orcheckboxgroup. - Every dotted path in
flowsettings.pyis importable from the app working directory and points to a class, not a module. - Custom file-index pipelines surface user settings with stable keys and read index/admin settings through
get_pipeline(...)rather than global state. - Pluggy declarations use ids without
.or/, match thektemhook namespace, and expose callbacks/settings in the expected dictionary shape. - Templates include packaging files and a discoverable Python package so generated projects can be installed before
flowsettings.pyreferences them.
Bundled References
references/component-development.md-BaseComponentcontract, params/nodes, prompt UI, project template, and contribution workflow.references/index-extension.md- custom index, file-index pipeline, retrieval, UI class, andflowsettings.pyregistration points.references/plugin-ui-extension.md- app/page lifecycle, Settings tab rendering, pluggy protocol, and template packaging.references/troubleshooting.md- static diagnosis for missing subclasses, signatures, settings, dotted paths, hooks, and templates.
Bundled Script
scripts/scaffold_component_check.py- offline static checker for a component file or template directory; it parses Python withast, scans text files, executes no project code, and exits nonzero for hard compatibility failures.
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).