Framework Primitives
GenAI SDK usescontents to represent user messages, files, system messages, function calls, and invocation parameters. That creates relatively simple generation calls:
Patterns
Google GenAI does not include built in orchestration patterns.Handoffs and State
GenAI has no concept of handoffs natively. State is handled by maintaining a list of previous messages and other data in a list of content objections. This is similar to how other model SDKs like OpenAI and Anthropic handle the concept of state. This stands in contrast to the more sophisticated measurements of state present in agent orchestration frameworks.Tools
GenAI does include some conveience features around tool calling. Thetypes.GenerateContentConfig method can automatically convert base python functions into signatures. To do this, the SDK will use the function docstring to understand its purpose and arguments.
Memory
GenAI has no built-in concept of memory.Multi-Agent Collaboration
GenAI has no built-in collaboration strategies. These must be defined manually.Streaming
GenAI supports streaming of both text and image responses:Design Considerations and Limitations
GenAI is the “simplest” framework in this guide, and is closer to a pure model SDK like the OpenAI SDK, rather than an agent framework. It does go a few steps beyond these base SDKs however, notably in tool calling. It is a good option if you’re using Gemini models, and want more direct control over your agent system.| Design Considerations | Limitations |
|---|---|
| Content approach streamlines message management | No built-in orchestration capabilities |
| Supports automatic tool calling | No state or memory management |
| Allows for all agent patterns, but each must be manually set up | Primarily designed to work with Gemini models |
Agent Design Patterns
Prompt Chaining
This workflow breaks a task into smaller steps, where the output of one agent becomes the input to another. It’s useful when a single prompt can’t reliably handle the full complexity or when you want clarity in intermediate reasoning. Notebook: Research Agent The agent first researches a topic, then provides an executive summary of its results, then finally recommends future focus directions.Google Colab
- Check if the intermediate step (e.g. key point extraction) is meaningful and accurate
- Ensure the final output reflects or builds on the intermediate output
- Compare chained vs. single-step prompting to see if chaining improves quality or structure
Router
Routing is used to send inputs to the appropriate downstream agent or workflow based on their content. The routing logic is handled by a dedicated call, often using lightweight classification. Notebook: Simple Tool Router This agent shows a simple example of routing use inputs to different tools.Google Colab
- Compare routing decisions to human-labeled ground truth or expectations
- Track precision/recall if framed as a classification task
- Monitor for edge cases and routing errors
Evaluator–Optimizer Loop
This pattern uses two agents in a loop: one generates a solution, the other critiques it. The generator revises until the evaluator accepts the result or a retry limit is reached. It’s useful when quality varies across generations. Notebook: Story Writing Agent An agent generates an initial draft of a story, then a critique agent decides whether the quality is high enough. If not, it asks for a revision.Google Colab
- Measure how many iterations are needed to reach an acceptable result
- Evaluate final output quality against criteria like tone, clarity, and specificity
- Compare the evaluator’s judgment to human reviewers to calibrate reliability
Orchestrator + Worker Pattern
In this approach, a central agent coordinates multiple agents, each with a specialized role. It’s helpful when tasks can be broken down and assigned to domain-specific workers. Notebook: Travel Planning Agent The orchestrator delegates planning a trip for a user, and incorporates a user proxy to improve its quality. The orchestrator delegates to specific functions to plan flights, hotels, and provide general travel recommendations.Google Colab
- Ensure each worker agent completes its role accurately and in isolation
- Check if the orchestrator integrates worker outputs into a consistent final result
- Look for agreement or contradictions between components
Parallel Agent Execution
When you need to process many inputs using the same logic, parallel execution improves speed and resource efficiency. Agents can be launched concurrently without changing their individual behavior. Notebook: Parallel Research Agent Multiple research topics are examined simultaneously. Once all are complete, the topics are then synthesized into a final combined report.Google Colab
- Confirm that outputs are consistent with those from a sequential execution
- Track total latency and per-task runtime to assess parallel speedup
- Watch for race conditions, dropped inputs, or silent failures in concurrency

