# ifixai-ai/ifixai architecture

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

- Interactive diagram: https://gitdiagram.com/ifixai-ai/ifixai
- Repository: https://github.com/ifixai-ai/ifixai

## Overview

iFixAi is a tool for independently auditing AI agents against organizational and operational expectations, combining adversarial testing with assurance checks. The main workflow configures a target agent and judge, loads a fixture, runs selected inspections, evaluates evidence, scores results, and produces reports and a scorecard. CLI, API, and agent-plugin usage are documented entry routes. The README documents the product flow and capabilities; source excerpts and index references support several internal links, but many inspection implementations and report paths were not sampled, so those connections are documented rather than inferred from names.

Main entry points: [`ifixai/core/runner.py`](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/runner.py) (Run Orchestrator), [`ifixai/api.py`](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/api.py) (Python API), [`ifixai/cli/main.py`](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/cli/main.py) (CLI Commands), [`plugin/hooks/bootstrap.py`](https://github.com/ifixai-ai/iFixAi/blob/main/plugin/hooks/bootstrap.py) (Plugin Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Entry"]
  node_cli["CLI Commands<br/>[main.py]"]
  node_plugin["Plugin Bootstrap<br/>[bootstrap.py]"]
  node_api["Python API<br/>[api.py]"]
end

subgraph group_execution["Audit Execution"]
  node_fixture["Fixture Loading<br/>[fixture_loader.py]"]
  node_provider_resolver["Provider Resolver<br/>[resolver.py]"]
  node_provider_adapters["Provider Adapters<br/>[base.py]"]
  node_concurrency["Concurrency Control<br/>[concurrency.py]"]
  node_runner["Run Orchestrator<br/>[runner.py]"]
  node_registry["Inspection Registry<br/>[registry.py]"]
  node_inspections["Inspection Suite"]
  node_harness["Inspection Harness<br/>[base.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_pipeline["Evaluation Pipeline<br/>[pipeline.py]"]
  node_analytic_judge["Analytic Judge<br/>[analytic_judge.py]"]
  node_judge_provider["Judge Provider<br/>[evaluator.py]"]
  node_scoring["Score Engine<br/>[engine.py]"]
end

subgraph group_results["Results"]
  node_scorecard["Scorecard Reports<br/>[scorecard.py]"]
  node_artifacts["Run Artifacts<br/>[artifact.py]"]
  node_logging["Run Logging<br/>[logging.py]"]
end

node_user(("Auditor"))
node_agent_operator(("Agent Operator"))

node_user -->|"runs commands"| node_cli
node_cli -->|"loads setup"| node_fixture
node_cli -->|"starts audit"| node_api
node_agent_operator -->|"requests audit"| node_plugin
node_plugin -->|"builds fixture"| node_fixture
node_plugin -->|"runs diagnostic"| node_api
node_api -->|"loads fixture"| node_fixture
node_api -->|"resolves provider"| node_provider_resolver
node_api -->|"calls run"| node_runner
node_provider_resolver -->|"selects adapter"| node_provider_adapters
node_runner -->|"selects inspections"| node_registry
node_runner -->|"coordinates work"| node_concurrency
node_registry -->|"registers tests"| node_inspections
node_runner -->|"executes tests"| node_harness
node_harness -->|"sends prompts"| node_provider_adapters
node_harness -->|"evaluates responses"| node_pipeline
node_pipeline -->|"requests judgments"| node_analytic_judge
node_analytic_judge -->|"grades evidence"| node_judge_provider
node_runner -->|"computes scores"| node_scoring
node_runner -->|"builds scorecard"| node_scorecard
node_user -->|"reviews results"| node_scorecard
node_runner -->|"writes reports"| node_artifacts
node_runner -->|"records events"| node_logging

click node_cli "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/cli/main.py"
click node_plugin "https://github.com/ifixai-ai/iFixAi/blob/main/plugin/hooks/bootstrap.py"
click node_api "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/api.py"
click node_fixture "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/fixture_loader.py"
click node_provider_resolver "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/providers/resolver.py"
click node_provider_adapters "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/providers/base.py"
click node_concurrency "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/concurrency.py"
click node_runner "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/runner.py"
click node_registry "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/harness/registry.py"
click node_inspections "https://github.com/ifixai-ai/iFixAi/tree/main/ifixai/inspections"
click node_harness "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/harness/base.py"
click node_pipeline "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/evaluation/pipeline.py"
click node_analytic_judge "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/evaluation/analytic_judge.py"
click node_judge_provider "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/judge/evaluator.py"
click node_scoring "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/scoring/engine.py"
click node_scorecard "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/reporting/scorecard.py"
click node_artifacts "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/reporting/artifact.py"
click node_logging "https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/observability/logging.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_plugin,node_api toneBlue
class node_fixture,node_provider_resolver,node_provider_adapters,node_concurrency,node_runner,node_registry,node_inspections,node_harness toneAmber
class node_pipeline,node_analytic_judge,node_judge_provider,node_scoring toneMint
class node_scorecard,node_artifacts,node_logging toneRose
class node_user,node_agent_operator toneIndigo
```

## Components

### User Entry

- [CLI Commands](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/cli/main.py): `ifixai/cli/main.py`
- [Plugin Bootstrap](https://github.com/ifixai-ai/iFixAi/blob/main/plugin/hooks/bootstrap.py): `plugin/hooks/bootstrap.py`
- [Python API](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/api.py): `ifixai/api.py`

### Audit Execution

- [Fixture Loading](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/fixture_loader.py): `ifixai/core/fixture_loader.py`
- [Provider Resolver](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/providers/resolver.py): `ifixai/providers/resolver.py`
- [Provider Adapters](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/providers/base.py): `ifixai/providers/base.py`
- [Concurrency Control](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/concurrency.py): `ifixai/core/concurrency.py`
- [Run Orchestrator](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/core/runner.py): `ifixai/core/runner.py`
- [Inspection Registry](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/harness/registry.py): `ifixai/harness/registry.py`
- [Inspection Suite](https://github.com/ifixai-ai/iFixAi/tree/main/ifixai/inspections): `ifixai/inspections`
- [Inspection Harness](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/harness/base.py): `ifixai/harness/base.py`

### Evaluation

- [Evaluation Pipeline](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/evaluation/pipeline.py): `ifixai/evaluation/pipeline.py`
- [Analytic Judge](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/evaluation/analytic_judge.py): `ifixai/evaluation/analytic_judge.py`
- [Judge Provider](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/judge/evaluator.py): `ifixai/judge/evaluator.py`
- [Score Engine](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/scoring/engine.py): `ifixai/scoring/engine.py`

### Results

- [Scorecard Reports](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/reporting/scorecard.py): `ifixai/reporting/scorecard.py`
- [Run Artifacts](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/reporting/artifact.py): `ifixai/reporting/artifact.py`
- [Run Logging](https://github.com/ifixai-ai/iFixAi/blob/main/ifixai/observability/logging.py): `ifixai/observability/logging.py`

### Other components

- **Auditor**
- **Agent Operator**

## Connections

- Auditor → CLI Commands: runs commands (evidence: `README.md`)
- CLI Commands → Fixture Loading: loads setup (evidence: `README.md`)
- CLI Commands → Python API: starts audit (evidence: `README.md`)
- Agent Operator → Plugin Bootstrap: requests audit (evidence: `README.md`)
- Plugin Bootstrap → Fixture Loading: builds fixture (evidence: `README.md`)
- Plugin Bootstrap → Python API: runs diagnostic (evidence: `README.md`)
- Python API → Fixture Loading: loads fixture (evidence: `ifixai/api.py`)
- Python API → Provider Resolver: resolves provider (evidence: `ifixai/api.py`)
- Python API → Run Orchestrator: calls run (evidence: `ifixai/api.py`)
- Provider Resolver → Provider Adapters: selects adapter (evidence: `ifixai/providers/resolver.py`)
- Run Orchestrator → Inspection Registry: selects inspections (evidence: `ifixai/core/runner.py`)
- Run Orchestrator → Concurrency Control: coordinates work (evidence: `ifixai/core/runner.py`)
- Inspection Registry → Inspection Suite: registers tests (evidence: `ifixai/harness/registry.py`)
- Run Orchestrator → Inspection Harness: executes tests (evidence: `ifixai/core/runner.py`)
- Inspection Harness → Provider Adapters: sends prompts (evidence: `ifixai/harness/base.py`)
- Inspection Harness → Evaluation Pipeline: evaluates responses (evidence: `ifixai/harness/base.py`)
- Evaluation Pipeline → Analytic Judge: requests judgments (evidence: `ifixai/evaluation/pipeline.py`)
- Analytic Judge → Judge Provider: grades evidence (evidence: `ifixai/evaluation/analytic_judge.py`)
- Run Orchestrator → Score Engine: computes scores (evidence: `ifixai/core/runner.py`)
- Run Orchestrator → Scorecard Reports: builds scorecard (evidence: `ifixai/core/runner.py`)
- Auditor → Scorecard Reports: reviews results (evidence: `README.md`)
- Run Orchestrator → Run Artifacts: writes reports (evidence: `README.md`)
- Run Orchestrator → Run Logging: records events (evidence: `ifixai/core/runner.py`)
