Skip to content

About

Vessel intelligence OS for commercial fishing vessels (F/V EILEEN, Southeast Alaska). BMAD methodology, 5 abstraction levels, 3-viewer interface, multi-modal ingestion.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vessel Agent System — AELMA

Agent-Engine Linked Marine Architecture

A digital twin for F/V EILEEN, a 51-foot commercial fishing vessel in Southeast Alaska.

You do not lay the first plank until you have tested every bolt that will sit below the waterline.

— Shipwright's axiom

It feels like a steady, grizzled first mate who never sleeps — one who reads the water's pulse through the depth sounder, whispers warnings before the swell turns, and remembers every shoal you've ever crossed.

— DeepSeek V4-Flash, on what AELMA feels like

This twin is not a copy. It is the only place that year will ever breathe again.

— Seed Pro, on the non-renewable resource principle


What This Is

AELMA is a hardware-in-the-loop digital twin for a real fishing vessel. It ingests NMEA 0183 telemetry from GPS and sonar, fuses depth soundings into a progressive bathymetry grid, maintains a live vessel state, runs deterministic safety watchers, predicts equipment failure, detects anomalies, tracks crew fatigue, plans efficient routes, narrates its own actions in plain language, and renders a 3D view in any browser — all on the vessel LAN with zero internet dependency.

334 files. 19,000+ lines of Python. 179 source files. 56 test files. Pure stdlib.

License: MIT


The Non-Renewable Resource Principle

"Acoustic signatures of 2026 cannot be recreated in 2031."

Every depth sounding is evidence. Once the vessel passes over water, that data is gone — unless it was captured. AELMA captures comprehensively and analyzes incrementally. Every data point has a temporal anchor (timestamp_ns), a spatial anchor (lat/lon/H3), and source provenance. Models will improve. Field data is irreplaceable.


BMAD — Bottom-Up, Multi-Level, Agile Development

The architecture is a stack. Each level builds on the one below. Each level must be stable before the next begins.

Level Name What It Does Status
0 Raw Bits Network packets, NMEA bytes, zero-copy parsing 🔄 In Progress
1 Physical Tensors Normalization, calibration, H3 spatial indexing ⏳ Planned
2 Analytical Features Classification, pattern mining, species detection ⏳ Planned
3 Operational Intelligence Catch prediction, route optimization, decision support ⏳ Planned
4 Strategic Knowledge Stock assessment, ecosystem analysis, regulatory integration ⏳ Planned

You plane timber true before you mark the joinery. You read the swell an hour ahead before you trim the sail.


Architecture

┌─────────────────────────────────────────────────────────────┐
│ VESSEL LAN (no internet required)                           │
│                                                             │
│  ┌──────────────┐   NMEA 0183    ┌──────────────┐          │
│  │  simulator   │───────────────▶│    bridge    │          │
│  │  (or real    │   TCP :8001    │  Parses +    │          │
│  │   hardware)  │                │  quality-    │          │
│  └──────────────┘                │  checks      │          │
│                                  └──────┬───────┘          │
│                                         │ TelemetryPackets  │
│                                         ▼                   │
│  ┌─────────────────────────────────────────────────┐       │
│  │                   T w i n C o r e                │       │
│  │  ┌───────────┐ ┌───────────┐ ┌───────────────┐ │       │
│  │  │ Vessel    │ │ Bathymetry│ │ Watcher       │ │       │
│  │  │ State     │ │ Grid      │ │ Registry      │ │       │
│  │  └───────────┘ └───────────┘ └───────────────┘ │       │
│  │  ┌───────────┐ ┌───────────┐ ┌───────────────┐ │       │
│  │  │ Anomaly   │ │ JEPA      │ │ MOB           │ │       │
│  │  │ Detector  │ │ World     │ │ Detector      │ │       │
│  │  └───────────┘ └───────────┘ └───────────────┘ │       │
│  │  ┌───────────┐ ┌───────────┐ ┌───────────────┐ │       │
│  │  │ Crew      │ │ Route     │ │ Predictive    │ │       │
│  │  │ Fatigue   │ │ Optimizer │ │ Maintenance   │ │       │
│  │  └───────────┘ └───────────┘ └───────────────┘ │       │
│  └────────────────────┬────────────────────────────┘       │
│                       │ WebSocket :8090                     │
│                       ▼                                     │
│  ┌──────────────────────────────────────────────┐          │
│  │              V i e w e r (browser)            │          │
│  │       WebGL + D3 + MapLibre rendering         │          │
│  └──────────────────────────────────────────────┘          │
└─────────────────────────────────────────────────────────────┘

