# joshluxton/agents-cli architecture

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

- Interactive diagram: https://gitdiagram.com/joshluxton/agents-cli
- Repository: https://github.com/joshluxton/agents-cli

## Overview

agents-cli is a developer-facing CLI and skills suite for building, running, evaluating, deploying, and registering ADK agents on Google Cloud. The principal workflow starts with a developer or coding assistant invoking the CLI, scaffolds or enhances an agent project, runs it locally, evaluates it, and optionally deploys and publishes it. The map includes project configuration, authentication, subprocess/tool handling, and command dispatch as shared internal layers. Several command implementations are documented but unsampled; their feature coverage follows the README, while uncertain internal call edges are omitted.

Main entry points: [`src/google/agents/cli/main.py`](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/main.py) (Command dispatcher), [`src/google/agents/cli/deploy/cmd_deploy.py`](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/deploy/cmd_deploy.py) (Agent deployment), [`src/google/agents/cli/run/cmd_run.py`](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/run/cmd_run.py) (Local agent run), [`src/google/agents/cli/scaffold/commands/create.py`](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/scaffold/commands/create.py) (Project scaffolding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and skills"]
  node_cli["Command dispatcher<br/>[main.py]"]
  node_setup["Setup and skills<br/>[cmd_setup.py]"]
  node_skill_bundle["Skill bundle<br/>[_bundle.py]"]
  node_extension["CLI extensions<br/>[_loader.py]"]
end

subgraph group_build["Agent development"]
  node_scaffold["Project scaffolding<br/>[create.py]"]
  node_templates["Template generation<br/>[template.py]"]
  node_local_run["Local agent run<br/>[cmd_run.py]"]
  node_local_server["Local server<br/>[_local_server.py]"]
  node_adk_client["ADK HTTP client<br/>[_adk_client.py]"]
end

subgraph group_evaluate["Evaluation"]
  node_evaluation["Evaluation commands<br/>[cmd_run.py]"]
  node_eval_generate["Generate eval cases<br/>[cmd_generate.py]"]
  node_eval_analysis["Analyze and compare<br/>[cmd_analyze.py]"]
end

subgraph group_cloud["Cloud lifecycle"]
  node_deploy["Agent deployment<br/>[cmd_deploy.py]"]
  node_agent_runtime["Agent Runtime<br/>[agent_runtime.py]"]
  node_publish["Enterprise publishing<br/>[cmd_publish.py]"]
  node_infrastructure["Infrastructure and CI/CD<br/>[cmd_infra.py]"]
  node_data_ingestion["Data ingestion"]
end

subgraph group_shared["Shared services"]
  node_project_config["Project configuration<br/>[_project.py]"]
  node_authentication["Authentication<br/>[auth.py]"]
  node_project_detection["Cloud project lookup<br/>[_gcp_project.py]"]
  node_remote_access["Remote agent access<br/>[_remote.py]"]
  node_process_runner["Process runner<br/>[_runner.py]"]
  node_tool_resolution["Tool resolution<br/>[_tools.py]"]
  node_output["CLI output<br/>[_output.py]"]
end

node_developer(("Developer"))
node_coding_assistant(("Coding assistant"))
node_google_cloud(("Google Cloud"))
node_adk_agent(("ADK agent"))
node_gemini_enterprise(("Gemini Enterprise"))

node_developer -->|"invokes"| node_cli
node_coding_assistant -->|"invokes"| node_cli
node_cli -.->|"dispatches"| node_setup
node_cli -.->|"dispatches"| node_scaffold
node_cli -.->|"dispatches"| node_local_run
node_cli -.->|"dispatches"| node_evaluation
node_cli -.->|"dispatches"| node_deploy
node_cli -.->|"dispatches"| node_publish
node_cli -.->|"dispatches"| node_infrastructure
node_cli -->|"loads extensions"| node_extension
node_setup -.->|"installs skills"| node_skill_bundle
node_scaffold -->|"generates project"| node_templates
node_scaffold -->|"reads project"| node_project_config
node_local_run -->|"reads project"| node_project_config
node_local_run -->|"starts server"| node_local_server
node_local_run -->|"uses client"| node_adk_client
node_adk_client -->|"streams requests"| node_adk_agent
node_eval_generate -->|"uses server"| node_local_server
node_evaluation -.->|"generates traces"| node_eval_generate
node_evaluation -.->|"analyzes results"| node_eval_analysis
node_deploy -->|"deploys to"| node_agent_runtime
node_deploy -->|"reads project"| node_project_config
node_deploy -->|"uses credentials"| node_authentication
node_deploy -->|"gets project"| node_project_detection
node_deploy -->|"deploys agent"| node_google_cloud
node_infrastructure -->|"provisions resources"| node_google_cloud
node_publish -->|"registers agent"| node_gemini_enterprise
node_publish -->|"uses credentials"| node_authentication
node_publish -->|"gets project"| node_project_detection
node_local_run -->|"uses remote access"| node_remote_access
node_remote_access -->|"uses credentials"| node_authentication
node_process_runner -->|"resolves executables"| node_tool_resolution
node_scaffold -->|"runs commands"| node_process_runner
node_cli -->|"formats output"| node_output

click node_cli "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/main.py"
click node_setup "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/setup/cmd_setup.py"
click node_skill_bundle "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/skills/_bundle.py"
click node_extension "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/extension/_loader.py"
click node_scaffold "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/scaffold/commands/create.py"
click node_templates "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/scaffold/utils/template.py"
click node_project_config "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_project.py"
click node_local_run "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/run/cmd_run.py"
click node_local_server "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/run/_local_server.py"
click node_adk_client "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_adk_client.py"
click node_evaluation "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/eval/cmd_run.py"
click node_eval_generate "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/eval/cmd_generate.py"
click node_eval_analysis "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/eval/cmd_analyze.py"
click node_deploy "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/deploy/cmd_deploy.py"
click node_agent_runtime "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/deploy/agent_runtime.py"
click node_publish "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/publish/cmd_publish.py"
click node_infrastructure "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/infra/cmd_infra.py"
click node_data_ingestion "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/data/cmd_data_ingestion.py"
click node_authentication "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/auth.py"
click node_project_detection "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_gcp_project.py"
click node_remote_access "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_remote.py"
click node_process_runner "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_runner.py"
click node_tool_resolution "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_tools.py"
click node_output "https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_output.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_cli,node_setup,node_skill_bundle,node_extension toneBlue
class node_scaffold,node_templates,node_local_run,node_local_server,node_adk_client toneAmber
class node_evaluation,node_eval_generate,node_eval_analysis toneMint
class node_deploy,node_agent_runtime,node_publish,node_infrastructure,node_data_ingestion toneRose
class node_project_config,node_authentication,node_project_detection,node_remote_access,node_process_runner,node_tool_resolution,node_output,node_developer,node_coding_assistant,node_google_cloud,node_adk_agent,node_gemini_enterprise toneIndigo
```

## Components

### CLI and skills

- [Command dispatcher](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/main.py): `src/google/agents/cli/main.py`
- [Setup and skills](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/setup/cmd_setup.py): `src/google/agents/cli/setup/cmd_setup.py`
- [Skill bundle](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/skills/_bundle.py): `src/google/agents/cli/skills/_bundle.py`
- [CLI extensions](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/extension/_loader.py): `src/google/agents/cli/extension/_loader.py`

### Agent development

- [Project scaffolding](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/scaffold/commands/create.py): `src/google/agents/cli/scaffold/commands/create.py`
- [Template generation](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/scaffold/utils/template.py): `src/google/agents/cli/scaffold/utils/template.py`
- [Local agent run](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/run/cmd_run.py): `src/google/agents/cli/run/cmd_run.py`
- [Local server](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/run/_local_server.py): `src/google/agents/cli/run/_local_server.py`
- [ADK HTTP client](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_adk_client.py): `src/google/agents/cli/_adk_client.py`

### Evaluation

- [Evaluation commands](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/eval/cmd_run.py): `src/google/agents/cli/eval/cmd_run.py`
- [Generate eval cases](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/eval/cmd_generate.py): `src/google/agents/cli/eval/cmd_generate.py`
- [Analyze and compare](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/eval/cmd_analyze.py): `src/google/agents/cli/eval/cmd_analyze.py`

### Cloud lifecycle

- [Agent deployment](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/deploy/cmd_deploy.py): `src/google/agents/cli/deploy/cmd_deploy.py`
- [Agent Runtime](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/deploy/agent_runtime.py): `src/google/agents/cli/deploy/agent_runtime.py`
- [Enterprise publishing](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/publish/cmd_publish.py): `src/google/agents/cli/publish/cmd_publish.py`
- [Infrastructure and CI/CD](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/infra/cmd_infra.py): `src/google/agents/cli/infra/cmd_infra.py`
- [Data ingestion](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/data/cmd_data_ingestion.py): `src/google/agents/cli/data/cmd_data_ingestion.py`

### Shared services

- [Project configuration](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_project.py): `src/google/agents/cli/_project.py`
- [Authentication](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/auth.py): `src/google/agents/cli/auth.py`
- [Cloud project lookup](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_gcp_project.py): `src/google/agents/cli/_gcp_project.py`
- [Remote agent access](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_remote.py): `src/google/agents/cli/_remote.py`
- [Process runner](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_runner.py): `src/google/agents/cli/_runner.py`
- [Tool resolution](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_tools.py): `src/google/agents/cli/_tools.py`
- [CLI output](https://github.com/joshluxton/agents-cli/blob/main/src/google/agents/cli/_output.py): `src/google/agents/cli/_output.py`

### Other components

- **Developer**
- **Coding assistant**
- **Google Cloud**
- **ADK agent**
- **Gemini Enterprise**

## Connections

- Developer → Command dispatcher: invokes
- Coding assistant → Command dispatcher: invokes
- Command dispatcher → Setup and skills: dispatches
- Command dispatcher → Project scaffolding: dispatches
- Command dispatcher → Local agent run: dispatches
- Command dispatcher → Evaluation commands: dispatches
- Command dispatcher → Agent deployment: dispatches
- Command dispatcher → Enterprise publishing: dispatches
- Command dispatcher → Infrastructure and CI/CD: dispatches
- Command dispatcher → CLI extensions: loads extensions (evidence: `src/google/agents/cli/main.py`)
- Setup and skills → Skill bundle: installs skills
- Project scaffolding → Template generation: generates project (evidence: `src/google/agents/cli/scaffold/commands/create.py`)
- Project scaffolding → Project configuration: reads project (evidence: `src/google/agents/cli/scaffold/commands/create.py`)
- Local agent run → Project configuration: reads project (evidence: `src/google/agents/cli/run/cmd_run.py`)
- Local agent run → Local server: starts server (evidence: `src/google/agents/cli/run/cmd_run.py`)
- Local agent run → ADK HTTP client: uses client (evidence: `src/google/agents/cli/run/cmd_run.py`)
- ADK HTTP client → ADK agent: streams requests (evidence: `src/google/agents/cli/_adk_client.py`)
- Generate eval cases → Local server: uses server (evidence: `src/google/agents/cli/eval/cmd_generate.py`)
- Evaluation commands → Generate eval cases: generates traces
- Evaluation commands → Analyze and compare: analyzes results
- Agent deployment → Agent Runtime: deploys to (evidence: `src/google/agents/cli/deploy/cmd_deploy.py`)
- Agent deployment → Project configuration: reads project (evidence: `src/google/agents/cli/deploy/cmd_deploy.py`)
- Agent deployment → Authentication: uses credentials (evidence: `src/google/agents/cli/deploy/cmd_deploy.py`)
- Agent deployment → Cloud project lookup: gets project (evidence: `src/google/agents/cli/deploy/cmd_deploy.py`)
- Agent deployment → Google Cloud: deploys agent
- Infrastructure and CI/CD → Google Cloud: provisions resources
- Enterprise publishing → Gemini Enterprise: registers agent
- Enterprise publishing → Authentication: uses credentials (evidence: `src/google/agents/cli/publish/cmd_publish.py`)
- Enterprise publishing → Cloud project lookup: gets project (evidence: `src/google/agents/cli/publish/cmd_publish.py`)
- Local agent run → Remote agent access: uses remote access (evidence: `src/google/agents/cli/run/cmd_run.py`)
- Remote agent access → Authentication: uses credentials (evidence: `src/google/agents/cli/_remote.py`)
- Process runner → Tool resolution: resolves executables (evidence: `src/google/agents/cli/_runner.py`)
- Project scaffolding → Process runner: runs commands
- Command dispatcher → CLI output: formats output (evidence: `src/google/agents/cli/main.py`)
