# r123singh/agnetic-manufacturing architecture

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

- Interactive diagram: https://gitdiagram.com/r123singh/agnetic-manufacturing
- Repository: https://github.com/r123singh/agnetic-manufacturing

## Overview

This repository provides a simulated manufacturing-optimization system, with basic and advanced command-line runs, plus a separate marketing website. The main workflow generates plant data, checks advanced-system health, asks reporting, optimization, and coordination agents to analyze a shared task, then prints their responses. The README also describes compliance reporting, predictive maintenance, alerting, and escalation; these are agent responsibilities or documented capabilities, not evidence of a separate live manufacturing integration. The website excerpt shows form interaction and analytics tracking, but not a form-processing backend. Edges reflect shown calls or documented behavior; unsampled implementation details are not inferred.

Main entry points: [`advanced-system.js`](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js) (Advanced Runner), [`index.js`](https://github.com/r123singh/agnetic-manufacturing/blob/main/index.js) (Basic Runner), [`marketing-website/script.js`](https://github.com/r123singh/agnetic-manufacturing/blob/main/marketing-website/script.js) (Page Interactions), [`marketing-website/index.html`](https://github.com/r123singh/agnetic-manufacturing/blob/main/marketing-website/index.html) (Marketing Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_manufacturing["Manufacturing Runtime"]
  node_basic["Basic Runner<br/>[index.js]"]
  node_advanced["Advanced Runner<br/>[advanced-system.js]"]
  node_simulator["Data Simulator<br/>[advanced-system.js]"]
  node_monitor["Health Monitor<br/>[advanced-system.js]"]
end

subgraph group_agents["Agent Roles"]
  node_content["Content Agent<br/>[advanced-system.js]"]
  node_decision["Decision Agent<br/>[advanced-system.js]"]
  node_hybrid["Hybrid Agent<br/>[advanced-system.js]"]
end

subgraph group_website["Marketing Website"]
  node_web["Marketing Page<br/>[index.html]"]
  node_webscript["Page Interactions<br/>[script.js]"]
end

subgraph group_integrations["External Services"]
  node_openai{{"OpenAI Agents SDK"}}
  node_analytics{{"Web Analytics"}}
end

node_operator(("Operator"))

node_operator -->|"runs basic"| node_basic
node_operator -->|"runs advanced"| node_advanced
node_advanced -->|"generates data"| node_simulator
node_advanced -->|"checks health"| node_monitor
node_advanced -->|"runs report"| node_content
node_advanced -->|"runs optimization"| node_decision
node_advanced -->|"runs coordination"| node_hybrid
node_basic -->|"calls agents"| node_openai
node_advanced -->|"calls agents"| node_openai
node_web -.->|"uses interactions"| node_webscript
node_webscript -->|"tracks events"| node_analytics

click node_basic "https://github.com/r123singh/agnetic-manufacturing/blob/main/index.js"
click node_advanced "https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js"
click node_simulator "https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js"
click node_monitor "https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js"
click node_content "https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js"
click node_decision "https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js"
click node_hybrid "https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js"
click node_web "https://github.com/r123singh/agnetic-manufacturing/blob/main/marketing-website/index.html"
click node_webscript "https://github.com/r123singh/agnetic-manufacturing/blob/main/marketing-website/script.js"

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_basic,node_advanced,node_simulator,node_monitor toneBlue
class node_content,node_decision,node_hybrid toneAmber
class node_web,node_webscript toneMint
class node_openai,node_analytics toneRose
class node_operator toneIndigo
```

## Components

### Manufacturing Runtime

- [Basic Runner](https://github.com/r123singh/agnetic-manufacturing/blob/main/index.js): `index.js`
- [Advanced Runner](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js): `advanced-system.js`
- [Data Simulator](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js): `advanced-system.js`
- [Health Monitor](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js): `advanced-system.js`

### Agent Roles

- [Content Agent](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js): `advanced-system.js`
- [Decision Agent](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js): `advanced-system.js`
- [Hybrid Agent](https://github.com/r123singh/agnetic-manufacturing/blob/main/advanced-system.js): `advanced-system.js`

### Marketing Website

- [Marketing Page](https://github.com/r123singh/agnetic-manufacturing/blob/main/marketing-website/index.html): `marketing-website/index.html`
- [Page Interactions](https://github.com/r123singh/agnetic-manufacturing/blob/main/marketing-website/script.js): `marketing-website/script.js`

### External Services

- **OpenAI Agents SDK**
- **Web Analytics**

### Other components

- **Operator**

## Connections

- Operator → Basic Runner: runs basic (evidence: `README.md`)
- Operator → Advanced Runner: runs advanced (evidence: `README.md`)
- Advanced Runner → Data Simulator: generates data (evidence: `advanced-system.js`)
- Advanced Runner → Health Monitor: checks health (evidence: `advanced-system.js`)
- Advanced Runner → Content Agent: runs report (evidence: `advanced-system.js`)
- Advanced Runner → Decision Agent: runs optimization (evidence: `advanced-system.js`)
- Advanced Runner → Hybrid Agent: runs coordination (evidence: `advanced-system.js`)
- Basic Runner → OpenAI Agents SDK: calls agents (evidence: `index.js`)
- Advanced Runner → OpenAI Agents SDK: calls agents (evidence: `advanced-system.js`)
- Marketing Page → Page Interactions: uses interactions
- Page Interactions → Web Analytics: tracks events (evidence: `marketing-website/script.js`)