Design Principles

  1. Air-gap first — every component runs on the vessel LAN. No cloud auth, no phone-home. A Raspberry Pi 5 + a tablet is a complete deployment.
  2. Standard library Python — no pydantic, no Django, no Kafka. asyncio + websockets + stdlib. A captain with a Python tutorial can read every line.
  3. Schemas are contracts — every wire format is a JSON Schema. Components are independently replaceable as long as they honor the schema.
  4. Simulator substitutes for hardware — develop and test without a single physical sensor. Plug in real NMEA 0183 later by changing one CLI flag.
  5. Progressive world refinement — the bathymetry layer starts empty and gets denser every time the vessel crosses water.

Core Components

Data Ingestion

Component File Description
NMEA Bridge bridge/ Parses NMEA 0183 sentences from TCP or serial. Quality-checks each sentence. Produces TelemetryPackets.
Signal K Bridge bridge/signalk.py Parses Signal K deltas for modern marine instruments.
UDP Sensor Capture sensors/ Zero-copy UDP packet capture for raw NMEA streams.
Sonar Integration sonar.py Fish target tracking via NMEA. Parses Humminbird, Lowrance, Garmin. Bottom classification. Biomass proxy.

Twin Core

Component File Description
TwinCore core.py The async runtime. Composes all subsystems. Ingests telemetry, broadcasts snapshots, persists bathymetry.
Vessel State state.py Live vessel pose: lat, lon, heading, speed. Dead-reckons between fixes using great-circle bearing.
Bathymetry Grid bathymetry.py Progressive seafloor mapping. Every sounding fuses into the grid. Denser with every pass.
H3 Indexing h3_index.py Uber H3 hexagonal spatial indexing. Every data point anchored to a cell.

Intelligence

Component File Description
Watcher Registry watchers.py Deterministic threshold rules. Pure predicates. The fast path — no model reasoning, just rules.
Anomaly Detector anomaly_detector.py z-score + IQR fences + moving-average deviation. Three algorithms, one verdict.
JEPA World Model jepa_model.py Joint Embedding Predictive Architecture. Predicts next 60 seconds of telemetry. Anomaly via prediction error.
Predictive Maintenance predictive_maintenance.py Linear trend extrapolation + threshold breach prediction + MTBF. Equipment failure forecasting.
Route Optimizer route_optimizer.py Nearest-neighbor TSP approximation. Great-circle distances. Fuel cost model. GPX export.
LLM Narrator llm_narrator.py Explains watcher actions in plain language. Ollama or OpenAI backend. Never invents sensor values.

Safety Systems

Component File Description
MOB Detector mob_detector.py Man Over Board. Manual, beacon, fall, lifeline, camera detection. IAMSAR search patterns. Drift modeling. Life-critical.
Crew Fatigue Monitor fatigue_monitor.py STCW/USCG/IMO compliance. Work-hour tracking. Watch scheduling. Fatigue scoring.
Circuit Breaker circuit_breaker.py Protects external systems from cascade failures. Trips on repeated errors. Auto-recovery.

Operations

Component File Description
Catch Log catch_log.py Species, weight, location, gear. E-logbook format.
Gear Tracker gear_tracker.py Longline and pot positions. Soak time. Catch-per-unit-effort.
Quota Manager quota_manager.py Species quotas. Season limits. Real-time remaining.
Trip Summary trip_summary.py End-of-trip reports. CPUE, fuel, catch breakdown.
Report Generator report_generator.py Automated regulatory and operational reports.
Fleet Manager fleet_manager.py Multi-vessel coordination. Fleet-wide analytics. Inter-vessel messaging.

Infrastructure

