# narendrareddy07/agent-reliability-lab architecture

> Architecture diagram of the GitHub repository narendrareddy07/agent-reliability-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/narendrareddy07/agent-reliability-lab
- Repository: https://github.com/narendrareddy07/agent-reliability-lab

## Overview

Agent Reliability Lab is a web platform for managing benchmark datasets, running agent evaluations, and inspecting reliability and execution traces. Users organize test cases into datasets, select an agent and evaluator, run a benchmark, inspect per-case results and linked traces, then compare reliability analytics or apply quality gates. The map includes the documented scheduling capability. Source excerpts confirm key agent, evaluation, persistence, and quality-gate calls; some routes and frontend integrations are represented from README documentation because their implementations were not sampled.

Main entry points: [`frontend/src/App.jsx`](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/App.jsx) (Application routes), [`backend/app/main.py`](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/main.py) (FastAPI application), [`frontend/src/lib/api.js`](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/lib/api.js) (HTTP API client), [`backend/app/services/schedule_service.py`](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/schedule_service.py) (Schedule execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Workspace UI"]
  node_app["Application routes<br/>[App.jsx]"]
  node_layout["Workspace layout<br/>[AppLayout.jsx]"]
  node_agents_ui["Agent workspace<br/>[Agents.jsx]"]
  node_datasets_ui["Dataset workspace<br/>[Datasets.jsx]"]
  node_evaluations_ui["Evaluation workspace<br/>[Evaluations.jsx]"]
  node_analytics_ui["Analytics dashboard<br/>[Analytics.jsx]"]
  node_executions_ui["Execution history<br/>[Executions.jsx]"]
  node_traces_ui["Trace explorer<br/>[TraceExplorer.jsx]"]
  node_schedules_ui["Schedule workspace<br/>[Schedules.jsx]"]
  node_api_client["HTTP API client<br/>[api.js]"]
end

subgraph group_api["Backend API"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_agent_api["Agent routes<br/>[agents.py]"]
  node_dataset_api["Dataset routes<br/>[datasets.py]"]
  node_evaluation_api["Evaluation routes<br/>[evaluations.py]"]
  node_schedule_api["Schedule routes<br/>[schedules.py]"]
end

subgraph group_benchmark["Benchmarking"]
  node_agent_service["Agent execution<br/>[agent_service.py]"]
  node_mock_agent["Mock support agent<br/>[mock_agent.py]"]
  node_evaluation_service["Evaluation engine"]
  node_dataset_service["Dataset management<br/>[dataset_service.py]"]
  node_scheduler["Benchmark scheduler<br/>[scheduler.py]"]
  node_schedule_service["Schedule execution"]
end

subgraph group_observability["Reliability &amp; Observability"]
  node_quality_gate["Quality gate"]
  node_regression["Run comparison"]
  node_metrics["Reliability metrics<br/>[metrics_service.py]"]
end

subgraph group_persistence["Persistence"]
  node_database[("SQLite database<br/>[database.py]")]
  node_models["Application records<br/>[models.py]"]
  node_scheduled_models["Schedule records"]
end

node_user(("Workspace user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_layout
node_app -->|"routes to"| node_agents_ui
node_app -->|"routes to"| node_datasets_ui
node_app -->|"routes to"| node_evaluations_ui
node_app -->|"routes to"| node_analytics_ui
node_app -->|"routes to"| node_executions_ui
node_app -->|"routes to"| node_traces_ui
node_app -->|"routes to"| node_schedules_ui
node_agents_ui -->|"requests data"| node_api_client
node_datasets_ui -->|"requests data"| node_api_client
node_evaluations_ui -->|"requests data"| node_api_client
node_executions_ui -->|"requests data"| node_api_client
node_schedules_ui -->|"requests data"| node_api_client
node_analytics_ui -.->|"requests data"| node_api_client
node_traces_ui -.->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_fastapi
node_fastapi -->|"mounts router"| node_agent_api
node_fastapi -->|"mounts router"| node_dataset_api
node_fastapi -->|"mounts router"| node_evaluation_api
node_fastapi -->|"mounts router"| node_schedule_api
node_agent_api -->|"executes agents"| node_agent_service
node_agent_service -->|"runs agent"| node_mock_agent
node_evaluation_api -->|"runs evaluations"| node_evaluation_service
node_evaluation_api -->|"requests metrics"| node_metrics
node_evaluation_api -->|"compares runs"| node_regression
node_evaluation_api -->|"checks gate"| node_quality_gate
node_evaluation_service -->|"executes prompts"| node_agent_service
node_schedule_api -.->|"manages schedules"| node_schedule_service
node_fastapi -->|"starts loop"| node_scheduler
node_scheduler -.->|"runs due work"| node_schedule_service
node_schedule_service -->|"runs benchmark"| node_evaluation_service
node_schedule_service -->|"checks result"| node_quality_gate
node_quality_gate -->|"compares baseline"| node_regression
node_quality_gate -->|"loads run"| node_evaluation_service
node_dataset_api -.->|"manages datasets"| node_dataset_service
node_agent_service -->|"persists executions"| node_database
node_evaluation_service -->|"persists runs"| node_database
node_metrics -->|"queries records"| node_models
node_schedule_service -->|"stores schedules"| node_scheduled_models
node_schedule_service -->|"reads datasets"| node_models
node_fastapi -->|"creates tables"| node_database

click node_app "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/App.jsx"
click node_layout "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/components/AppLayout.jsx"
click node_agents_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Agents.jsx"
click node_datasets_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Datasets.jsx"
click node_evaluations_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Evaluations.jsx"
click node_analytics_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Analytics.jsx"
click node_executions_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Executions.jsx"
click node_traces_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/TraceExplorer.jsx"
click node_schedules_ui "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Schedules.jsx"
click node_api_client "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/lib/api.js"
click node_fastapi "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/main.py"
click node_agent_api "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/agents.py"
click node_dataset_api "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/datasets.py"
click node_evaluation_api "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/evaluations.py"
click node_schedule_api "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/schedules.py"
click node_agent_service "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/agent_service.py"
click node_mock_agent "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/agents/mock_agent.py"
click node_evaluation_service "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/evaluation_service.py"
click node_dataset_service "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/dataset_service.py"
click node_scheduler "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/scheduler.py"
click node_schedule_service "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/schedule_service.py"
click node_quality_gate "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/quality_gate_service.py"
click node_regression "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/regression_service.py"
click node_metrics "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/metrics_service.py"
click node_database "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/database.py"
click node_models "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/models.py"
click node_scheduled_models "https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/scheduled_models.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_app,node_layout,node_agents_ui,node_datasets_ui,node_evaluations_ui,node_analytics_ui,node_executions_ui,node_traces_ui,node_schedules_ui,node_api_client,node_user toneBlue
class node_fastapi,node_agent_api,node_dataset_api,node_evaluation_api,node_schedule_api toneAmber
class node_agent_service,node_mock_agent,node_evaluation_service,node_dataset_service,node_scheduler,node_schedule_service toneMint
class node_quality_gate,node_regression,node_metrics toneRose
class node_database,node_models,node_scheduled_models toneIndigo
```

## Components

### Workspace UI

- [Application routes](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Workspace layout](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/components/AppLayout.jsx): `frontend/src/components/AppLayout.jsx`
- [Agent workspace](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Agents.jsx): `frontend/src/pages/Agents.jsx`
- [Dataset workspace](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Datasets.jsx): `frontend/src/pages/Datasets.jsx`
- [Evaluation workspace](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Evaluations.jsx): `frontend/src/pages/Evaluations.jsx`
- [Analytics dashboard](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Analytics.jsx): `frontend/src/pages/Analytics.jsx`
- [Execution history](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Executions.jsx): `frontend/src/pages/Executions.jsx`
- [Trace explorer](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/TraceExplorer.jsx): `frontend/src/pages/TraceExplorer.jsx`
- [Schedule workspace](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/pages/Schedules.jsx): `frontend/src/pages/Schedules.jsx`
- [HTTP API client](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`

### Backend API

- [FastAPI application](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/main.py): `backend/app/main.py`
- [Agent routes](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/agents.py): `backend/app/api/agents.py`
- [Dataset routes](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/datasets.py): `backend/app/api/datasets.py`
- [Evaluation routes](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/evaluations.py): `backend/app/api/evaluations.py`
- [Schedule routes](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/api/schedules.py): `backend/app/api/schedules.py`

### Benchmarking

- [Agent execution](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/agent_service.py): `backend/app/services/agent_service.py`
- [Mock support agent](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/agents/mock_agent.py): `backend/app/agents/mock_agent.py`
- [Evaluation engine](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/evaluation_service.py): `backend/app/services/evaluation_service.py`
- [Dataset management](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/dataset_service.py): `backend/app/services/dataset_service.py`
- [Benchmark scheduler](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/scheduler.py): `backend/app/scheduler.py`
- [Schedule execution](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/schedule_service.py): `backend/app/services/schedule_service.py`

### Reliability & Observability

- [Quality gate](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/quality_gate_service.py): `backend/app/services/quality_gate_service.py`
- [Run comparison](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/regression_service.py): `backend/app/services/regression_service.py`
- [Reliability metrics](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/services/metrics_service.py): `backend/app/services/metrics_service.py`

### Persistence

- [SQLite database](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/database.py): `backend/app/database.py`
- [Application records](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/models.py): `backend/app/models.py`
- [Schedule records](https://github.com/narendrareddy07/agent-reliability-lab/blob/main/backend/app/scheduled_models.py): `backend/app/scheduled_models.py`

### Other components

- **Workspace user**

## Connections

- Workspace user → Application routes: uses (evidence: `README.md`)
- Application routes → Workspace layout: renders (evidence: `frontend/src/App.jsx`)
- Application routes → Agent workspace: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Dataset workspace: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Evaluation workspace: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Analytics dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Execution history: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Trace explorer: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Schedule workspace: routes to (evidence: `frontend/src/App.jsx`)
- Agent workspace → HTTP API client: requests data (evidence: `frontend/src/pages/Agents.jsx`)
- Dataset workspace → HTTP API client: requests data (evidence: `frontend/src/pages/Datasets.jsx`)
- Evaluation workspace → HTTP API client: requests data (evidence: `frontend/src/pages/Evaluations.jsx`)
- Execution history → HTTP API client: requests data (evidence: `frontend/src/pages/Executions.jsx`)
- Schedule workspace → HTTP API client: requests data (evidence: `frontend/src/pages/Schedules.jsx`)
- Analytics dashboard → HTTP API client: requests data
- Trace explorer → HTTP API client: requests data
- HTTP API client → FastAPI application: calls API
- FastAPI application → Agent routes: mounts router (evidence: `backend/app/main.py`)
- FastAPI application → Dataset routes: mounts router (evidence: `backend/app/main.py`)
- FastAPI application → Evaluation routes: mounts router (evidence: `backend/app/main.py`)
- FastAPI application → Schedule routes: mounts router (evidence: `backend/app/main.py`)
- Agent routes → Agent execution: executes agents (evidence: `backend/app/api/agents.py`)
- Agent execution → Mock support agent: runs agent (evidence: `backend/app/services/agent_service.py`)
- Evaluation routes → Evaluation engine: runs evaluations (evidence: `backend/app/api/evaluations.py`)
- Evaluation routes → Reliability metrics: requests metrics (evidence: `backend/app/api/evaluations.py`)
- Evaluation routes → Run comparison: compares runs (evidence: `backend/app/api/evaluations.py`)
- Evaluation routes → Quality gate: checks gate (evidence: `backend/app/api/evaluations.py`)
- Evaluation engine → Agent execution: executes prompts (evidence: `backend/app/services/evaluation_service.py`)
- Schedule routes → Schedule execution: manages schedules
- FastAPI application → Benchmark scheduler: starts loop (evidence: `backend/app/main.py`)
- Benchmark scheduler → Schedule execution: runs due work
- Schedule execution → Evaluation engine: runs benchmark (evidence: `backend/app/services/schedule_service.py`)
- Schedule execution → Quality gate: checks result (evidence: `backend/app/services/schedule_service.py`)
- Quality gate → Run comparison: compares baseline (evidence: `backend/app/services/quality_gate_service.py`)
- Quality gate → Evaluation engine: loads run (evidence: `backend/app/services/quality_gate_service.py`)
- Dataset routes → Dataset management: manages datasets
- Agent execution → SQLite database: persists executions (evidence: `backend/app/services/agent_service.py`)
- Evaluation engine → SQLite database: persists runs (evidence: `backend/app/services/evaluation_service.py`)
- Reliability metrics → Application records: queries records (evidence: `backend/app/services/metrics_service.py`)
- Schedule execution → Schedule records: stores schedules (evidence: `backend/app/services/schedule_service.py`)
- Schedule execution → Application records: reads datasets (evidence: `backend/app/services/schedule_service.py`)
- FastAPI application → SQLite database: creates tables (evidence: `backend/app/main.py`)
