MineOps is an AI-native mining operations platform built on a reliable industrial telemetry foundation. It combines two end-to-end loops:
Data loop:
Fleet simulator -> MQTT -> ingestion -> PostgreSQL -> FastAPI
Decision loop:
Operator goal -> Operations Copilot -> read-only tools -> evidence
-> structured findings -> approval-gated action
The project is intentionally more than a chatbot over sensor data. The model participates in the operational workflow, but deterministic services remain the source of truth and people retain authority over consequential actions.
The telemetry platform provides:
- schema-validated mining fleet events
- idempotent ingestion using a stable
event_id - protection against out-of-order events regressing latest device state
- in-memory demo and PostgreSQL/MQTT service profiles
- REST endpoints for latest state and device history
The Operations Copilot provides:
- natural-language investigation goals
- model-selected, read-only fleet and history tools
- evidence IDs attached to every finding and proposed action
- Pydantic-validated structured output
- explicit human approval or rejection for operational actions
- run metadata for provider, model, latency, tool traces, and token usage
- deterministic regression evals that run without network access
- optional GPT-5.5 integration through the OpenAI Responses API
make setup
make demoOpen:
- API documentation: http://127.0.0.1:8000/docs
- health and event count: http://127.0.0.1:8000/health
- latest device state: http://127.0.0.1:8000/api/v1/devices
Create an investigation:
curl -s http://127.0.0.1:8000/api/v1/copilot/investigations \
-H 'content-type: application/json' \
-d '{"goal":"Find unsafe equipment and recommend the next action."}'The default deterministic provider keeps the full workflow runnable in CI and
portfolio demos. It uses the same tools, evidence contract, report schema, and
approval boundary as the hosted model path.
Set these environment variables before starting the API:
export MINEOPS_COPILOT_PROVIDER=openai
export MINEOPS_OPENAI_API_KEY=your_api_key
export MINEOPS_OPENAI_MODEL=gpt-5.5
export MINEOPS_OPENAI_REASONING_EFFORT=low
make demoThe model can decide which read-only tool to call and in what order. It cannot directly isolate equipment, shut down a process, dispatch a worker, or create a maintenance ticket. It can only propose those actions for a separate human decision endpoint.
Do not commit API keys or place them in telemetry, prompts, or tool outputs.
MineOps treats AI as a bounded decision component rather than a presentation feature:
- The input is an operator goal, not a fixed query form.
- The agent chooses tools against live operational state.
- Deterministic tools own calculations and data access.
- Findings must cite tool-produced evidence.
- Output is a typed contract, not free-form prose.
- Consequential actions stop at a human approval boundary.
- Traces and evals measure behavior across model or prompt changes.
- The system still degrades to a useful local provider when the model is unavailable.
See AI-native scorecard and ADR 0002.
Use the Chinese step-by-step learning guide as the main study entry. It teaches the non-AI telemetry path first, then the AI tools, agent orchestration, evidence validation, approval workflow, and evaluations.
The learning guide is for understanding the current code. The roadmap is for building future milestones after the current system is understood.
make test
make lintThe copilot regression suite covers critical, warning, and normal fleet scenarios. Online model evals are deliberately separate because they incur cost and require credentials.
After installing Docker Desktop:
docker compose up --buildThis starts:
simulator: publishes mine fleet telemetrymqtt: Eclipse Mosquitto brokeringest: validates and writes MQTT eventspostgres: stores event history and latest device stateapi: exposes telemetry queries and the copilot workflow
The local Mosquitto configuration is intentionally unauthenticated for development. Do not deploy it to a public network.
src/mineops/
api.py FastAPI service and workflow endpoints
copilot/
agent.py local and OpenAI agent providers
models.py typed reports, evidence, traces, and approvals
service.py run state and human decision boundary
tools.py deterministic read-only operations tools
ingest.py MQTT ingestion service
models.py telemetry contract
repository.py in-memory and PostgreSQL persistence
simulator.py deterministic fleet simulator
db/schema.sql initial database schema
tests/ unit, API, and copilot regression evals
docs/ roadmap, scorecard, and architecture decisions
- Persist copilot runs, evidence, and approval decisions in PostgreSQL.
- Add authenticated operator/supervisor roles and policy-configured actions.
- Build a larger eval dataset and compare model quality, latency, and cost.
- Add TimescaleDB, PostGIS, geofences, and trajectory tools.
- Add edge buffering, replay, and network-failure investigations.
- Deploy to Azure with OpenTelemetry, GitHub Actions, and Terraform.
Start with the step-by-step learning guide, then use the roadmap for future milestones. Resume claims should describe only completed and verified behavior.