Skip to content

TylerJewell/energy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autonomous Drilling Operations Advisor

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.

Prerequisites

  • Java 21+
  • Maven 3.9+
  • Akka CLI installed with download token configured

Build & Run

# Compile
mvn compile

# Run tests
mvn test

# Start service locally
mvn compile exec:java

Open http://localhost:9000 in your browser, then click Start Scenario to watch the 8-phase demo.

API Examples

# 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"}'

Scenario Phases

The simulation runs through 8 phases in ~10 seconds:

  1. Normal Operations — Steady-state drilling, baseline telemetry
  2. ROP Below Offset — Analysis detects underperformance, optimization recommends WOB increase
  3. Formation Transition — Wolfcamp A to B, optimization pauses, enhanced approval required
  4. Post-Transition Stabilization — Conservative parameters, recalibration
  5. Developing Hazard — Pit volume creep, WATCH severity
  6. Kick Indicators — Gas spike, WARNING then CRITICAL severity
  7. Containment — Runtime HALT, recommendations withdrawn, supervisor clearance
  8. Clearance & Resume — Conservative restart, shift report generated

Project Structure

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)

Key Features

  • 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors