# cuppibla/adk_eval_starter architecture

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

- Interactive diagram: https://gitdiagram.com/cuppibla/adk_eval_starter
- Repository: https://github.com/cuppibla/adk_eval_starter

## Overview

1. This repository is a small Python-based agent project centered on a single customer service agent and its evaluation workflow. The architecture is much closer to a library plus test harness than a full application stack.

2. The main functional boundary is the `customer_service_agent/` package. That package contains the agent implementation in `agent.py`, which is the core runtime object that the rest of the repo exercises.

3. Evaluation assets live alongside the agent code. `eval.test.json` appears to define the evaluation scenarios, while `test_config.json` provides the test-time configuration needed to run those scenarios deterministically.

4. The primary validation path is pytest-based. `test_agent_eval.py` is the programmatic evaluation entrypoint recommended in the README, and it is meant to execute the agent against the test cases and compare behavior against expected outcomes.

5. There is also an ADK CLI evaluation path. The README shows `adk eval ...` as an alternate runner, which means the agent package is designed to be compatible with an external evaluation framework rather than only local unit tests.

6. A third evaluation mode uses a golden dataset exported from the ADK web UI. That suggests the repo supports both hand-authored test cases and externally generated evaluation sets, with the same agent/config boundary reused across them.

7. At the top level, `main.py` is likely the general process entrypoint, while `billing-enablement.py` looks like a separate script or example workflow. These are outside the evaluation package boundary and probably represent runnable agent/business logic entrypoints.

8. Environment setup is intentionally script-driven. `init.sh` and `set_env.sh` indicate the project expects shell-based initialization of runtime variables or credentials before running the agent or evaluations.

9. Tooling is Python-first and uses `uv` for execution, with `.python-version` and `pyproject.toml` defining the interpreter and dependency management. That makes the repo reproducible and portable across local and CI runs.

10. The key data flow is: evaluation input (`eval.test.json` or a golden dataset) plus config (`test_config.json`) enters the test harness, which invokes `customer_service_agent.agent`, and the observed output is checked by `test_agent_eval.py` or the ADK CLI evaluator.

11. From an architecture-diagram perspective, the most important boxes are: the agent implementation, the evaluation/test layer, the configuration layer, and the runtime/bootstrap scripts. The main boundary to emphasize is between reusable agent logic and the multiple ways it is executed and validated.