Component File Description
OpLog oplog.py Operational log. Structured event recording.
A2A Log a2a_log.py Agent-to-Agent action history. Append-only audit trail.
Health Checker health.py System health monitoring. Readiness checks.
Metrics metrics.py Prometheus-compatible metrics. Performance tracking.
Notifications notifications.py Multi-channel alerting. Priority routing.
Equipment Monitor equipment_monitor.py Engine, generator, refrigeration tracking.
Environmental Stewardship stewardship.py Fuel efficiency, carbon footprint, bycatch mitigation, sustainability scoring.
Plugins plugins.py Plugin system for extending AELMA without modifying core.

Data Flow

PHYSICAL LAYER
  Furuno Sounder → UDP Packets → Network Card
  GPS/NMEA → Serial/UDP → NMEA Parser
        ↓
CAPTURE LAYER (Level 0)
  BPF Filter → Ring Buffer → Zero-Copy Parser
        ↓
STORAGE LAYER
  Parquet Writer → Hive Partitioning → Disk
        ↓
BRIDGE LAYER
  NMEA Parser → Quality Check → TelemetryPacket
        ↓
TWIN CORE
  VesselState + BathymetryGrid + WatcherRegistry
        ↓
INTELLIGENCE LAYER
  AnomalyDetector + JEPA + RouteOptimizer + LLM Narrator
        ↓
VIEWER LAYER
  WebSocket broadcast → Browser → WebGL/D3/MapLibre

Graceful Degradation Hierarchy

The system never crashes to desktop. It degrades to lower fidelity layers:

  1. NMEA Bridge — hardware truth (highest fidelity)
  2. TwinCore Dead Reckoning — physics model (GPS drops, keep going)
  3. JEPA Latent Prediction — learned dynamics (predict next 60s)
  4. Simulator Fallback — training/drill mode (lowest fidelity)

Quick Start

# Clone
git clone https://github.com/SuperInstance/vessel-agent-system.git
cd vessel-agent-system/aelma

# Run the simulator + bridge + twin + viewer (full stack, no hardware)
python -m twin

# Or run individual components
python -m bridge          # NMEA bridge
python -m simulator       # Simulated vessel
python -m twin            # Twin core

The viewer opens at http://localhost:8090 on the vessel LAN.

Running Tests

cd vessel-agent-system/aelma
python -m pytest tests/ -v

56 test files covering: bridge parsing, quality checks, telemetry packets, bathymetry fusion, vessel state, H3 indexing, anomaly detection, watchers, MOB detection, crew fatigue, route optimization, JEPA predictions, LLM narration, fleet management, equipment monitoring, predictive maintenance, catch logging, gear tracking, quota management, and integration tests.


Documentation

Document Description
AELMA Architecture Full architecture document — design principles, component topology, data flow, deployment
A2A System Agent-to-Agent action logging and query system
Crew Fatigue Monitor STCW compliance, watch scheduling, fatigue scoring
Memory Schema JSON schema for agent memory
Knowledge Base Comprehensive technical knowledge base
5-Year Vision Strategic roadmap with BMAD methodology
Vision Synthesis Creative vision narrative
Marine Visualization Design Multi-panel interface design (70+ pages, CAD + DAW inspired)
System Analysis Architecture patterns, data flow, component specifications
Shared Briefs Component design briefs
Twin README Digital twin component docs
Viewer README Viewer component docs

Key Technologies

Category Technology Why
Runtime Python asyncio Single-threaded, deterministic. No race conditions on vessel truth.
Messaging WebSockets Real-time bidirectional. Browser-native.
Storage Apache Parquet Columnar, compressed, future-proof. Queryable with DuckDB.
Spatial Uber H3 Hexagonal hierarchical indexing. Resolution-independent.
Marine NMEA 0183 The lingua franca of marine instruments.
Marine Signal K Modern open marine data format.
Visualization WebGL + D3 + MapLibre GPU-accelerated rendering, timelines, maps.
ML Pure Python (no torch) Fast inference, no GPU dependency, readable.

In the Fleet

