# intel/agentsysperf architecture

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

- Interactive diagram: https://gitdiagram.com/intel/agentsysperf
- Repository: https://github.com/intel/agentsysperf

## Overview

AgentSysPerf is a pluggable, stack-level agent benchmark suite. Its principal workflow is to run a selected benchmark and agent, collect hardware measurements, analyze the results, persist them, and expose them through reports, exports, and dashboards. Separate capabilities include replay, Terminal-Bench streams, density sweeps, and scaling experiments. The README establishes the product-level flow; several implementation modules are unsampled, so uncertain runtime links are omitted or marked unverified.

Main entry points: [`src/runner.py`](https://github.com/intel/agentsysperf/blob/main/src/runner.py) (Benchmark runner), [`src/cli.py`](https://github.com/intel/agentsysperf/blob/main/src/cli.py) (CLI), [`src/agent_loops/litellm_terminal_loop.py`](https://github.com/intel/agentsysperf/blob/main/src/agent_loops/litellm_terminal_loop.py) (Agent loops), [`src/storage/sqlite_store.py`](https://github.com/intel/agentsysperf/blob/main/src/storage/sqlite_store.py) (SQLite result store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Benchmark runtime"]
  node_cli["CLI<br/>[cli.py]"]
  node_driver["Run driver<br/>[run_driver.py]"]
  node_runner["Benchmark runner<br/>[runner.py]"]
  node_adapters["Benchmark adapters"]
  node_agent["Agent loops"]
  node_environment["Terminal environment"]
  node_measurements["Measurement probes"]
  node_profiles["Optimization profiles<br/>[profiles.py]"]
  node_platform["Platform detection<br/>[detect.py]"]
  node_replay["Record and replay"]
  node_streams["Task streams<br/>[orchestrator.py]"]
end

subgraph group_insight["Analysis and results"]
  node_analyzers["Result analyzers"]
  node_store[("SQLite result store<br/>[sqlite_store.py]")]
  node_analytics[("DuckDB analytics")]
  node_reports["Report generators"]
  node_exporters["Metrics exporters"]
end

subgraph group_interfaces["User interfaces"]
  node_dashboard["Streamlit dashboards<br/>[demo_app.py]"]
  node_dashboard_data["Dashboard data access<br/>[dashboard_data.py]"]
  node_scaling_views["Scaling visualizations<br/>[scaling_views.py]"]
end

subgraph group_studies["Scaling studies"]
  node_sweep["Harbor density sweep<br/>[harbor_sweep.py]"]
  node_scaling["Agent scaling experiment<br/>[orchestrator.py]"]
  node_workers["Synthetic agent workers<br/>[agent_worker.py]"]
  node_scaling_analysis["Scaling analysis<br/>[analysis.py]"]
end

node_user(("Benchmark user"))

node_user -->|"runs commands"| node_cli
node_cli -.->|"starts runs"| node_driver
node_driver -.->|"dispatches run"| node_runner
node_runner -.->|"runs benchmark"| node_adapters
node_runner -.->|"invokes agent"| node_agent
node_agent -->|"executes commands"| node_environment
node_agent -->|"uses fixtures"| node_replay
node_agent -.->|"emits step traces"| node_measurements
node_runner -.->|"collects layers"| node_measurements
node_runner -.->|"discovers plugins"| node_profiles
node_measurements -.->|"detects host"| node_platform
node_runner -.->|"runs analysis"| node_analyzers
node_runner -.->|"persists results"| node_store
node_cli -->|"generates reports"| node_reports
node_cli -->|"exports metrics"| node_exporters
node_cli -->|"runs analytics"| node_analytics
node_dashboard -->|"reads data"| node_dashboard_data
node_dashboard_data -->|"reads canonical store"| node_store
node_cli -->|"starts streams"| node_streams
node_streams -->|"uses run driver"| node_driver
node_streams -->|"opens store"| node_store
node_sweep -->|"persists sweep"| node_store
node_sweep -->|"uses scaling analyzer"| node_analyzers
node_scaling -->|"launches workers"| node_workers
node_workers -.->|"produces results"| node_scaling_analysis
node_scaling_analysis -.->|"feeds visualizations"| node_scaling_views
node_dashboard -->|"shows scaling views"| node_scaling_views

click node_cli "https://github.com/intel/agentsysperf/blob/main/src/cli.py"
click node_driver "https://github.com/intel/agentsysperf/blob/main/src/run_driver.py"
click node_runner "https://github.com/intel/agentsysperf/blob/main/src/runner.py"
click node_adapters "https://github.com/intel/agentsysperf/tree/main/src/benchmarks"
click node_agent "https://github.com/intel/agentsysperf/blob/main/src/agent_loops/litellm_terminal_loop.py"
click node_environment "https://github.com/intel/agentsysperf/tree/main/src/benchmarks/terminal_bench"
click node_measurements "https://github.com/intel/agentsysperf/tree/main/src/measurements"
click node_profiles "https://github.com/intel/agentsysperf/blob/main/src/optimization_profiles/profiles.py"
click node_platform "https://github.com/intel/agentsysperf/blob/main/src/platform/detect.py"
click node_replay "https://github.com/intel/agentsysperf/tree/main/src/replay"
click node_streams "https://github.com/intel/agentsysperf/blob/main/src/streams/orchestrator.py"
click node_analyzers "https://github.com/intel/agentsysperf/tree/main/src/analyzers"
click node_store "https://github.com/intel/agentsysperf/blob/main/src/storage/sqlite_store.py"
click node_analytics "https://github.com/intel/agentsysperf/blob/main/src/storage/duckdb_analytics.py"
click node_reports "https://github.com/intel/agentsysperf/tree/main/src/reporting"
click node_exporters "https://github.com/intel/agentsysperf/tree/main/src/exporters"
click node_dashboard "https://github.com/intel/agentsysperf/blob/main/demo_app.py"
click node_dashboard_data "https://github.com/intel/agentsysperf/blob/main/src/dashboard_data.py"
click node_sweep "https://github.com/intel/agentsysperf/blob/main/src/sweep/harbor_sweep.py"
click node_scaling "https://github.com/intel/agentsysperf/blob/main/experiments/scaling/orchestrator.py"
click node_workers "https://github.com/intel/agentsysperf/blob/main/experiments/scaling/agent_worker.py"
click node_scaling_analysis "https://github.com/intel/agentsysperf/blob/main/experiments/scaling/analysis.py"
click node_scaling_views "https://github.com/intel/agentsysperf/blob/main/src/dashboard/scaling_views.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_driver,node_runner,node_adapters,node_agent,node_environment,node_measurements,node_profiles,node_platform,node_replay,node_streams,node_user toneBlue
class node_analyzers,node_store,node_analytics,node_reports,node_exporters toneAmber
class node_dashboard,node_dashboard_data,node_scaling_views toneMint
class node_sweep,node_scaling,node_workers,node_scaling_analysis toneRose
```

## Components

### Benchmark runtime

- [CLI](https://github.com/intel/agentsysperf/blob/main/src/cli.py): `src/cli.py`
- [Run driver](https://github.com/intel/agentsysperf/blob/main/src/run_driver.py): `src/run_driver.py`
- [Benchmark runner](https://github.com/intel/agentsysperf/blob/main/src/runner.py): `src/runner.py`
- [Benchmark adapters](https://github.com/intel/agentsysperf/tree/main/src/benchmarks): `src/benchmarks`
- [Agent loops](https://github.com/intel/agentsysperf/blob/main/src/agent_loops/litellm_terminal_loop.py): `src/agent_loops/litellm_terminal_loop.py`
- [Terminal environment](https://github.com/intel/agentsysperf/tree/main/src/benchmarks/terminal_bench): `src/benchmarks/terminal_bench`
- [Measurement probes](https://github.com/intel/agentsysperf/tree/main/src/measurements): `src/measurements`
- [Optimization profiles](https://github.com/intel/agentsysperf/blob/main/src/optimization_profiles/profiles.py): `src/optimization_profiles/profiles.py`
- [Platform detection](https://github.com/intel/agentsysperf/blob/main/src/platform/detect.py): `src/platform/detect.py`
- [Record and replay](https://github.com/intel/agentsysperf/tree/main/src/replay): `src/replay`
- [Task streams](https://github.com/intel/agentsysperf/blob/main/src/streams/orchestrator.py): `src/streams/orchestrator.py`

### Analysis and results

- [Result analyzers](https://github.com/intel/agentsysperf/tree/main/src/analyzers): `src/analyzers`
- [SQLite result store](https://github.com/intel/agentsysperf/blob/main/src/storage/sqlite_store.py): `src/storage/sqlite_store.py`
- [DuckDB analytics](https://github.com/intel/agentsysperf/blob/main/src/storage/duckdb_analytics.py): `src/storage/duckdb_analytics.py`
- [Report generators](https://github.com/intel/agentsysperf/tree/main/src/reporting): `src/reporting`
- [Metrics exporters](https://github.com/intel/agentsysperf/tree/main/src/exporters): `src/exporters`

### User interfaces

- [Streamlit dashboards](https://github.com/intel/agentsysperf/blob/main/demo_app.py): `demo_app.py`
- [Dashboard data access](https://github.com/intel/agentsysperf/blob/main/src/dashboard_data.py): `src/dashboard_data.py`
- [Scaling visualizations](https://github.com/intel/agentsysperf/blob/main/src/dashboard/scaling_views.py): `src/dashboard/scaling_views.py`

### Scaling studies

- [Harbor density sweep](https://github.com/intel/agentsysperf/blob/main/src/sweep/harbor_sweep.py): `src/sweep/harbor_sweep.py`
- [Agent scaling experiment](https://github.com/intel/agentsysperf/blob/main/experiments/scaling/orchestrator.py): `experiments/scaling/orchestrator.py`
- [Synthetic agent workers](https://github.com/intel/agentsysperf/blob/main/experiments/scaling/agent_worker.py): `experiments/scaling/agent_worker.py`
- [Scaling analysis](https://github.com/intel/agentsysperf/blob/main/experiments/scaling/analysis.py): `experiments/scaling/analysis.py`

### Other components

- **Benchmark user**

## Connections

- Benchmark user → CLI: runs commands
- CLI → Run driver: starts runs
- Run driver → Benchmark runner: dispatches run
- Benchmark runner → Benchmark adapters: runs benchmark
- Benchmark runner → Agent loops: invokes agent (evidence: `src/agent_loops/litellm_terminal_loop.py`)
- Agent loops → Terminal environment: executes commands (evidence: `src/agent_loops/litellm_terminal_loop.py`)
- Agent loops → Record and replay: uses fixtures (evidence: `src/agent_loops/litellm_terminal_loop.py`)
- Agent loops → Measurement probes: emits step traces
- Benchmark runner → Measurement probes: collects layers
- Benchmark runner → Optimization profiles: discovers plugins
- Measurement probes → Platform detection: detects host
- Benchmark runner → Result analyzers: runs analysis
- Benchmark runner → SQLite result store: persists results
- CLI → Report generators: generates reports
- CLI → Metrics exporters: exports metrics
- CLI → DuckDB analytics: runs analytics
- Streamlit dashboards → Dashboard data access: reads data (evidence: `demo_app.py`)
- Dashboard data access → SQLite result store: reads canonical store
- CLI → Task streams: starts streams
- Task streams → Run driver: uses run driver (evidence: `src/streams/orchestrator.py`)
- Task streams → SQLite result store: opens store (evidence: `src/streams/orchestrator.py`)
- Harbor density sweep → SQLite result store: persists sweep (evidence: `src/sweep/harbor_sweep.py`)
- Harbor density sweep → Result analyzers: uses scaling analyzer (evidence: `src/sweep/harbor_sweep.py`)
- Agent scaling experiment → Synthetic agent workers: launches workers (evidence: `experiments/scaling/orchestrator.py`)
- Synthetic agent workers → Scaling analysis: produces results
- Scaling analysis → Scaling visualizations: feeds visualizations
- Streamlit dashboards → Scaling visualizations: shows scaling views (evidence: `demo_app.py`)
