Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ repos:
rev: v1.7.7
hooks:
- id: docformatter
language_version: python3.12
args: [
--in-place,
--wrap-summaries=0, # 0 means disable wrap
Expand Down
68 changes: 68 additions & 0 deletions ManufacturingAgentSuite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ManufacturingAgentSuite

`ManufacturingAgentSuite` is a proposed OPEA GenAIExamples blueprint for
route-isolated industrial action-card agents.

The example demonstrates how one Gateway and Manufacturing Megaservice can
route plant-floor evidence to five governed manufacturing workflows:

| Route | Workflow | Output target |
| ------------- | ---------------------------------------------- | ------------------------ |
| `maintenance` | Predictive maintenance / lao-shi-fu escalation | `maintenance_work_order` |
| `iqc` | Incoming and in-process quality control | `qms_quality_event` |
| `changeover` | SKU changeover verification | `changeover_checklist` |
| `wi` | Released work-instruction guidance | `wi_reference` |
| `hazard` | EHS hazard observation | `ehs_case` |

## Architecture

```text
Plant evidence
-> Gateway
-> Manufacturing Megaservice
-> route registry: maintenance / iqc / changeover / wi / hazard
-> route-specific source evidence
-> deterministic evaluator
-> guardrails
-> bounded action card
```

The full WearEdge reference implementation also includes Qdrant RAG, OPEA
embedding profiles, an official OPEA TEI path, benchmark evidence, and a browser
demo console:

```text
https://github.com/davidmillerak2026-sys/wearedge-opea-manufacturing
```

## Quick Start On Xeon

```bash
cd ManufacturingAgentSuite/docker_compose/intel/cpu/xeon
docker compose up -d
curl http://localhost:8899/v1/agents
curl http://localhost:8899/v1/agents/maintenance/demo
curl http://localhost:8899/v1/scorecard
```

Optional OPEA TEI profile:

```bash
docker compose -f compose.yaml -f compose.opea-tei.yaml up -d
```

## Endpoints

| Endpoint | Purpose |
| ------------------------------ | ----------------------------------------------- |
| `GET /healthz` | Service health and configured embedding profile |
| `GET /v1/agents` | Route registry |
| `GET /v1/agents/{mode}/demo` | Fixed demo request and bounded action card |
| `POST /v1/agents/{mode}/infer` | Route-specific inference contract |
| `GET /v1/scorecard` | Five-route validation scorecard |

## Guardrail Boundary

The example must not claim autonomous restart, quality release, maintenance
release, safety clearance, final root cause, customer acceptance, or remaining
useful life. Restricted decisions remain human-confirmed.
33 changes: 33 additions & 0 deletions ManufacturingAgentSuite/assets/flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ManufacturingAgentSuite Flow

```mermaid
flowchart LR
Evidence["Plant-floor evidence"] --> Gateway["Gateway"]
Gateway --> Mega["Manufacturing Megaservice"]
Mega --> Registry["Route registry"]
Registry --> Maintenance["maintenance"]
Registry --> IQC["iqc"]
Registry --> Changeover["changeover"]
Registry --> WI["wi"]
Registry --> Hazard["hazard"]
Maintenance --> Eval["Evaluator"]
IQC --> Eval
Changeover --> Eval
WI --> Eval
Hazard --> Eval
Eval --> Guardrails["Guardrails"]
Guardrails --> Action["Bounded action card"]
```

OPEA component mapping:

| OPEA concept | ManufacturingAgentSuite role |
| ------------- | ---------------------------------------------------------------- |
| Gateway | Plant evidence/API entry point |
| Megaservice | Route orchestration |
| Dataprep | Route-specific manuals, quality plans, policies, and checklists |
| Retriever/RAG | Source-grounded evidence retrieval in the full reference package |
| Vector DB | Qdrant profile in the full reference package |
| LLM service | Pluggable LLM adapter; deterministic path for CI |
| Guardrails | Blocked claims and human-confirmation gates |
| Evaluation | Route scorecard |
26 changes: 26 additions & 0 deletions ManufacturingAgentSuite/benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ManufacturingAgentSuite Benchmark Notes

The first PR benchmark should remain CI-friendly:

```bash
cd ManufacturingAgentSuite/docker_compose/intel/cpu/xeon
docker compose up -d
../../../../tests/test_compose_on_xeon.sh
```

The reference WearEdge package includes deeper evidence:

- Intel Xeon AVX-512/AMX deterministic five-route CPU benchmark.
- Google Cloud C3 Docker/Qdrant fresh-clone E2E.
- Google Cloud C3 OPEA-compatible embedding profile E2E.
- Google Cloud C3 official OPEA TEI profile E2E.

Reference evidence:

```text
https://github.com/davidmillerak2026-sys/wearedge-opea-manufacturing/tree/main/evidence/benchmarks
```

Do not use this first PR to claim production LLM acceleration. The current
hardware evidence is for the deterministic route pipeline and official OPEA TEI
embedding path.
53 changes: 53 additions & 0 deletions ManufacturingAgentSuite/docker_compose/intel/cpu/xeon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Deploying ManufacturingAgentSuite on Intel Xeon

This directory contains a minimal Docker Compose deployment for the proposed
`ManufacturingAgentSuite` OPEA example.

## Start

```bash
docker compose up -d
```

## Validate

```bash
curl http://localhost:8899/healthz
curl http://localhost:8899/v1/agents
curl http://localhost:8899/v1/agents/maintenance/demo
curl http://localhost:8899/v1/scorecard
```

Expected scorecard result:

```json
{
"ok": true,
"routes": [
{ "mode": "maintenance", "status": "pass" },
{ "mode": "iqc", "status": "pass" },
{ "mode": "changeover", "status": "pass" },
{ "mode": "wi", "status": "pass" },
{ "mode": "hazard", "status": "pass" }
]
}
```

## Optional OPEA TEI Profile

```bash
docker compose -f compose.yaml -f compose.opea-tei.yaml up -d
```

This starts Hugging Face TEI and the OPEA embedding microservice pattern with:

```text
TEI_EMBEDDING_ENDPOINT=http://tei-embedding-service:80
EMBEDDING_COMPONENT_NAME=OPEA_TEI_EMBEDDING
```

## Stop

```bash
docker compose down
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (C) 2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

services:
manufacturing-agent-suite:
environment:
OPEA_EXAMPLE_PROFILE: opea-tei
OPEA_EMBEDDING_PROFILE: opea-tei
OPEA_EMBEDDING_URL: http://embedding:6000/v1/embeddings
depends_on:
qdrant:
condition: service_started
embedding:
condition: service_started

tei-embedding-service:
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.7
container_name: manufacturing-agent-suite-tei-embedding
ports:
- "6006:80"
volumes:
- "${MODEL_CACHE:-./data}:/data"
shm_size: 1g
command: --model-id ${EMBEDDING_MODEL_ID:-BAAI/bge-base-en-v1.5} --auto-truncate
restart: unless-stopped

embedding:
image: ${REGISTRY:-opea}/embedding:${TAG:-latest}
container_name: manufacturing-agent-suite-embedding
depends_on:
tei-embedding-service:
condition: service_started
ports:
- "6000:6000"
environment:
TEI_EMBEDDING_ENDPOINT: http://tei-embedding-service:80
EMBEDDING_COMPONENT_NAME: OPEA_TEI_EMBEDDING
HF_TOKEN: ${HF_TOKEN:-}
LOGFLAG: ${LOGFLAG:-False}
restart: unless-stopped
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (C) 2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

services:
manufacturing-agent-suite:
image: python:3.12-slim
container_name: manufacturing-agent-suite
working_dir: /app
command: python /app/manufacturing_agent_suite.py
ports:
- "8899:8899"
environment:
OPEA_EXAMPLE_PROFILE: deterministic
OPEA_VECTOR_BACKEND: qdrant-profile
OPEA_EMBEDDING_PROFILE: deterministic
volumes:
- "../../../../manufacturing_agent_suite.py:/app/manufacturing_agent_suite.py:ro"
depends_on:
qdrant:
condition: service_started
restart: unless-stopped

qdrant:
image: qdrant/qdrant:v1.12.6
container_name: manufacturing-agent-suite-qdrant
ports:
- "6333:6333"
- "6334:6334"
restart: unless-stopped

networks:
default:
driver: bridge
Loading
Loading