# ayoisio/genai-on-google-cloud architecture

> Architecture diagram of the GitHub repository ayoisio/genai-on-google-cloud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ayoisio/genai-on-google-cloud
- Repository: https://github.com/ayoisio/genai-on-google-cloud

## Overview

This repository is a collection of book exercises and reference samples, not one deployed application. Its principal workflow is a learner exploring or running chapter examples: build agents, add tools and capabilities, compose agents, then evaluate behavior. The graph preserves the README’s major Chapter 3–5 capabilities and the healthcare tool file present in the tree. The README describes the samples, but most runtime wiring was not shown; accordingly, edges describe the documented learning relationship rather than inferred calls between examples.

Main entry points: [`chapter-3/01_hello_agent/agent.py`](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/01_hello_agent/agent.py) (Basic Agent), [`chapter-3/02_tool_agent/agent.py`](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/02_tool_agent/agent.py) (Tool Agent), [`chapter-3/03_multi_agent/agent.py`](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/03_multi_agent/agent.py) (Multi-Agent), [`chapter-3/04_stateful_agent/agent.py`](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/04_stateful_agent/agent.py) (Stateful Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent_samples["Agent Samples"]
  node_hello_agent["Basic Agent<br/>[agent.py]"]
  node_tool_agent["Tool Agent<br/>[agent.py]"]
  node_multi_agent["Multi-Agent<br/>[agent.py]"]
  node_stateful_agent["Stateful Agent<br/>[agent.py]"]
  node_memory_agent["Memory Agent<br/>[agent.py]"]
  node_multimodal_agent["Multimodal Agent<br/>[agent.py]"]
  node_streaming_agent["Streaming Agent<br/>[agent.py]"]
  node_guardrails_agent["Guardrails Agent<br/>[agent.py]"]
end

subgraph group_team_samples["Agent Teams"]
  node_sequential_agent["Sequential Workflow<br/>[agent.py]"]
  node_parallel_agent["Parallel Workflow<br/>[agent.py]"]
  node_loop_agent["Loop Workflow<br/>[agent.py]"]
  node_mcp_agent["MCP Agent<br/>[agent.py]"]
  node_mcp_server["MCP Server<br/>[mcp_server.py]"]
  node_a2a_server["A2A Server<br/>[agent.py]"]
  node_a2a_client["A2A Client<br/>[agent.py]"]
  node_hybrid_team["Hybrid Team<br/>[agent.py]"]
  node_hybrid_mcp_server["Hybrid MCP Server<br/>[mcp_server.py]"]
  node_production_agent["Production Patterns<br/>[agent.py]"]
end

subgraph group_evaluation_samples["Evaluation Samples"]
  node_agent_eval["Agent Evaluation<br/>[run_eval.py]"]
  node_custom_eval_agent["Custom Eval Agent<br/>[agent.py]"]
  node_custom_metrics["Custom Metrics<br/>[custom_metrics.py]"]
end

subgraph group_domain_tools["Domain Tools"]
  node_healthcare_tools["Healthcare Tools"]
end

node_learner(("Learner"))

node_learner -->|"explores"| node_hello_agent
node_learner -->|"explores"| node_tool_agent
node_learner -->|"explores"| node_multi_agent
node_learner -->|"explores"| node_stateful_agent
node_learner -->|"explores"| node_memory_agent
node_learner -->|"explores"| node_multimodal_agent
node_learner -->|"explores"| node_streaming_agent
node_learner -->|"explores"| node_guardrails_agent
node_learner -->|"explores"| node_sequential_agent
node_learner -->|"explores"| node_parallel_agent
node_learner -->|"explores"| node_loop_agent
node_learner -->|"explores"| node_mcp_agent
node_learner -->|"explores"| node_a2a_server
node_learner -->|"explores"| node_a2a_client
node_learner -->|"explores"| node_hybrid_team
node_learner -->|"explores"| node_production_agent
node_learner -->|"explores"| node_agent_eval
node_learner -->|"explores"| node_custom_eval_agent
node_learner -->|"explores"| node_custom_metrics

click node_hello_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/01_hello_agent/agent.py"
click node_tool_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/02_tool_agent/agent.py"
click node_multi_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/03_multi_agent/agent.py"
click node_stateful_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/04_stateful_agent/agent.py"
click node_memory_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/05_memory_agent/agent.py"
click node_multimodal_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/06_multimodal_agent/agent.py"
click node_streaming_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/07_streaming_agent/agent.py"
click node_guardrails_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/08_guardrails_agent/agent.py"
click node_sequential_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/01_sequential_agent/agent.py"
click node_parallel_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/02_parallel_agent/agent.py"
click node_loop_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/03_loop_agent/agent.py"
click node_mcp_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/04_mcp_agent/agent.py"
click node_mcp_server "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/04_mcp_agent/mcp_server.py"
click node_a2a_server "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/05_a2a_server/agent.py"
click node_a2a_client "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/06_a2a_client/agent.py"
click node_hybrid_team "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/07_hybrid_team/agent.py"
click node_hybrid_mcp_server "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/07_hybrid_team/mcp_server.py"
click node_production_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/08_production_agent/agent.py"
click node_agent_eval "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-5/01_agent_eval/run_eval.py"
click node_custom_eval_agent "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-5/02_custom_eval/agent.py"
click node_custom_metrics "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-5/02_custom_eval/custom_metrics.py"
click node_healthcare_tools "https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-2/colabs/HealthcareWorkflow/healthcare_tools.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hello_agent,node_tool_agent,node_multi_agent,node_stateful_agent,node_memory_agent,node_multimodal_agent,node_streaming_agent,node_guardrails_agent toneBlue
class node_sequential_agent,node_parallel_agent,node_loop_agent,node_mcp_agent,node_mcp_server,node_a2a_server,node_a2a_client,node_hybrid_team,node_hybrid_mcp_server,node_production_agent toneAmber
class node_agent_eval,node_custom_eval_agent,node_custom_metrics toneMint
class node_healthcare_tools toneRose
class node_learner toneIndigo
```

## Components

### Agent Samples

- [Basic Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/01_hello_agent/agent.py): `chapter-3/01_hello_agent/agent.py`
- [Tool Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/02_tool_agent/agent.py): `chapter-3/02_tool_agent/agent.py`
- [Multi-Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/03_multi_agent/agent.py): `chapter-3/03_multi_agent/agent.py`
- [Stateful Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/04_stateful_agent/agent.py): `chapter-3/04_stateful_agent/agent.py`
- [Memory Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/05_memory_agent/agent.py): `chapter-3/05_memory_agent/agent.py`
- [Multimodal Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/06_multimodal_agent/agent.py): `chapter-3/06_multimodal_agent/agent.py`
- [Streaming Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/07_streaming_agent/agent.py): `chapter-3/07_streaming_agent/agent.py`
- [Guardrails Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-3/08_guardrails_agent/agent.py): `chapter-3/08_guardrails_agent/agent.py`

### Agent Teams

- [Sequential Workflow](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/01_sequential_agent/agent.py): `chapter-4/01_sequential_agent/agent.py`
- [Parallel Workflow](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/02_parallel_agent/agent.py): `chapter-4/02_parallel_agent/agent.py`
- [Loop Workflow](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/03_loop_agent/agent.py): `chapter-4/03_loop_agent/agent.py`
- [MCP Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/04_mcp_agent/agent.py): `chapter-4/04_mcp_agent/agent.py`
- [MCP Server](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/04_mcp_agent/mcp_server.py): `chapter-4/04_mcp_agent/mcp_server.py`
- [A2A Server](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/05_a2a_server/agent.py): `chapter-4/05_a2a_server/agent.py`
- [A2A Client](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/06_a2a_client/agent.py): `chapter-4/06_a2a_client/agent.py`
- [Hybrid Team](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/07_hybrid_team/agent.py): `chapter-4/07_hybrid_team/agent.py`
- [Hybrid MCP Server](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/07_hybrid_team/mcp_server.py): `chapter-4/07_hybrid_team/mcp_server.py`
- [Production Patterns](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-4/08_production_agent/agent.py): `chapter-4/08_production_agent/agent.py`

### Evaluation Samples

- [Agent Evaluation](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-5/01_agent_eval/run_eval.py): `chapter-5/01_agent_eval/run_eval.py`
- [Custom Eval Agent](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-5/02_custom_eval/agent.py): `chapter-5/02_custom_eval/agent.py`
- [Custom Metrics](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-5/02_custom_eval/custom_metrics.py): `chapter-5/02_custom_eval/custom_metrics.py`

### Domain Tools

- [Healthcare Tools](https://github.com/ayoisio/genai-on-google-cloud/blob/main/chapter-2/colabs/HealthcareWorkflow/healthcare_tools.py): `chapter-2/colabs/HealthcareWorkflow/healthcare_tools.py`

### Other components

- **Learner**

## Connections

- Learner → Basic Agent: explores (evidence: `README.md`)
- Learner → Tool Agent: explores (evidence: `README.md`)
- Learner → Multi-Agent: explores (evidence: `README.md`)
- Learner → Stateful Agent: explores (evidence: `README.md`)
- Learner → Memory Agent: explores (evidence: `README.md`)
- Learner → Multimodal Agent: explores (evidence: `README.md`)
- Learner → Streaming Agent: explores (evidence: `README.md`)
- Learner → Guardrails Agent: explores (evidence: `README.md`)
- Learner → Sequential Workflow: explores (evidence: `README.md`)
- Learner → Parallel Workflow: explores (evidence: `README.md`)
- Learner → Loop Workflow: explores (evidence: `README.md`)
- Learner → MCP Agent: explores (evidence: `README.md`)
- Learner → A2A Server: explores (evidence: `README.md`)
- Learner → A2A Client: explores (evidence: `README.md`)
- Learner → Hybrid Team: explores (evidence: `README.md`)
- Learner → Production Patterns: explores (evidence: `README.md`)
- Learner → Agent Evaluation: explores (evidence: `README.md`)
- Learner → Custom Eval Agent: explores (evidence: `README.md`)
- Learner → Custom Metrics: explores (evidence: `README.md`)