Main entry points: [`customer_service_agent/test_agent_eval.py`](https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/test_agent_eval.py) (Eval test), [`main.py`](https://github.com/cuppibla/adk_eval_starter/blob/main/main.py) (Main), [`pyproject.toml`](https://github.com/cuppibla/adk_eval_starter/blob/main/pyproject.toml) (Pyproject), [`customer_service_agent/agent.py`](https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/agent.py) (Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_package["Agent package"]
  node_customer_service_agent_agent_py["Agent<br/>[agent.py]"]
  node_customer_service_agent_test_agent_eval_py["Eval test<br/>pytest harness<br/>[test_agent_eval.py]"]
  node_customer_service_agent_eval_test_json["Eval cases<br/>scenario data<br/>[eval.test.json]"]
  node_customer_service_agent_test_config_json["Test config<br/>eval config<br/>[test_config.json]"]
end

subgraph group_runtime["Runtime scripts"]
  node_main_py["Main<br/>entrypoint<br/>[main.py]"]
  node_billing_enablement_py["Billing flow<br/>workflow script"]
  node_init_sh["Init<br/>bootstrap shell<br/>[init.sh]"]
  node_set_env_sh["Set env<br/>env shell<br/>[set_env.sh]"]
end

subgraph group_tooling["Project tooling"]
  node_pyproject_toml["Pyproject<br/>dependency spec<br/>[pyproject.toml]"]
  node_python_version["Python pin<br/>interpreter pin<br/>[.python-version]"]
end

node_readme_md["README<br/>usage guide<br/>[README.md]"]

node_customer_service_agent_eval_test_json -->|"supplies cases"| node_customer_service_agent_test_agent_eval_py
node_customer_service_agent_test_config_json -->|"supplies config"| node_customer_service_agent_test_agent_eval_py
node_customer_service_agent_test_agent_eval_py -->|"exercises"| node_customer_service_agent_agent_py
node_main_py -->|"runs"| node_customer_service_agent_agent_py
node_billing_enablement_py -->|"uses"| node_customer_service_agent_agent_py
node_init_sh -->|"prepares"| node_main_py
node_set_env_sh -->|"configures"| node_main_py
node_init_sh -.->|"prepares"| node_customer_service_agent_test_agent_eval_py
node_set_env_sh -.->|"configures"| node_customer_service_agent_test_agent_eval_py
node_pyproject_toml -->|"builds"| node_main_py
node_pyproject_toml -->|"builds"| node_customer_service_agent_test_agent_eval_py
node_python_version -->|"pins"| node_pyproject_toml
node_readme_md -->|"documents"| node_customer_service_agent_test_agent_eval_py
node_readme_md -->|"documents"| node_main_py

click node_customer_service_agent_agent_py "https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/agent.py"
click node_customer_service_agent_test_agent_eval_py "https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/test_agent_eval.py"
click node_customer_service_agent_eval_test_json "https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/eval.test.json"
click node_customer_service_agent_test_config_json "https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/test_config.json"
click node_main_py "https://github.com/cuppibla/adk_eval_starter/blob/main/main.py"
click node_billing_enablement_py "https://github.com/cuppibla/adk_eval_starter/blob/main/billing-enablement.py"
click node_init_sh "https://github.com/cuppibla/adk_eval_starter/blob/main/init.sh"
click node_set_env_sh "https://github.com/cuppibla/adk_eval_starter/blob/main/set_env.sh"
click node_pyproject_toml "https://github.com/cuppibla/adk_eval_starter/blob/main/pyproject.toml"
click node_python_version "https://github.com/cuppibla/adk_eval_starter/blob/main/.python-version"
click node_readme_md "https://github.com/cuppibla/adk_eval_starter/blob/main/README.md"

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_customer_service_agent_agent_py,node_customer_service_agent_test_agent_eval_py,node_customer_service_agent_eval_test_json,node_customer_service_agent_test_config_json toneBlue
class node_main_py,node_billing_enablement_py,node_init_sh,node_set_env_sh toneAmber
class node_pyproject_toml,node_python_version toneMint
class node_readme_md toneNeutral
```

## Components

### Agent package

Reusable customer service agent code and its evaluation assets.

- [Agent](https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/agent.py): runtime agent · Core customer service agent implementation. · `customer_service_agent/agent.py`
- [Eval test](https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/test_agent_eval.py): pytest harness · Programmatic evaluation entrypoint that runs the agent against scenarios. · `customer_service_agent/test_agent_eval.py`
- [Eval cases](https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/eval.test.json): scenario data · Hand-authored evaluation scenarios for the agent. · `customer_service_agent/eval.test.json`
- [Test config](https://github.com/cuppibla/adk_eval_starter/blob/main/customer_service_agent/test_config.json): eval config · Deterministic test-time configuration for evaluation runs. · `customer_service_agent/test_config.json`

### Runtime scripts

Top-level runnable entrypoints and shell bootstrap scripts.

- [Main](https://github.com/cuppibla/adk_eval_starter/blob/main/main.py): entrypoint · Top-level process entrypoint for running the project. · `main.py`
- [Billing flow](https://github.com/cuppibla/adk_eval_starter/blob/main/billing-enablement.py): workflow script · Standalone business workflow or example script. · `billing-enablement.py`
- [Init](https://github.com/cuppibla/adk_eval_starter/blob/main/init.sh): bootstrap shell · Environment initialization script. · `init.sh`
- [Set env](https://github.com/cuppibla/adk_eval_starter/blob/main/set_env.sh): env shell · Shell helper for runtime variables and credentials. · `set_env.sh`

### Project tooling

Python version and dependency configuration for local and CI execution.

- [Pyproject](https://github.com/cuppibla/adk_eval_starter/blob/main/pyproject.toml): dependency spec · Python project metadata, dependencies, and tool configuration. · `pyproject.toml`
- [Python pin](https://github.com/cuppibla/adk_eval_starter/blob/main/.python-version): interpreter pin · Pinned Python version for reproducible execution. · `.python-version`

### Other components

- [README](https://github.com/cuppibla/adk_eval_starter/blob/main/README.md): usage guide · Primary usage and evaluation instructions. · `README.md`

## Connections

- Eval cases → Eval test: supplies cases · Evaluation scenarios are consumed by the pytest evaluation harness.
- Test config → Eval test: supplies config · Test configuration is loaded by the evaluation harness.
- Eval test → Agent: exercises · The evaluation test invokes the core agent implementation.
- Main → Agent: runs · Main entrypoint executes the agent runtime.
- Billing flow → Agent: uses · Workflow script drives the shared agent logic.
- Init → Main: prepares · Bootstrap script prepares the runtime before execution.
- Set env → Main: configures · Environment setup feeds runtime variables into the entrypoint.
- Init → Eval test: prepares · Bootstrap script also supports evaluation runs.
- Set env → Eval test: configures · Environment variables are used during evaluation execution.
- Pyproject → Main: builds · Project metadata and dependencies support the runnable entrypoint.
- Pyproject → Eval test: builds · Project metadata and dependencies support pytest evaluation.
- Python pin → Pyproject: pins · Interpreter version constrains the Python environment.
- README → Eval test: documents · README describes the recommended pytest evaluation path.
- README → Main: documents · README describes project execution and setup.
