# jswortz/geap-tour architecture

> Architecture diagram of the GitHub repository jswortz/geap-tour, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jswortz/geap-tour
- Repository: https://github.com/jswortz/geap-tour

## Overview

This repository is a GEAP workshop platform demonstrating enterprise agents from tool-backed requests through deployment, governance, evaluation, and optimization. The principal workflow is a user request handled by an ADK coordinator or router, which uses MCP tools and model services to produce a result. Distinct subsystems cover agents and tools, runtime deployment and governance, router experimentation, and evaluation/optimization. Relationships are based on README statements and SOURCE INDEX references; unsampled subsystems are represented at their exact enclosing directories, with uncertain wiring omitted.

Main entry points: [`src/agents/coordinator_agent.py`](https://github.com/jswortz/geap-tour/blob/main/src/agents/coordinator_agent.py) (Coordinator agent), [`src/registry.py`](https://github.com/jswortz/geap-tour/blob/main/src/registry.py) (MCP registry access), [`src/router/agents.py`](https://github.com/jswortz/geap-tour/blob/main/src/router/agents.py) (Router agent), [`src/deploy/deploy_agents.py`](https://github.com/jswortz/geap-tour/blob/main/src/deploy/deploy_agents.py) (Agent deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agents["Agents and tools"]
  node_coordinator["Coordinator agent"]
  node_travel["Travel agent<br/>[travel_agent.py]"]
  node_expense["Expense agent<br/>[expense_agent.py]"]
  node_shared["Agent utilities<br/>[_shared.py]"]
  node_search["Search MCP server<br/>[server.py]"]
  node_booking["Booking MCP server<br/>[server.py]"]
  node_bookingdb[("Booking data<br/>[mock_db.py]")]
  node_expenseserver["Expense MCP server<br/>[server.py]"]
  node_expensedb[("Expense data<br/>[mock_db.py]")]
end

subgraph group_platform["Runtime and governance"]
  node_registry["MCP registry access<br/>[registry.py]"]
  node_deployment["Agent deployment<br/>[deploy_agents.py]"]
  node_armor["Model Armor<br/>[config.py]"]
end

subgraph group_routing["Multi-model routing"]
  node_routeragent["Router agent<br/>[agents.py]"]
  node_complexity["Complexity classifier<br/>[complexity.py]"]
  node_inference["Model inference"]
  node_cost["Router cost tracking<br/>[cost_tracker.py]"]
end

subgraph group_quality["Evaluation and optimization"]
  node_router_eval["Router evaluation<br/>[router_eval.py]"]
  node_eval["Agent evaluation"]
  node_optimization["Agent optimization<br/>[run_optimize.py]"]
end

subgraph group_interface["Router interface"]
  node_router_ui["Router UI<br/>[ui_builder.py]"]
  node_ui_api["UI API<br/>[fast_api_app.py]"]
  node_executor["Agent executor<br/>[agent_executor.py]"]
  node_ui_cost["UI cost model<br/>[cost_model.py]"]
end

node_user(("Business user"))
node_gcp{{"Google Cloud services"}}
node_models{{"Gemini and Claude"}}

node_user -->|"requests task"| node_coordinator
node_user -->|"requests task"| node_routeragent
node_coordinator -->|"gets MCP tools"| node_registry
node_travel -->|"gets MCP tools"| node_registry
node_expense -->|"gets MCP tools"| node_registry
node_coordinator -->|"uses agent"| node_travel
node_coordinator -->|"uses agent"| node_expense
node_coordinator -->|"uses utilities"| node_shared
node_registry -.->|"connects MCP"| node_search
node_registry -.->|"connects MCP"| node_booking
node_registry -.->|"connects MCP"| node_expenseserver
node_booking -->|"reads and writes"| node_bookingdb
node_expenseserver -->|"reads and writes"| node_expensedb
node_deployment -->|"deploys agent"| node_coordinator
node_deployment -->|"deploys agent"| node_routeragent
node_deployment -->|"creates runtime"| node_gcp
node_coordinator -->|"uses guardrails"| node_armor
node_routeragent -->|"classifies prompt"| node_complexity
node_complexity -->|"scores complexity"| node_models
node_routeragent -.->|"routes inference"| node_models
node_router_eval -->|"runs inference"| node_inference
node_router_eval -->|"uses cost estimates"| node_cost
node_inference -->|"estimates cost"| node_cost
node_inference -->|"calls models"| node_models
node_router_eval -.->|"evaluates models"| node_gcp
node_eval -.->|"evaluates agents"| node_gcp
node_optimization -.->|"optimizes from evaluation"| node_eval
node_ui_api -->|"invokes executor"| node_executor
node_router_ui -->|"uses cost model"| node_ui_cost
node_ui_api -.->|"serves interface"| node_router_ui

click node_coordinator "https://github.com/jswortz/geap-tour/blob/main/src/agents/coordinator_agent.py"
click node_travel "https://github.com/jswortz/geap-tour/blob/main/src/agents/travel_agent.py"
click node_expense "https://github.com/jswortz/geap-tour/blob/main/src/agents/expense_agent.py"
click node_shared "https://github.com/jswortz/geap-tour/blob/main/src/agents/_shared.py"
click node_registry "https://github.com/jswortz/geap-tour/blob/main/src/registry.py"
click node_search "https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/search/server.py"
click node_booking "https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/booking/server.py"
click node_bookingdb "https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/booking/mock_db.py"
click node_expenseserver "https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/expense/server.py"
click node_expensedb "https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/expense/mock_db.py"
click node_deployment "https://github.com/jswortz/geap-tour/blob/main/src/deploy/deploy_agents.py"
click node_armor "https://github.com/jswortz/geap-tour/blob/main/src/armor/config.py"
click node_routeragent "https://github.com/jswortz/geap-tour/blob/main/src/router/agents.py"
click node_complexity "https://github.com/jswortz/geap-tour/blob/main/src/router/complexity.py"
click node_inference "https://github.com/jswortz/geap-tour/blob/main/src/eval/router_inference.py"
click node_cost "https://github.com/jswortz/geap-tour/blob/main/src/router/cost_tracker.py"
click node_router_eval "https://github.com/jswortz/geap-tour/blob/main/src/eval/router_eval.py"
click node_eval "https://github.com/jswortz/geap-tour/tree/main/src/eval"
click node_optimization "https://github.com/jswortz/geap-tour/blob/main/src/optimize/run_optimize.py"
click node_router_ui "https://github.com/jswortz/geap-tour/blob/main/app/ui_builder.py"
click node_ui_api "https://github.com/jswortz/geap-tour/blob/main/app/fast_api_app.py"
click node_executor "https://github.com/jswortz/geap-tour/blob/main/app/agent_executor.py"
click node_ui_cost "https://github.com/jswortz/geap-tour/blob/main/app/cost_model.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_coordinator,node_travel,node_expense,node_shared,node_search,node_booking,node_bookingdb,node_expenseserver,node_expensedb,node_user toneBlue
class node_registry,node_deployment,node_armor toneAmber
class node_routeragent,node_complexity,node_inference,node_cost toneMint
class node_router_eval,node_eval,node_optimization toneRose
class node_router_ui,node_ui_api,node_executor,node_ui_cost,node_gcp,node_models toneIndigo
```

## Components

### Agents and tools

- [Coordinator agent](https://github.com/jswortz/geap-tour/blob/main/src/agents/coordinator_agent.py): `src/agents/coordinator_agent.py`
- [Travel agent](https://github.com/jswortz/geap-tour/blob/main/src/agents/travel_agent.py): `src/agents/travel_agent.py`
- [Expense agent](https://github.com/jswortz/geap-tour/blob/main/src/agents/expense_agent.py): `src/agents/expense_agent.py`
- [Agent utilities](https://github.com/jswortz/geap-tour/blob/main/src/agents/_shared.py): `src/agents/_shared.py`
- [Search MCP server](https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/search/server.py): `src/mcp_servers/search/server.py`
- [Booking MCP server](https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/booking/server.py): `src/mcp_servers/booking/server.py`
- [Booking data](https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/booking/mock_db.py): `src/mcp_servers/booking/mock_db.py`
- [Expense MCP server](https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/expense/server.py): `src/mcp_servers/expense/server.py`
- [Expense data](https://github.com/jswortz/geap-tour/blob/main/src/mcp_servers/expense/mock_db.py): `src/mcp_servers/expense/mock_db.py`

### Runtime and governance

- [MCP registry access](https://github.com/jswortz/geap-tour/blob/main/src/registry.py): `src/registry.py`
- [Agent deployment](https://github.com/jswortz/geap-tour/blob/main/src/deploy/deploy_agents.py): `src/deploy/deploy_agents.py`
- [Model Armor](https://github.com/jswortz/geap-tour/blob/main/src/armor/config.py): `src/armor/config.py`

### Multi-model routing

- [Router agent](https://github.com/jswortz/geap-tour/blob/main/src/router/agents.py): `src/router/agents.py`
- [Complexity classifier](https://github.com/jswortz/geap-tour/blob/main/src/router/complexity.py): `src/router/complexity.py`
- [Model inference](https://github.com/jswortz/geap-tour/blob/main/src/eval/router_inference.py): `src/eval/router_inference.py`
- [Router cost tracking](https://github.com/jswortz/geap-tour/blob/main/src/router/cost_tracker.py): `src/router/cost_tracker.py`

### Evaluation and optimization

- [Router evaluation](https://github.com/jswortz/geap-tour/blob/main/src/eval/router_eval.py): `src/eval/router_eval.py`
- [Agent evaluation](https://github.com/jswortz/geap-tour/tree/main/src/eval): `src/eval`
- [Agent optimization](https://github.com/jswortz/geap-tour/blob/main/src/optimize/run_optimize.py): `src/optimize/run_optimize.py`

### Router interface

- [Router UI](https://github.com/jswortz/geap-tour/blob/main/app/ui_builder.py): `app/ui_builder.py`
- [UI API](https://github.com/jswortz/geap-tour/blob/main/app/fast_api_app.py): `app/fast_api_app.py`
- [Agent executor](https://github.com/jswortz/geap-tour/blob/main/app/agent_executor.py): `app/agent_executor.py`
- [UI cost model](https://github.com/jswortz/geap-tour/blob/main/app/cost_model.py): `app/cost_model.py`

### Other components

- **Business user**
- **Google Cloud services**
- **Gemini and Claude**

## Connections

- Business user → Coordinator agent: requests task
- Business user → Router agent: requests task
- Coordinator agent → MCP registry access: gets MCP tools (evidence: `src/agents/coordinator_agent.py`)
- Travel agent → MCP registry access: gets MCP tools (evidence: `src/agents/travel_agent.py`)
- Expense agent → MCP registry access: gets MCP tools (evidence: `src/agents/expense_agent.py`)
- Coordinator agent → Travel agent: uses agent (evidence: `src/agents/coordinator_agent.py`)
- Coordinator agent → Expense agent: uses agent (evidence: `src/agents/coordinator_agent.py`)
- Coordinator agent → Agent utilities: uses utilities (evidence: `src/agents/coordinator_agent.py`)
- MCP registry access → Search MCP server: connects MCP
- MCP registry access → Booking MCP server: connects MCP
- MCP registry access → Expense MCP server: connects MCP
- Booking MCP server → Booking data: reads and writes (evidence: `src/mcp_servers/booking/server.py`)
- Expense MCP server → Expense data: reads and writes (evidence: `src/mcp_servers/expense/server.py`)
- Agent deployment → Coordinator agent: deploys agent (evidence: `src/deploy/deploy_agents.py`)
- Agent deployment → Router agent: deploys agent (evidence: `src/deploy/deploy_agents.py`)
- Agent deployment → Google Cloud services: creates runtime (evidence: `src/deploy/deploy_agents.py`)
- Coordinator agent → Model Armor: uses guardrails (evidence: `src/agents/coordinator_agent.py`)
- Router agent → Complexity classifier: classifies prompt (evidence: `src/router/agents.py`)
- Complexity classifier → Gemini and Claude: scores complexity (evidence: `src/router/complexity.py`)
- Router agent → Gemini and Claude: routes inference
- Router evaluation → Model inference: runs inference (evidence: `src/eval/router_eval.py`)
- Router evaluation → Router cost tracking: uses cost estimates (evidence: `src/eval/router_eval.py`)
- Model inference → Router cost tracking: estimates cost (evidence: `src/eval/router_inference.py`)
- Model inference → Gemini and Claude: calls models (evidence: `src/eval/router_inference.py`)
- Router evaluation → Google Cloud services: evaluates models
- Agent evaluation → Google Cloud services: evaluates agents
- Agent optimization → Agent evaluation: optimizes from evaluation
- UI API → Agent executor: invokes executor (evidence: `app/fast_api_app.py`)
- Router UI → UI cost model: uses cost model (evidence: `app/ui_builder.py`)
- UI API → Router UI: serves interface
