Multi-agent drilling operations advisor built on Akka SDK. Simulates a Permian Basin rig (PB-2847) with five coordinating agents that monitor telemetry, detect hazards, optimize parameters, enforce human-in-the-loop approval gates, and produce shift reports — all with a tamper-evident SHA-256 hash-chained coordination log.
- Java 21+
- Maven 3.9+
- Akka CLI installed with download token configured
# Compile
mvn compile
# Run tests
mvn test
# Start service locally
mvn compile exec:javaOpen http://localhost:9000 in your browser, then click Start Scenario to watch the 8-phase demo.
# Start simulation (speed in ticks, default 100)
curl -X POST http://localhost:9000/api/simulation/start \
-H "Content-Type: application/json" -d '{"speed": 90}'
# Check simulation status
curl http://localhost:9000/api/simulation/status
# Stream coordination events (paginated)
curl "http://localhost:9000/api/simulation/stream?after=0&limit=50"
# Dashboard state (sensors, KPIs, hazard severity)
curl http://localhost:9000/api/dashboard/
# Rig entity state
curl http://localhost:9000/api/operations/PB-2847-20260329-120000
# Submit HITL decision (used internally by simulation)
curl -X POST http://localhost:9000/api/hitl/rec-001/decide \
-H "Content-Type: application/json" \
-d '{"decision":"APPROVED","approverIdentity":"J. Smith","justification":"Within safe limits"}'The simulation runs through 8 phases in ~10 seconds:
- Normal Operations — Steady-state drilling, baseline telemetry
- ROP Below Offset — Analysis detects underperformance, optimization recommends WOB increase
- Formation Transition — Wolfcamp A to B, optimization pauses, enhanced approval required
- Post-Transition Stabilization — Conservative parameters, recalibration
- Developing Hazard — Pit volume creep, WATCH severity
- Kick Indicators — Gas spike, WARNING then CRITICAL severity
- Containment — Runtime HALT, recommendations withdrawn, supervisor clearance
- Clearance & Resume — Conservative restart, shift report generated
src/main/java/com/example/drilling/
domain/ 19 records, enums, sealed interfaces (pure Java)
application/ RigEntity, DrillingOperationEntity, ScenarioOrchestrator
agents/ 5 deterministic mock agents + AgentMock interface
api/ 6 HTTP endpoints
src/main/resources/
static-resources/ Dashboard UI (HTML, CSS, JS)
application.conf Service configuration
src/test/java/com/example/drilling/
domain/ Hash chain verification tests
application/ Entity unit tests (EventSourcedTestKit)
- Hash-chained audit trail — Every coordination event linked by SHA-256 hash
- Hazard escalation — NORMAL to WATCH to WARNING to CRITICAL with automatic halt
- HITL approval gates — Optimization recommendations require driller approval before execution
- Rubber-stamp detection — Fast approvals flagged when review duration below threshold
- Runtime halt/containment — CRITICAL hazards trigger immediate halt with recommendation withdrawal
- Formation transition coordination — Multi-agent response with enhanced approval requirements
- Scope enforcement — Agents blocked from operating outside declared boundaries