Marco

Marco Agent Bridge

HTTP+SSE process controller -- start/stop/restart services via plugin.json manifests + Mx bus.

Marco Agent Bridge (v2026-08-22T175604Z-b502e8bc6d) 2026-08-22 | HTTP+SSE process controller -- start/stop/restart services via plugin.json manifests + Mx bus. 1 - HTTP+SSE Controller - Handles HTTP requests and SSE connections FastAPI GET /api/marco/vault/* POST /api/marco/control GET /api/marco/status ProcessController dispatch(name, action) _start(svc) _stop(svc) ManagedService ManagedService.to_dict() HTTP request Control action 2 - Agent Registry - Manages agent records AgentRegistry _prune_stale() AgentRecord AgentRecord AgentRecord.to_dict() Agent heartbeat 3 - SSE Fan-out - Broadcasts events to clients SSEBroadcaster _broadcast(event) asyncio.Queue SSE Queue asyncio.Queue Event data 1. Receive HTTP request 2. Process control action 3. Update service status 4. Broadcast event 5. Prune stale agents 6. Send SSE frame HTTP POST /api/marco/control payload { "name": "service1", "action": "start" } SSE event payload { "type": "status", "data": { "name": "service1", "status": "started" } } The ProcessController handles service start/stop/restart actions based on plugin.json manifests. The AgentRegistry manages agent records and prunes stale entries based on heartbeat timeouts. The SSEBroadcaster broadcasts events to connected clients using SSE. Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal As of 2026-08-22 22:15 UTC, from commit d94c202

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Marco
Slug
marco-agent-bridge
Rendered
2026-08-22T175604Z
From commit
b502e8bc6d
Updated
22 Aug 2026, 22:15 UTC
Sources at
d94c202
Watches
1 path
  • daemon/src/marco_agent_bridge.py