# openagenthq/openagent-eval architecture

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

- Interactive diagram: https://gitdiagram.com/openagenthq/openagent-eval
- Repository: https://github.com/openagenthq/openagent-eval

## Overview

OpenAgent Eval is a local-first framework and CLI/SDK for evaluating RAG systems and AI agents. Its primary workflow loads configuration and a dataset, retrieves context, generates answers, computes metrics, and saves or renders reports. Separate capabilities audit corpus health, diagnose failures, synthesize test data, extend the framework with plugins, and gate evaluations in pytest/CI. The map uses the supplied excerpts and SOURCE INDEX references; several feature links are documented by the README because their implementation files were not sampled.

Main entry points: [`openagent_eval/cli/main.py`](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cli/main.py) (CLI Commands), [`openagent_eval/core/engine.py`](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/core/engine.py) (Evaluation Engine), [`openagent_eval/core/pipeline.py`](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/core/pipeline.py) (Evaluation Pipeline), [`openagent_eval/reports/manager.py`](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/reports/manager.py) (Report Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_cli["CLI Commands<br/>[main.py]"]
  node_configuration["Config Loader<br/>[loader.py]"]
end

subgraph group_evaluation["Evaluation Runtime"]
  node_dataset["Dataset Loaders"]
  node_engine["Evaluation Engine<br/>[engine.py]"]
  node_pipeline["Evaluation Pipeline<br/>[pipeline.py]"]
  node_reporting["Report Formats"]
  node_reportstore[("Report Manager<br/>[manager.py]")]
end

subgraph group_extensions["Providers and Metrics"]
  node_retrievers["Retriever Providers"]
  node_llmproviders["LLM Providers"]
  node_metricset["Metric Implementations"]
end

subgraph group_insights["Quality Insights"]
  node_corpuscommand["Corpus Audit Command<br/>[audit.py]"]
  node_auditor["Corpus Auditor<br/>[auditor.py]"]
  node_auditchecks["Audit Checks"]
  node_diagnosis["Failure Diagnosis"]
  node_synthesis["Synthetic Data<br/>[generator.py]"]
end

subgraph group_ecosystem["Extensions and CI"]
  node_plugins["Plugin System"]
  node_cicd["Pytest CI Plugin<br/>[plugin.py]"]
  node_thresholds["Metric Thresholds<br/>[thresholds.py]"]
end

node_developer(("Developer"))

node_developer -->|"runs commands"| node_cli
node_developer -->|"uses SDK"| node_engine
node_cli -->|"loads config"| node_configuration
node_cli -->|"loads dataset"| node_dataset
node_cli -->|"starts evaluation"| node_engine
node_engine -->|"constructs and runs"| node_pipeline
node_engine -->|"builds provider"| node_retrievers
node_engine -->|"builds provider"| node_llmproviders
node_pipeline -->|"retrieves context"| node_retrievers
node_pipeline -->|"generates answers"| node_llmproviders
node_pipeline -->|"computes scores"| node_metricset
node_engine -->|"returns evaluation report"| node_reportstore
node_cli -->|"loads and lists reports"| node_reportstore
node_reportstore -->|"renders report formats"| node_reporting
node_cli -->|"routes audit command"| node_corpuscommand
node_corpuscommand -->|"runs audit"| node_auditor
node_auditor -->|"runs health checks"| node_auditchecks
node_cli -->|"offers diagnosis"| node_diagnosis
node_cli -->|"offers synthesis"| node_synthesis
node_plugins -.->|"extends metrics"| node_metricset
node_plugins -.->|"extends providers"| node_retrievers
node_cicd -->|"runs evaluation"| node_engine
node_cicd -->|"checks thresholds"| node_thresholds

click node_cli "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cli/main.py"
click node_configuration "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/config/loader.py"
click node_dataset "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/datasets"
click node_engine "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/core/engine.py"
click node_pipeline "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/core/pipeline.py"
click node_retrievers "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/providers/retrievers"
click node_llmproviders "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/providers/llm"
click node_metricset "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/metrics"
click node_reporting "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/reports"
click node_reportstore "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/reports/manager.py"
click node_corpuscommand "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cli/commands/audit.py"
click node_auditor "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/corpus/auditor.py"
click node_auditchecks "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/corpus"
click node_diagnosis "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/diagnosis"
click node_synthesis "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/synthesis/generator.py"
click node_plugins "https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/plugins"
click node_cicd "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cicd/plugin.py"
click node_thresholds "https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cicd/thresholds.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_configuration toneBlue
class node_dataset,node_engine,node_pipeline,node_reporting,node_reportstore toneAmber
class node_retrievers,node_llmproviders,node_metricset toneMint
class node_corpuscommand,node_auditor,node_auditchecks,node_diagnosis,node_synthesis toneRose
class node_plugins,node_cicd,node_thresholds,node_developer toneIndigo
```

## Components

### User Interface

- [CLI Commands](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cli/main.py): `openagent_eval/cli/main.py`
- [Config Loader](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/config/loader.py): `openagent_eval/config/loader.py`

### Evaluation Runtime

- [Dataset Loaders](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/datasets): `openagent_eval/datasets`
- [Evaluation Engine](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/core/engine.py): `openagent_eval/core/engine.py`
- [Evaluation Pipeline](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/core/pipeline.py): `openagent_eval/core/pipeline.py`
- [Report Formats](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/reports): `openagent_eval/reports`
- [Report Manager](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/reports/manager.py): `openagent_eval/reports/manager.py`

### Providers and Metrics

- [Retriever Providers](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/providers/retrievers): `openagent_eval/providers/retrievers`
- [LLM Providers](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/providers/llm): `openagent_eval/providers/llm`
- [Metric Implementations](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/metrics): `openagent_eval/metrics`

### Quality Insights

- [Corpus Audit Command](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cli/commands/audit.py): `openagent_eval/cli/commands/audit.py`
- [Corpus Auditor](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/corpus/auditor.py): `openagent_eval/corpus/auditor.py`
- [Audit Checks](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/corpus): `openagent_eval/corpus`
- [Failure Diagnosis](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/diagnosis): `openagent_eval/diagnosis`
- [Synthetic Data](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/synthesis/generator.py): `openagent_eval/synthesis/generator.py`

### Extensions and CI

- [Plugin System](https://github.com/openagenthq/openagent-eval/tree/main/openagent_eval/plugins): `openagent_eval/plugins`
- [Pytest CI Plugin](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cicd/plugin.py): `openagent_eval/cicd/plugin.py`
- [Metric Thresholds](https://github.com/openagenthq/openagent-eval/blob/main/openagent_eval/cicd/thresholds.py): `openagent_eval/cicd/thresholds.py`

### Other components

- **Developer**

## Connections

- Developer → CLI Commands: runs commands
- Developer → Evaluation Engine: uses SDK
- CLI Commands → Config Loader: loads config
- CLI Commands → Dataset Loaders: loads dataset
- CLI Commands → Evaluation Engine: starts evaluation
- Evaluation Engine → Evaluation Pipeline: constructs and runs (evidence: `openagent_eval/core/engine.py`)
- Evaluation Engine → Retriever Providers: builds provider (evidence: `openagent_eval/core/engine.py`)
- Evaluation Engine → LLM Providers: builds provider (evidence: `openagent_eval/core/engine.py`)
- Evaluation Pipeline → Retriever Providers: retrieves context
- Evaluation Pipeline → LLM Providers: generates answers
- Evaluation Pipeline → Metric Implementations: computes scores (evidence: `openagent_eval/core/pipeline.py`)
- Evaluation Engine → Report Manager: returns evaluation report (evidence: `openagent_eval/core/engine.py`)
- CLI Commands → Report Manager: loads and lists reports
- Report Manager → Report Formats: renders report formats (evidence: `openagent_eval/cli/utils/helpers.py`)
- CLI Commands → Corpus Audit Command: routes audit command (evidence: `openagent_eval/cli/main.py`)
- Corpus Audit Command → Corpus Auditor: runs audit (evidence: `openagent_eval/cli/commands/audit.py`)
- Corpus Auditor → Audit Checks: runs health checks (evidence: `openagent_eval/corpus/auditor.py`)
- CLI Commands → Failure Diagnosis: offers diagnosis
- CLI Commands → Synthetic Data: offers synthesis
- Plugin System → Metric Implementations: extends metrics
- Plugin System → Retriever Providers: extends providers
- Pytest CI Plugin → Evaluation Engine: runs evaluation (evidence: `openagent_eval/cicd/plugin.py`)
- Pytest CI Plugin → Metric Thresholds: checks thresholds (evidence: `openagent_eval/cicd/plugin.py`)
