genai-processors
Route GenAI Processors tasks to the right workflow guide.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- genai-processors
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route GenAI Processors tasks to the right workflow guide.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/install.md2.6 KB
- 参考文档references/repo-provenance.md1.4 KB
- 参考文档references/repo-routing-metadata.json513 B
- 参考文档references/troubleshooting.md4.0 KB
- 脚本scripts/check_install.py3.1 KB
03 SKILL.md 正文
GenAI Processors
GenAI Processors is a composable Python library for building AI pipelines with shared content types, async processor composition, model wrappers, and multimodal I/O.
Use this repo skill when the task mentions any of the following:
Processor,PartProcessor,ProcessorPart,ProcessorContent, orContentStream.- Model wrappers such as
GenaiModel,LiveProcessor,OllamaModel,TransformersModel,FunctionCalling,LangChainModel,OpenRouterModel, or the ADK bridge. - Audio/video/PDF/web/file connectors, speech-to-text, text-to-speech, VAD, realtime streams, or live agent pipelines.
- CLI demos, research agents, live commentator / illustrator / widgets applets, or AI Studio WebSocket backends.
Read this first
references/install.mdfor install variants and the minimal smoke check.references/repo-provenance.mdfor the source snapshot used to build this skill.references/repo-routing-metadata.jsonfor import routing metadata.references/troubleshooting.mdfor cross-cutting setup and runtime failures.
Route map
sub-skills/core-composition/
Use for processor composition, content types, stream utilities, caching, routing, tracing, and text/templating helpers.
Typical prompts:
- "How do I build a custom processor?"
- "How do
ContentStreamandProcessorPartwork?" - "How do I cache or trace a processor pipeline?"
- "How do I branch a stream with
Switchorparallel?"
sub-skills/model-backends/
Use for Gemini, Live API, realtime conversation loops, function calling, MCP, Ollama, Transformers, LangChain, OpenRouter, ADK, and the example backends.
Typical prompts:
- "Which model wrapper should I use?"
- "How do I wire tool calls or MCP sessions?"
- "How do I switch between Gemini, Ollama, and local Transformers?"
- "How do I build a realtime or function-calling agent?"
sub-skills/multimodal-i-o/
Use for audio/video/PDF/web/file connectors, speech and TTS, VAD, rate-limited audio, event detection, windowing, timestamps, and document fetchers.
Typical prompts:
- "How do I capture microphone or camera input?"
- "How do I transcribe audio or synthesize speech?"
- "How do I extract content from PDFs, URLs, GitHub, or Drive?"
- "How do I manage realtime audio or video streams?"
sub-skills/examples-and-apps/
Use for the CLI demos, research agent, trip request workflow, live commentator, live illustrator, widgets, AI Studio applets, and websocket server helpers.
Typical prompts:
- "How do I run or adapt one of the example CLIs?"
- "How does the research agent fit together?"
- "How do the AI Studio applets talk to the backend?"
- "How do I build a full end-to-end demo around these processors?"
Quick install
For the core library:
pip install genai-processors
Add genai-processors[contrib] when you need the bundled LangChain/OpenRouter
helpers. The more specialized example stacks may also need extra runtime
packages such as pyaudio, av, google-adk, transformers, or the Google
Cloud Speech/Text-to-Speech clients. See references/install.md.
Minimal smoke check
python -c "import genai_processors; print(genai_processors.__version__)"
For a slightly stronger check, run the bundled smoke script:
python scripts/check_install.py
How to choose a route
- Start with
core-compositionif the task is about processor mechanics, content typing, stream manipulation, or reusable wrappers. - Start with
model-backendsif the task is about model choice, tool calls, local backends, or multi-agent orchestration. - Start with
multimodal-i-oif the task is about the inputs and outputs the processors consume or emit. - Start with
examples-and-appsif the task is about running or adapting a complete demo, CLI, or applet.
If a task touches more than one route, read the owning sub-skill first and then follow its cross-links instead of duplicating guidance here.
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).