Kevin System — Data Flow Animation

Segment 1: User Action Dispatch (Marco → Agent Bridge)

User Marco Agent Bridge Semaphore + Service Mgr Agent Registry
Data flow: User clicks action in Marco UI Shell → Command routed to Agent Bridge via HTTP → Semaphore gates concurrent operations → Service Manager executes action → Agent Registry updates heartbeat/status → SSE event published back to Marco

Segment 2: Holon Drop → Queue → Carousel Evaluation

Marco Holon Drop Queue Depth Event Claim Carousel Evaluator OK? YES Route to Worker NO HTTP 402
Data flow: User/Marco drops holon to queue → Queue emits depth event (holon:queue_depth) → Carousel evaluates entitlement (tier → model) + cost (daily USD cap) → Decision point: route to worker pool or reject with HTTP 402 (cost cap exceeded). Depth events flow to event bus for Marco/Mona real-time updates.

Segment 3: Worker Execution → Billing → Storage

Worker Pool Execute Holon Executor Result + Cost Data Billing Domain InfluxDB Event Bus Marco Mona Git
Data flow: Worker executes holon → Publishes result + cost data → Billing domain ingests cost (tracks daily USD, tier usage) → Metrics written to InfluxDB (:8086) → Event bus publishes holon:completed + cost breakdown → Event subscribers (Marco, Mona, Git autopush) receive update → Dashboards reflect new costs, status in real-time

Segment 4: Metrics & Observability → Dashboard (Mona)

InfluxDB REST Query Mona API WebSocket React Browser Display: Device telemetry, Costs, Queue depth
Data flow: InfluxDB (:8086) streams time-series metrics → Mona dashboard (:5173) queries via REST + subscribes to event bus via WebSocket (:8083) → React components update state → Real-time charts render: battery %, network %, daily cost trend, holon queue depth, worker utilization. Updates flow at sub-second latency via event-driven architecture.

Segment 5: Complete Loop — User → Execution → Observability

User Marco Agent Bridge Daemon Carousel Execute Results InfluxDB Mona Feedback
Complete loop: User initiates action in Marco (UI shell at :8500) → Agent Bridge (:8505) gates via semaphore → Daemon holon queue router (:8001) dispatches → Carousel (:8410) evaluates tier entitlement + cost budget → Workers execute concurrently (bounded by semaphore) → Results + cost metrics flow to InfluxDB (:8086) → Mona dashboard (:5173) queries and visualizes via React + WebSocket real-time updates → User sees result in browser. Full cycle latency: 200ms–4s depending on execution scope.
Legend:
🟡 Marco — UI Shell (:8500)
🔵 Daemon — Core orchestrator (:8001)
🔴 Carousel — Cost + tier routing (:8410)
🟣 Holon — Work units, Queue, Workers
💨 Data flow: Animated arrows show active data movement. Dashed lines = async/event-driven paths. Packets show data type (color-coded by originating system).