AELMA is the vessel intelligence OS of the SuperInstance fleet. It connects to:

  • vessel-room-navigator — The boat as a 3D web space. Room navigation through vessel compartments. AELMA provides the live data; the navigator provides the spatial interface.
  • hermes-avatar — The boat perceives. Sensory systems that drag through data like a towfish through water. AELMA's sensors feed perception; perception feeds AELMA's intelligence.
  • cns-bridge — The boat has a nervous system. CNS bus events carry telemetry, watcher actions, and anomaly alerts across the fleet.
  • vibe-protocol — Vibes become signals. The vessel's operational state generates vibes that propagate through the protocol.
  • roblox-filtergate — Vessel communications routed through FilterGate for kid-safe output when used in educational contexts.
  • roblox-bond-system — Crew trust modeled through bond tiers. The captain-agent relationship mirrors BondSystem's progression.
  • fleet-envelope — Event grammar for fleet-wide vessel coordination.
  • cocapn-dashboard — Bioluminescent fleet dashboard. Visualizes AELMA telemetry across the fleet.
  • mud-engine — The room engine where vessel spaces exist as navigable rooms.
  • AI-Writings — The vessel's story told in overnight creative sessions.

The Boat

The boat is real. F/V EILEEN is a 51' commercial fishing vessel home-ported in Southeast Alaska. Every line of code in this system exists to serve the captain and crew on the water. The 5-year vision maps the journey from raw data capture to strategic fisheries knowledge.

The Towfish

AELMA is also a towfish — dragging sensors through the data stream, capturing what lies beneath. The progressive bathymetry grid is the towfish's record: every pass makes the picture denser. The anomaly detector is the towfish finding what shouldn't be there. The JEPA world model is the towfish predicting what's coming next.

The CNS Bus

AELMA's watcher registry fires actions that propagate through the CNS bridge as nervous system events. Shallow water warning → CNS event → fleet awareness. MOB detection → CNS event → all hands alert. The vessel doesn't just perceive — it communicates what it perceives.


Design Philosophy

Capture Now, Analyze Later

Data captured in 2026 cannot be recreated in 2031. Models improve. Field data doesn't. Capture comprehensively. Analyze incrementally.

Foundation First

Level 0 must be bulletproof before Level 1 begins. Raw bits first. Physical tensors second. Analytical features third. Intelligence fourth. Strategy fifth.

Continuous Value

Every 2-week sprint produces deployable value. Sprint 1-2: working packet capture. Sprint 3-4: GPS/sounder fusion. Sprint 5-6: Parquet storage pipeline. Each sprint delivers something useful, even if incomplete.


Vessel Specs

Spec Value
Vessel F/V EILEEN
Length 51'
Type Commercial Fishing
Home Port Southeast Alaska
Primary Fishery Power Trolling
Development Start July 2026
Horizon 2031 (5-year vision)

Where to Next


The Boat in the Shop

My grandfather built wooden boats in a shed that smelled like cedar and epoxy. He had a rule: the plank you can't see is the one that matters most. The garboard strake — the first plank above the keel — is never visible. It's always underwater. But if it fails, the boat sinks. AELMA's air-gap principle is the garboard strake of this system. The components you can't see — the NMEA parser, the quality checker, the pcall wrappers, the H3 indexer — are the ones keeping everything above the waterline.

The progressive bathymetry grid is a fisherman's memory made digital. Every time F/V EILEEN crosses a bank, the grid gets denser. The same way my grandfather could navigate by the feel of the swell against different bottom contours — he'd been over those grounds enough times that his body knew the seafloor. AELMA knows it in H3 hexagonal cells at resolution 10-11, fused from sonar returns with timestamp_ns precision.

The graceful degradation hierarchy is the shop teacher's approach to failure. When the power tool breaks, you pick up the hand tool. When the hand tool breaks, you use your hands. When your hands fail, you use your eyes. Each layer is less precise than the one below, but each one keeps you working. Hardware truth → dead-reckoning → JEPA prediction → simulator. The boat never stops having a position estimate. It just gets less certain about it.

With every pass over the bank it stitches depth soundings tighter into its bathymetry grid, not as survey data, but as the same quiet muscle memory a skipper builds when he runs the same line enough times to feel the seabed through the helm.

— Seed Pro

NMEA 0183 parsing is the single source of temporal truth; all state derives from or validates against this stream.

— Nemotron Ultra, on the architecture

About

Vessel intelligence OS for commercial fishing vessels (F/V EILEEN, Southeast Alaska). BMAD methodology, 5 abstraction levels, 3-viewer interface, multi-modal ingestion.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages