# vishalmysore/a2a-examples architecture

> Architecture diagram of the GitHub repository vishalmysore/a2a-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vishalmysore/a2a-examples
- Repository: https://github.com/vishalmysore/a2a-examples

## Overview

This repository is a collection of Java examples for agentic applications, rather than the A2A framework implementation itself. Its documented prompt workflow sends a natural-language task to the A2A Java client, which selects an annotated action and returns a task result; the referenced A2AJavaAgent entry point is not present in the supplied tree, so that runtime is shown as external. Other examples cover image understanding and structured extraction, scripted actions, and AI-assisted browser testing. The README documents additional framework capabilities not represented by paths in this tree; links to those are omitted.

Main entry points: [`src/main/java/io/github/vishalmysore/actions`](https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/actions) (Annotated Actions), [`src/main/java/io/github/vishalmysore/agriculture/AgricultureDemo.java`](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/agriculture/AgricultureDemo.java) (Plant Analysis), [`src/main/java/io/github/vishalmysore/webtesting/WebTestingWithAI.java`](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/webtesting/WebTestingWithAI.java) (AI Web Testing), [`src/main/java/io/github/vishalmysore/actions/WeatherAction.java`](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/WeatherAction.java) (Weather Lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prompt["Prompt Actions"]
  node_prompt_actions["Annotated Actions"]
  node_weather["Weather Lookup<br/>[WeatherAction.java]"]
  node_search["Web Search"]
  node_restaurant["Restaurant Actions"]
  node_player["Player Actions"]
end

subgraph group_image["Image Processing"]
  node_image_processor["Gemini Image Processor"]
  node_image_actions["Image Actions"]
  node_agriculture["Plant Analysis"]
end

subgraph group_script["Script Automation"]
  node_script_processors["Script Processors"]
  node_script_actions["Script Actions"]
end

subgraph group_web["Web Testing"]
  node_web_ai["AI Web Testing"]
  node_selenium["Selenium Actions"]
end

subgraph group_models["Domain Models"]
  node_plant_model["Plant Model<br/>[Plant.java]"]
  node_pojo_models["Structured Models"]
end

node_user(("User"))
node_a2a["A2A Runtime"]
node_browser["Browser"]
node_weather_service["Open-Meteo"]
node_search_service["Serper Search"]

node_user -->|"sends task"| node_a2a
node_a2a -->|"selects action"| node_prompt_actions
node_prompt_actions -->|"dispatches"| node_weather
node_prompt_actions -->|"dispatches"| node_search
node_prompt_actions -->|"dispatches"| node_restaurant
node_prompt_actions -->|"dispatches"| node_player
node_weather -->|"queries"| node_weather_service
node_search -.->|"queries"| node_search_service
node_image_processor -->|"extracts into"| node_pojo_models
node_agriculture -->|"analyzes images"| node_image_processor
node_agriculture -->|"extracts into"| node_plant_model
node_image_actions -->|"exposes actions"| node_a2a
node_script_processors -->|"executes"| node_script_actions
node_web_ai -->|"delegates actions"| node_selenium
node_web_ai -->|"controls"| node_browser

click node_prompt_actions "https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/actions"
click node_weather "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/WeatherAction.java"
click node_search "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/GoogleSearchAction.java"
click node_restaurant "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/AddRestaurantAction.java"
click node_player "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/NotifyPlayerAction.java"
click node_image_processor "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/image/GeminiImageExample.java"
click node_image_actions "https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/image/action"
click node_agriculture "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/agriculture/AgricultureDemo.java"
click node_plant_model "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/agriculture/Plant.java"
click node_pojo_models "https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/pojo"
click node_script_processors "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/script/ProcessScriptComplex.java"
click node_script_actions "https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/script/actions"
click node_web_ai "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/webtesting/WebTestingWithAI.java"
click node_selenium "https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/webtesting/WebDriverAction.java"

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_prompt_actions,node_weather,node_search,node_restaurant,node_player,node_user,node_browser toneBlue
class node_image_processor,node_image_actions,node_agriculture toneAmber
class node_script_processors,node_script_actions toneMint
class node_web_ai,node_selenium toneRose
class node_plant_model,node_pojo_models,node_a2a,node_weather_service,node_search_service toneIndigo
```

## Components

### Prompt Actions

- [Annotated Actions](https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/actions): `src/main/java/io/github/vishalmysore/actions`
- [Weather Lookup](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/WeatherAction.java): `src/main/java/io/github/vishalmysore/actions/WeatherAction.java`
- [Web Search](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/GoogleSearchAction.java): `src/main/java/io/github/vishalmysore/actions/GoogleSearchAction.java`
- [Restaurant Actions](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/AddRestaurantAction.java): `src/main/java/io/github/vishalmysore/actions/AddRestaurantAction.java`
- [Player Actions](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/actions/NotifyPlayerAction.java): `src/main/java/io/github/vishalmysore/actions/NotifyPlayerAction.java`

### Image Processing

- [Gemini Image Processor](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/image/GeminiImageExample.java): `src/main/java/io/github/vishalmysore/image/GeminiImageExample.java`
- [Image Actions](https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/image/action): `src/main/java/io/github/vishalmysore/image/action`
- [Plant Analysis](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/agriculture/AgricultureDemo.java): `src/main/java/io/github/vishalmysore/agriculture/AgricultureDemo.java`

### Script Automation

- [Script Processors](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/script/ProcessScriptComplex.java): `src/main/java/io/github/vishalmysore/script/ProcessScriptComplex.java`
- [Script Actions](https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/script/actions): `src/main/java/io/github/vishalmysore/script/actions`

### Web Testing

- [AI Web Testing](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/webtesting/WebTestingWithAI.java): `src/main/java/io/github/vishalmysore/webtesting/WebTestingWithAI.java`
- [Selenium Actions](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/webtesting/WebDriverAction.java): `src/main/java/io/github/vishalmysore/webtesting/WebDriverAction.java`

### Domain Models

- [Plant Model](https://github.com/vishalmysore/a2a-examples/blob/main/src/main/java/io/github/vishalmysore/agriculture/Plant.java): `src/main/java/io/github/vishalmysore/agriculture/Plant.java`
- [Structured Models](https://github.com/vishalmysore/a2a-examples/tree/main/src/main/java/io/github/vishalmysore/pojo): `src/main/java/io/github/vishalmysore/pojo`

### Other components

- **User**
- **A2A Runtime**
- **Browser**
- **Open-Meteo**
- **Serper Search**

## Connections

- User → A2A Runtime: sends task
- A2A Runtime → Annotated Actions: selects action
- Annotated Actions → Weather Lookup: dispatches
- Annotated Actions → Web Search: dispatches
- Annotated Actions → Restaurant Actions: dispatches
- Annotated Actions → Player Actions: dispatches
- Weather Lookup → Open-Meteo: queries
- Web Search → Serper Search: queries
- Gemini Image Processor → Structured Models: extracts into
- Plant Analysis → Gemini Image Processor: analyzes images
- Plant Analysis → Plant Model: extracts into
- Image Actions → A2A Runtime: exposes actions
- Script Processors → Script Actions: executes
- AI Web Testing → Selenium Actions: delegates actions
- AI Web Testing → Browser: controls
