genai-processors
llms.txt2.1k starsChanged 9 months agoApache-2.0View on GitHub
The GenAI Processors library provides composable, async building blocks for generative AI pipelines.
Trending
Quiet since May.thin dataabout the whole repository
Who's talking about google-gemini/genai-processors
- @pythonhub.dev“google-gemini / genai-processors GenAI Processors is a lightweight Python library that enables efficient, …”Bluesky · Aug 18, 2025 · 2 likes
- mbeacom/genai-processors-pydantic“chore(deps): Bump genai-processors from 1.1.0 to 1.1.1”GitHub · Feb 2, 2026 · 1 reactions
- @llmstock.bsky.social“yet another agent orchestrate framework with build in parallel execution feature github.com/google-gemin...”Bluesky · Jul 11, 2025 · 1 likes
- A Hacker News story“GenAI Processors: Modular, Asynchronous, and Composable AI Pipelines”Hacker News · Jun 25, 2025 · 1 points
- mbeacom/genai-processors-url-fetch“chore(deps): Bump genai-processors from 1.1.0 to 2.0.3”GitHub · May 11, 2026
The biggest 5 of 5 mentions linking to the repository that our crawl found. Each line is their own headline.
The file
We split this llms.txt into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Preserve multimodal content: Do not narrow content to .text() needlessly and too early.
- Very specific: line 10
CLI Input: Use genai_processors.core.text.terminal_input("User: ") rather than manual input() loops.
- Distinctive: line 23
create local webpage with JS or TS for the frontend, base64 decode the media data when receiving.
- Distinctive: line 24
All messages sent and received are JSON-serialized ProcessorParts.
≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
# GenAI Processors Documentation for LLMs
The GenAI Processors library provides composable, async building blocks for generative AI pipelines.
## 🚀 Best Practices & Gotchas
* **Pass inputs directly**: `ProcessorContentTypes` and `ProcessorPartTypes` are wide Unions that accept many existing content types, including plain strings. `ContentStream` automatically coerces them into `ProcessorPart`s, so you do not need to explicitly wrap strings. Processors can injest `ProcessorContentTypes`, `stream_content` is not required. Reference `content_api.py` for full details on what types are accepted.
* **Preserve multimodal content**: Do not narrow content to `.text()` needlessly and too early. Models accept multimodal content (images, audio, etc.), so keep it as `ProcessorContentTypes` and only narrow it to text at the last possible moment, if at all needed.
* **Safe `.text` access**: Non-text parts throw `ValueError` when accessing `.text`. You can use `content_api.is_text(part.mimetype)` to check if the part is text. But if the code can't handle non text parts properly anyways, just let the exception be risen. The `part.text` is always present and not None, don't use `hasattr` or `is not None` to validate that.
* **Processor Output Gathering**: A processor call `await processor(input_content).gather()` is the best and simplest way to execute a processor and accumulate all outputs into a single `ProcessorContent` object. **DO NOT** use `apply_async` or manual loops to iterate and accumulate parts unless you need to process them sequentially as they arrive.
* **CLI Input**: Use `genai_processors.core.text.terminal_input("User: ")` rather than manual `input()` loops; it handles async yielding, `end_of_turn`, and exits implicitly.
* **Conversation Context**: Turn based models require your code to maintain a conversation history. Live models to it for you.
## 🔎 Core Modules (`genai_processors.core.*`)
* `genai_model.py`: Google GenAI API integration (`GenaiModel`).
* `text.py`: Shell IO (`terminal_input`, `terminal_output`), URL extractors, match processors.
* `function_calling.py`: Function schemas and tool calling support.
* `live_model.py` / `realtime.py`: Streaming and WebRTC interfaces.
* `filesystem.py`, `web.py`, `github.py`, `pdf.py`: File IO, fetching, and document parsing.
* `audio.py`, `video.py`: Multimodal processors.
## 🛠️ Developing end to end AI applications
* `live_server.py`: websocket server serves as backend, default to localhost.
* create local webpage with JS or TS for the frontend, base64 decode the media data when receiving.
* All messages sent and received are JSON-serialized ProcessorParts.
## 📖 Where to Look for Help
* **Documentation Guides** (`documentation/docs/`):
* `getting-started.md` / `index.md`: Setup and basics.
* `concepts/processor.md` / `concepts/async-streaming.md`: Core framework logic.
* `development/caching.md` / `development/tracing.md`: Optimizations and tracing.
* `rapid-prototyping/ai-studio.md` / `rapid-prototyping/cli.md`: App deployment references.
* **Examples** (`examples/` directory):
* `chat.py`: Standard chatbot architecture.
* `live_simple_cli.py` / `realtime_simple_cli.py`: Streaming architectures.
* `research/`: Modular multi-agent composition.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

