How lin891020/aoi-agent works
AOI-Agent reduces manual review of flagged circuit-board regions: a re-verifier settles clear cases, while an agent investigates uncertainty and sends unresolved cases to an operator. The same review station also lets supervisors ask production questions and inspect validated plans, charts, and answers. The graph preserves both workflows and the state and records they rely on. Relationships are limited to those documented in the README or visible in the supplied source index and excerpts; unsampled modules are represented only where their subsystem is clear.
Main entry points: flow.py Review flow · graph.py Question workflow · service.py Review service · app.py Station web app
Components 23
Inspection and inference
- AOI simulator
src/aoi_agent/aoi/simulator.py - Re-verifier
src/aoi_agent/vision/inference.py
Review workflow
- Review flow
src/aoi_agent/graph/flow.py - Ollama client
src/aoi_agent/llm/ollama.py - Classification tools
src/aoi_agent/mcp_servers/classify.py - Standards retrieval
src/aoi_agent/mcp_servers/standards.py - Rationale checks
src/aoi_agent/graph/rationale_check.py
Quality records
- Decision provenance
src/aoi_agent/provenance.py - Board records
src/aoi_agent/store/boards.py - Board disposition
src/aoi_agent/store/dispositions.py - Escalation queue
src/aoi_agent/store/escalations.py - SQLite records
src/aoi_agent/store/models.py
Review station
- Station web app
src/aoi_agent/station/app.py - Review service
src/aoi_agent/station/service.py
Production questions
- Question service
src/aoi_agent/analysis/service.py - Question workflow
src/aoi_agent/analysis/graph.py - Plan validation
src/aoi_agent/analysis/plan.py - Question prompts
src/aoi_agent/analysis/prompts.py - Answer validation
src/aoi_agent/analysis/claims.py - Production queries
src/aoi_agent/mcp_servers/production.py - Chart generation
src/aoi_agent/analysis/charts.py
Other components
- Operator
- Supervisor
Connections 28
- Operator → Review flow: submits board
README.md - AOI simulator → Re-verifier: flags candidates
src/aoi_agent/vision/inference.py - Review flow → Re-verifier: classifies with
src/aoi_agent/graph/flow.py - Review flow → Classification tools: calls tools
src/aoi_agent/graph/flow.py - Review flow → Standards retrieval: retrieves criteria
src/aoi_agent/graph/flow.py - Review flow → Ollama client: requests rationale
src/aoi_agent/graph/flow.py - Review flow → Rationale checks: checks rationale
src/aoi_agent/graph/flow.py - Review flow → Decision provenance: stamps decisions
src/aoi_agent/graph/flow.py - Review flow → Operator: escalates uncertainty
README.md - Review service → Review flow: runs and resumes
src/aoi_agent/station/service.py - Review service → Escalation queue: queues cases
src/aoi_agent/station/service.py - Review service → Board records: records decisions
src/aoi_agent/station/service.py - Review service → Decision provenance: records reviewer
src/aoi_agent/station/service.py - Station web app → Review service: serves review
src/aoi_agent/station/app.py - Station web app → Question service: serves questions
src/aoi_agent/station/app.py - Operator → Station web app: reviews queue
README.md - Supervisor → Station web app: asks questions
README.md - Question service → Question workflow: runs workflow
src/aoi_agent/analysis/service.py - Question workflow → Plan validation: validates plans
src/aoi_agent/analysis/graph.py - Question workflow → Question prompts: builds prompts
src/aoi_agent/analysis/graph.py - Question workflow → Chart generation: builds charts
src/aoi_agent/analysis/graph.py - Question workflow → Answer validation: checks answer
src/aoi_agent/analysis/claims.py - Plan validation → Production queries: permits typed lookups
README.md - Question workflow → Ollama client: uses language model
- Board records → SQLite records: reads records
src/aoi_agent/store/boards.py - Board disposition → SQLite records: assesses boards
src/aoi_agent/store/dispositions.py - Escalation queue → SQLite records: stores queue index
src/aoi_agent/store/models.py - Production queries → SQLite records: queries context
src/aoi_agent/mcp_servers/production.py