# adithyan-ak/agenthound architecture

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

- Interactive diagram: https://gitdiagram.com/adithyan-ak/agenthound
- Repository: https://github.com/adithyan-ak/agenthound

## Overview

AgentHound is an offensive security framework for agentic infrastructure. Its main workflow starts from a foothold: the collector discovers local agent configuration and reachable services, inventories targets, reuses credentials, and performs eligible validation before writing an ingest artifact. The optional server ingests that artifact, builds and analyzes an attack graph, and exposes findings and graph data through its API and UI; the CLI also supports querying. README statements document the broad workflow and service capabilities; sampled source confirms selected module, ingest, API, and UI links, while unsampled implementation details are not assumed.

Main entry points: [`collector/cli/scan_unified.go`](https://github.com/adithyan-ak/agenthound/blob/main/collector/cli/scan_unified.go) (Collector CLI), [`server/internal/ingest/pipeline.go`](https://github.com/adithyan-ak/agenthound/blob/main/server/internal/ingest/pipeline.go) (Ingest pipeline), [`server/internal/api/server.go`](https://github.com/adithyan-ak/agenthound/blob/main/server/internal/api/server.go) (Server API), [`server/cli/ingest.go`](https://github.com/adithyan-ak/agenthound/blob/main/server/cli/ingest.go) (Server CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_collector_cli["Collector CLI<br/>[scan_unified.go]"]
  node_config_discovery["Config discovery"]
  node_service_discovery["Service discovery<br/>[scanner.go]"]
  node_mcp["MCP inventory<br/>[enumerate.go]"]
  node_a2a["A2A assessment<br/>[auth_probe.go]"]
  node_service_collectors["Service collection"]
  node_fingerprinting["Service fingerprinting"]
  node_active_validation["Active validation<br/>[contextforge.go]"]
end

subgraph group_framework["Collector framework"]
  node_collector_runtime["Collector runtime<br/>[registry.go]"]
  node_artifact["Scan artifact<br/>[ingest.go]"]
end

subgraph group_server["Analysis server"]
  node_server_cli["Server CLI<br/>[ingest.go]"]
  node_ingest_pipeline["Ingest pipeline<br/>[pipeline.go]"]
  node_graph_store[("Attack graph")]
  node_app_store[("Application store")]
  node_analysis["Graph analysis"]
  node_server_api["Server API<br/>[server.go]"]
  node_query_cli["Query CLI<br/>[query.go]"]
end

subgraph group_interface["Operator interface"]
  node_ui_scans["Scan management UI<br/>[ScanManager.tsx]"]
  node_ui_analysis["Analysis UI"]
end

node_operator(("Operator"))
node_operator_client(("Operator"))

node_operator -->|"starts scan"| node_collector_cli
node_collector_cli -.->|"collects config"| node_config_discovery
node_collector_cli -.->|"discovers services"| node_service_discovery
node_collector_cli -->|"enumerates MCP"| node_mcp
node_collector_cli -->|"assesses A2A"| node_a2a
node_collector_cli -->|"collects services"| node_service_collectors
node_collector_cli -->|"fingerprints targets"| node_fingerprinting
node_collector_cli -->|"validates access"| node_active_validation
node_collector_cli -->|"loads modules"| node_collector_runtime
node_collector_runtime -->|"records results"| node_artifact
node_operator -->|"submits artifact"| node_server_cli
node_server_cli -->|"ingests artifact"| node_ingest_pipeline
node_ingest_pipeline -->|"writes graph"| node_graph_store
node_ingest_pipeline -->|"runs processors"| node_analysis
node_ingest_pipeline -.->|"publishes state"| node_app_store
node_analysis -->|"queries graph"| node_graph_store
node_server_api -->|"routes ingest"| node_ingest_pipeline
node_server_cli -->|"queries findings"| node_analysis
node_server_api -->|"serves data"| node_operator_client
node_operator_client -->|"manages scans"| node_ui_scans
node_operator_client -->|"explores findings"| node_ui_analysis
node_ui_scans -.->|"requests scans"| node_server_api
node_ui_analysis -.->|"requests analysis"| node_server_api

click node_collector_cli "https://github.com/adithyan-ak/agenthound/blob/main/collector/cli/scan_unified.go"
click node_config_discovery "https://github.com/adithyan-ak/agenthound/tree/main/modules/config"
click node_service_discovery "https://github.com/adithyan-ak/agenthound/blob/main/modules/networkscan/scanner.go"
click node_mcp "https://github.com/adithyan-ak/agenthound/blob/main/modules/mcp/enumerate.go"
click node_a2a "https://github.com/adithyan-ak/agenthound/blob/main/modules/a2a/auth_probe.go"
click node_service_collectors "https://github.com/adithyan-ak/agenthound/tree/main/modules"
click node_fingerprinting "https://github.com/adithyan-ak/agenthound/tree/main/modules"
click node_active_validation "https://github.com/adithyan-ak/agenthound/blob/main/modules/mcppoison/contextforge.go"
click node_collector_runtime "https://github.com/adithyan-ak/agenthound/blob/main/sdk/module/registry.go"
click node_artifact "https://github.com/adithyan-ak/agenthound/blob/main/sdk/ingest/ingest.go"
click node_server_cli "https://github.com/adithyan-ak/agenthound/blob/main/server/cli/ingest.go"
click node_ingest_pipeline "https://github.com/adithyan-ak/agenthound/blob/main/server/internal/ingest/pipeline.go"
click node_graph_store "https://github.com/adithyan-ak/agenthound/tree/main/server/internal/graph"
click node_app_store "https://github.com/adithyan-ak/agenthound/tree/main/server/internal/appdb"
click node_analysis "https://github.com/adithyan-ak/agenthound/tree/main/server/internal/analysis"
click node_server_api "https://github.com/adithyan-ak/agenthound/blob/main/server/internal/api/server.go"
click node_query_cli "https://github.com/adithyan-ak/agenthound/blob/main/server/cli/query.go"
click node_ui_scans "https://github.com/adithyan-ak/agenthound/blob/main/server/ui/src/features/scans/ui/ScanManager.tsx"
click node_ui_analysis "https://github.com/adithyan-ak/agenthound/tree/main/server/ui/src/features"

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_collector_cli,node_config_discovery,node_service_discovery,node_mcp,node_a2a,node_service_collectors,node_fingerprinting,node_active_validation toneBlue
class node_collector_runtime,node_artifact toneAmber
class node_server_cli,node_ingest_pipeline,node_graph_store,node_app_store,node_analysis,node_server_api,node_query_cli toneMint
class node_ui_scans,node_ui_analysis toneRose
class node_operator,node_operator_client toneIndigo
```

## Components

### Collection

- [Collector CLI](https://github.com/adithyan-ak/agenthound/blob/main/collector/cli/scan_unified.go): `collector/cli/scan_unified.go`
- [Config discovery](https://github.com/adithyan-ak/agenthound/tree/main/modules/config): `modules/config`
- [Service discovery](https://github.com/adithyan-ak/agenthound/blob/main/modules/networkscan/scanner.go): `modules/networkscan/scanner.go`
- [MCP inventory](https://github.com/adithyan-ak/agenthound/blob/main/modules/mcp/enumerate.go): `modules/mcp/enumerate.go`
- [A2A assessment](https://github.com/adithyan-ak/agenthound/blob/main/modules/a2a/auth_probe.go): `modules/a2a/auth_probe.go`
- [Service collection](https://github.com/adithyan-ak/agenthound/tree/main/modules): `modules`
- [Service fingerprinting](https://github.com/adithyan-ak/agenthound/tree/main/modules): `modules`
- [Active validation](https://github.com/adithyan-ak/agenthound/blob/main/modules/mcppoison/contextforge.go): `modules/mcppoison/contextforge.go`

### Collector framework

- [Collector runtime](https://github.com/adithyan-ak/agenthound/blob/main/sdk/module/registry.go): `sdk/module/registry.go`
- [Scan artifact](https://github.com/adithyan-ak/agenthound/blob/main/sdk/ingest/ingest.go): `sdk/ingest/ingest.go`

### Analysis server

- [Server CLI](https://github.com/adithyan-ak/agenthound/blob/main/server/cli/ingest.go): `server/cli/ingest.go`
- [Ingest pipeline](https://github.com/adithyan-ak/agenthound/blob/main/server/internal/ingest/pipeline.go): `server/internal/ingest/pipeline.go`
- [Attack graph](https://github.com/adithyan-ak/agenthound/tree/main/server/internal/graph): `server/internal/graph`
- [Application store](https://github.com/adithyan-ak/agenthound/tree/main/server/internal/appdb): `server/internal/appdb`
- [Graph analysis](https://github.com/adithyan-ak/agenthound/tree/main/server/internal/analysis): `server/internal/analysis`
- [Server API](https://github.com/adithyan-ak/agenthound/blob/main/server/internal/api/server.go): `server/internal/api/server.go`
- [Query CLI](https://github.com/adithyan-ak/agenthound/blob/main/server/cli/query.go): `server/cli/query.go`

### Operator interface

- [Scan management UI](https://github.com/adithyan-ak/agenthound/blob/main/server/ui/src/features/scans/ui/ScanManager.tsx): `server/ui/src/features/scans/ui/ScanManager.tsx`
- [Analysis UI](https://github.com/adithyan-ak/agenthound/tree/main/server/ui/src/features): `server/ui/src/features`

### Other components

- **Operator**
- **Operator**

## Connections

- Operator → Collector CLI: starts scan
- Collector CLI → Config discovery: collects config
- Collector CLI → Service discovery: discovers services
- Collector CLI → MCP inventory: enumerates MCP
- Collector CLI → A2A assessment: assesses A2A
- Collector CLI → Service collection: collects services
- Collector CLI → Service fingerprinting: fingerprints targets
- Collector CLI → Active validation: validates access
- Collector CLI → Collector runtime: loads modules
- Collector runtime → Scan artifact: records results
- Operator → Server CLI: submits artifact
- Server CLI → Ingest pipeline: ingests artifact (evidence: `server/cli/ingest.go`)
- Ingest pipeline → Attack graph: writes graph (evidence: `server/internal/ingest/pipeline.go`)
- Ingest pipeline → Graph analysis: runs processors (evidence: `server/internal/ingest/pipeline.go`)
- Ingest pipeline → Application store: publishes state (evidence: `server/internal/ingest/pipeline.go`)
- Graph analysis → Attack graph: queries graph (evidence: `server/internal/analysis/riskscore/server.go`)
- Server API → Ingest pipeline: routes ingest (evidence: `server/internal/api/server.go`)
- Server CLI → Graph analysis: queries findings
- Server API → Operator: serves data (evidence: `server/internal/api/server.go`)
- Operator → Scan management UI: manages scans (evidence: `server/ui/src/features/scans/ui/ScanManager.tsx`)
- Operator → Analysis UI: explores findings
- Scan management UI → Server API: requests scans
- Analysis UI → Server API: requests analysis
