Chaining Gemini calls without drowning in asyncio
It wraps Gemini's turn-based and live APIs into composable async processors so you don't have to write your own stream plumbing.

What it does
GenAI Processors is a Python framework that abstracts Gemini model calls—and any surrounding logic—into modular units called Processors. Each processor handles asynchronous, multimodal data streams through a dual-interface pattern: authors implement a producer-facing call method that consumes a ProcessorStream, while callers interact with a forgiving consumer interface that accepts raw strings or parts and returns awaitable or iterable streams. The library includes ready-made processors for standard Gemini API calls and the Live API, plus utilities to split, merge, and concatenate streams of rich content like text, images, and audio.
The interesting bit
The clever part is the “dual-interface” design that hides asyncio complexity from callers while giving authors full control over streaming multimodal parts. Processors compose with + for sequential chaining and // for parallel execution, letting you build agentic behaviors—like a research agent with three sub-processors or a live audio commentary system—from small reusable blocks rather than monolithic scripts.
Key highlights
ProcessorPartwraps Gemini’s nativeParttype with metadata, giving a single representation for text, images, audio, and JSON across tools and models.- Processors compose via
+(chaining) and//(parallelism), so complex agents can be built from small reusable blocks. - Streaming is the default: consumers can
awaitfull results, grab text directly, or iterate chunks as they arrive. - Ships with ready-made
GenaiModelandLiveProcessorclasses for turn-based and real-time Gemini interactions. - Extensible through subclassing or decorators; core utilities live in
core/and community additions incontrib/.
Verdict
Worth a look if you are building non-trivial, async Gemini pipelines—especially live or multimodal agents—and want someone else to manage the stream plumbing. Skip it if you just need a one-off synchronous chat completion; the payoff only arrives once you start wiring processors together.
Frequently asked
- What is google-gemini/genai-processors?
- It wraps Gemini's turn-based and live APIs into composable async processors so you don't have to write your own stream plumbing.
- Is genai-processors open source?
- Yes — google-gemini/genai-processors is open source, released under the Apache-2.0 license.
- What language is genai-processors written in?
- google-gemini/genai-processors is primarily written in Python.
- How popular is genai-processors?
- google-gemini/genai-processors has 2.1k stars on GitHub.
- Where can I find genai-processors?
- google-gemini/genai-processors is on GitHub at https://github.com/google-gemini/genai-processors.