# campusx-official/google-adk-course architecture

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

- Interactive diagram: https://gitdiagram.com/campusx-official/google-adk-course
- Repository: https://github.com/campusx-official/google-adk-course

## Overview

This repository is a collection of Google ADK course examples, not one deployed application. A representative user-to-result path is the Streamlit chatbot: the user submits a message, the app delegates to chat service, which runs the agent and returns a reply; session history is persisted in SQLite. Other independent branches demonstrate tools, structured outputs, MCP, state, memory, callbacks, and streaming. Edges use README documentation or shown calls; unsampled examples are included as documented capabilities, without guessing their internal wiring.

Main entry points: [`runner_chatbot_demo/chat_service.py`](https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/chat_service.py) (Chat service), [`campusx_callbacks_bot/agent.py`](https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/agent.py) (Callback bot), [`memory_demo/run_agent_memory_bank.py`](https://github.com/campusx-official/google-adk-course/blob/main/memory_demo/run_agent_memory_bank.py) (Memory runner), [`runner_chatbot_demo/app.py`](https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/app.py) (Chat UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chat["Chat and sessions"]
  node_chat_ui["Chat UI<br/>[app.py]"]
  node_chat_service["Chat service<br/>[chat_service.py]"]
  node_chat_agent["Chat agent<br/>[agent.py]"]
  node_session_store[("Session store")]
  node_session_demo["Session runner<br/>[run_agent.py]"]
end

subgraph group_tools["Agent tools"]
  node_refund_agent["Refund agent<br/>[agent.py]"]
  node_refund_tools["Refund tools<br/>[tools.py]"]
  node_refund_db[("Refund database")]
  node_search_agents["Search agents<br/>[agent.py]"]
  node_tool_examples["Tool examples<br/>[agent.py]"]
  node_structured_agents["Structured outputs<br/>[agent.py]"]
  node_ticket_agent["Ticket classifier<br/>[agent.py]"]
end

subgraph group_memory["State and memory"]
  node_state_demo["State agent<br/>[agent.py]"]
  node_cafe_agent["Cafe agent<br/>[agent.py]"]
  node_memory_agent["Memory agent<br/>[agent.py]"]
  node_memory_runner["Memory runner"]
  node_memory_service[("Memory service")]
end

subgraph group_callbacks["Callbacks"]
  node_callback_agent["Callback bot<br/>[agent.py]"]
  node_callback_logic["Callback logic<br/>[callbacks.py]"]
  node_callback_tools["Support tools<br/>[tools.py]"]
end

subgraph group_advanced["MCP and streaming"]
  node_mcp_agent["MCP agent<br/>[agent.py]"]
  node_coding_agent["Coding agent<br/>[agent.py]"]
  node_shell_server["Shell server<br/>[shell_server.py]"]
  node_stream_agent["Streaming agent<br/>[agent.py]"]
  node_stream_ui["Streaming UI<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"sends message"| node_chat_ui
node_chat_ui -->|"delegates chat"| node_chat_service
node_chat_service -->|"runs agent"| node_chat_agent
node_chat_service -->|"reads and writes"| node_session_store
node_user -->|"starts conversation"| node_session_demo
node_session_demo -.->|"runs agent"| node_chat_agent
node_user -.->|"asks questions"| node_state_demo
node_user -.->|"places order"| node_cafe_agent
node_user -.->|"asks questions"| node_memory_agent
node_memory_runner -->|"runs agent"| node_memory_agent
node_memory_runner -->|"saves and queries"| node_memory_service
node_user -.->|"requests refund"| node_refund_agent
node_refund_agent -->|"registers tools"| node_refund_tools
node_refund_tools -->|"reads and writes"| node_refund_db
node_user -.->|"asks questions"| node_search_agents
node_user -.->|"requests tool"| node_tool_examples
node_user -.->|"provides enquiry"| node_structured_agents
node_user -.->|"provides ticket"| node_ticket_agent
node_user -.->|"requests support"| node_callback_agent
node_callback_agent -->|"registers callbacks"| node_callback_logic
node_callback_agent -->|"registers tools"| node_callback_tools
node_user -.->|"requests task"| node_mcp_agent
node_user -.->|"requests coding"| node_coding_agent
node_coding_agent -.->|"configures server"| node_shell_server
node_user -->|"sends prompt"| node_stream_ui
node_stream_ui -->|"runs and streams"| node_stream_agent

click node_chat_ui "https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/app.py"
click node_chat_service "https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/chat_service.py"
click node_chat_agent "https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/chatbot_agent/agent.py"
click node_session_demo "https://github.com/campusx-official/google-adk-course/blob/main/session_runner_demo/run_agent.py"
click node_state_demo "https://github.com/campusx-official/google-adk-course/blob/main/state_demo/state_agent/agent.py"
click node_cafe_agent "https://github.com/campusx-official/google-adk-course/blob/main/cafe_agent/agent.py"
click node_memory_agent "https://github.com/campusx-official/google-adk-course/blob/main/memory_demo/memory_agent/agent.py"
click node_memory_runner "https://github.com/campusx-official/google-adk-course/blob/main/memory_demo/run_agent_memory_bank.py"
click node_refund_agent "https://github.com/campusx-official/google-adk-course/blob/main/campusx_refund_agent/agent.py"
click node_refund_tools "https://github.com/campusx-official/google-adk-course/blob/main/campusx_refund_agent/tools.py"
click node_search_agents "https://github.com/campusx-official/google-adk-course/blob/main/combined_tool_agent/agent.py"
click node_tool_examples "https://github.com/campusx-official/google-adk-course/blob/main/world_clock_agent/agent.py"
click node_structured_agents "https://github.com/campusx-official/google-adk-course/blob/main/structured_output_agent/agent.py"
click node_ticket_agent "https://github.com/campusx-official/google-adk-course/blob/main/ticket_classifier_agent/agent.py"
click node_callback_agent "https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/agent.py"
click node_callback_logic "https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/callbacks.py"
click node_callback_tools "https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/tools.py"
click node_mcp_agent "https://github.com/campusx-official/google-adk-course/blob/main/mcp_agent/agent.py"
click node_coding_agent "https://github.com/campusx-official/google-adk-course/blob/main/coding_agent/agent.py"
click node_shell_server "https://github.com/campusx-official/google-adk-course/blob/main/coding_agent/servers/shell_server.py"
click node_stream_agent "https://github.com/campusx-official/google-adk-course/blob/main/streaming_demo/streaming_bot/agent.py"
click node_stream_ui "https://github.com/campusx-official/google-adk-course/blob/main/streaming_demo/app.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_chat_ui,node_chat_service,node_chat_agent,node_session_store,node_session_demo,node_user toneBlue
class node_refund_agent,node_refund_tools,node_refund_db,node_search_agents,node_tool_examples,node_structured_agents,node_ticket_agent toneAmber
class node_state_demo,node_cafe_agent,node_memory_agent,node_memory_runner,node_memory_service toneMint
class node_callback_agent,node_callback_logic,node_callback_tools toneRose
class node_mcp_agent,node_coding_agent,node_shell_server,node_stream_agent,node_stream_ui toneIndigo
```

## Components

### Chat and sessions

- [Chat UI](https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/app.py): `runner_chatbot_demo/app.py`
- [Chat service](https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/chat_service.py): `runner_chatbot_demo/chat_service.py`
- [Chat agent](https://github.com/campusx-official/google-adk-course/blob/main/runner_chatbot_demo/chatbot_agent/agent.py): `runner_chatbot_demo/chatbot_agent/agent.py`
- **Session store**
- [Session runner](https://github.com/campusx-official/google-adk-course/blob/main/session_runner_demo/run_agent.py): `session_runner_demo/run_agent.py`

### Agent tools

- [Refund agent](https://github.com/campusx-official/google-adk-course/blob/main/campusx_refund_agent/agent.py): `campusx_refund_agent/agent.py`
- [Refund tools](https://github.com/campusx-official/google-adk-course/blob/main/campusx_refund_agent/tools.py): `campusx_refund_agent/tools.py`
- **Refund database**
- [Search agents](https://github.com/campusx-official/google-adk-course/blob/main/combined_tool_agent/agent.py): `combined_tool_agent/agent.py`
- [Tool examples](https://github.com/campusx-official/google-adk-course/blob/main/world_clock_agent/agent.py): `world_clock_agent/agent.py`
- [Structured outputs](https://github.com/campusx-official/google-adk-course/blob/main/structured_output_agent/agent.py): `structured_output_agent/agent.py`
- [Ticket classifier](https://github.com/campusx-official/google-adk-course/blob/main/ticket_classifier_agent/agent.py): `ticket_classifier_agent/agent.py`

### State and memory

- [State agent](https://github.com/campusx-official/google-adk-course/blob/main/state_demo/state_agent/agent.py): `state_demo/state_agent/agent.py`
- [Cafe agent](https://github.com/campusx-official/google-adk-course/blob/main/cafe_agent/agent.py): `cafe_agent/agent.py`
- [Memory agent](https://github.com/campusx-official/google-adk-course/blob/main/memory_demo/memory_agent/agent.py): `memory_demo/memory_agent/agent.py`
- [Memory runner](https://github.com/campusx-official/google-adk-course/blob/main/memory_demo/run_agent_memory_bank.py): `memory_demo/run_agent_memory_bank.py`
- **Memory service**

### Callbacks

- [Callback bot](https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/agent.py): `campusx_callbacks_bot/agent.py`
- [Callback logic](https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/callbacks.py): `campusx_callbacks_bot/callbacks.py`
- [Support tools](https://github.com/campusx-official/google-adk-course/blob/main/campusx_callbacks_bot/tools.py): `campusx_callbacks_bot/tools.py`

### MCP and streaming

- [MCP agent](https://github.com/campusx-official/google-adk-course/blob/main/mcp_agent/agent.py): `mcp_agent/agent.py`
- [Coding agent](https://github.com/campusx-official/google-adk-course/blob/main/coding_agent/agent.py): `coding_agent/agent.py`
- [Shell server](https://github.com/campusx-official/google-adk-course/blob/main/coding_agent/servers/shell_server.py): `coding_agent/servers/shell_server.py`
- [Streaming agent](https://github.com/campusx-official/google-adk-course/blob/main/streaming_demo/streaming_bot/agent.py): `streaming_demo/streaming_bot/agent.py`
- [Streaming UI](https://github.com/campusx-official/google-adk-course/blob/main/streaming_demo/app.py): `streaming_demo/app.py`

### Other components

- **User**

## Connections

- User → Chat UI: sends message (evidence: `runner_chatbot_demo/app.py`)
- Chat UI → Chat service: delegates chat (evidence: `runner_chatbot_demo/app.py`)
- Chat service → Chat agent: runs agent (evidence: `runner_chatbot_demo/chat_service.py`)
- Chat service → Session store: reads and writes (evidence: `runner_chatbot_demo/chat_service.py`)
- User → Session runner: starts conversation (evidence: `session_runner_demo/run_agent.py`)
- Session runner → Chat agent: runs agent
- User → State agent: asks questions
- User → Cafe agent: places order
- User → Memory agent: asks questions
- Memory runner → Memory agent: runs agent (evidence: `memory_demo/run_agent_memory_bank.py`)
- Memory runner → Memory service: saves and queries (evidence: `memory_demo/run_agent_memory_bank.py`)
- User → Refund agent: requests refund
- Refund agent → Refund tools: registers tools (evidence: `campusx_refund_agent/agent.py`)
- Refund tools → Refund database: reads and writes
- User → Search agents: asks questions
- User → Tool examples: requests tool
- User → Structured outputs: provides enquiry
- User → Ticket classifier: provides ticket
- User → Callback bot: requests support
- Callback bot → Callback logic: registers callbacks (evidence: `campusx_callbacks_bot/agent.py`)
- Callback bot → Support tools: registers tools (evidence: `campusx_callbacks_bot/agent.py`)
- User → MCP agent: requests task
- User → Coding agent: requests coding
- Coding agent → Shell server: configures server
- User → Streaming UI: sends prompt (evidence: `streaming_demo/app.py`)
- Streaming UI → Streaming agent: runs and streams (evidence: `streaming_demo/app.py`)
