Pragmatic movement intelligence — where millions of entities contribute state and receive swarm guidance in realtime.
RFC stageEvery scooter, robot, vehicle, and sensor becomes both a contributor and subscriber to the movement graph. No booking, no rides — just continuous state exchange.
POST your position, velocity, intent. Batched or streaming.
SSE stream filtered to your corridor/bbox. Locally relevant.
Swarm consensus, hazard alerts, flow patterns appear.
Low-latency ingestion. Single events or NDJSON batches. Privacy-preserving (PII stripped client-side).
{
"entity_id": "robot_44729",
"entity_type": "delivery_robot",
"position": {
"lat": 34.0522,
"lon": -118.2437
},
"velocity_mps": 1.2,
"heading_deg": 47,
"battery_pct": 67,
"observed_at_iso": "2024-01-15T05:24:14.458Z",
"corridor": "LAX_405_interchange",
"intent": "medical_delivery"
}Batch mode (NDJSON):
{"entity_id":"scooter_8821","position":{"lat":34.05,"lon":-118.24},"velocity_mps":8.3}
{"entity_id":"scooter_8822","position":{"lat":34.06,"lon":-118.25},"velocity_mps":7.1}
{"entity_id":"scooter_8823","position":{"lat":34.04,"lon":-118.23},"velocity_mps":0}Server-Sent Events deliver flow conditions, hazards, and swarm consensus. Filter by location for relevance.
// 47 robots approaching same intersection
{
"swarm": {
"nearby_entities": 47,
"consensus_heading_deg": 52, // Agreed optimal path
"emergence_pattern": "zipper_merge",
"coordination_efficiency": 0.94
}
}// Stadium exit creates ripple effects
{
"hazards": [{
"kind": "mass_exodus",
"location": {"lat": 33.95, "lon": -118.34},
"radius_m": 3000,
"severity": 0.8,
"cascade_eta": {
"500m": "2min",
"2km": "8min",
"5km": "22min"
}
}]
}// Real-time corridor metabolism
{
"local_flow": {
"vehicles_per_minute": 187,
"congestion_factor": 0.73,
"predicted_clearance": "14min",
"alternate_routes": ["western_ave", "normandie"],
"efficiency_delta": -0.31 // vs. yesterday same time
}
}GET /query?bbox=-118.5,33.8,-118.1,34.1&since=2025-09-07T22:00:00Z
{
"observed_at_iso": "2025-09-08T05:10:22Z",
"aggregates": {
"total_entities": 48291,
"active_robots": 1847,
"scooters_idle": 423,
"avg_velocity_mps": 4.7
},
"patterns": [
{"type": "convergence", "center": [34.05, -118.24], "magnitude": 0.82},
{"type": "dispersal", "center": [34.02, -118.30], "magnitude": 0.45}
],
"predictions": {
"congestion_15min": 0.67,
"optimal_corridors": ["I-10_west", "olympic_blvd"]
}
}Simpler, HTTP/2 multiplexing, automatic reconnect, CloudFlare-friendly.
Scooter fleets dump 10K events/sec. One POST, not 10K.
Subscribe only to relevant bbox/corridor. Network efficiency.
PII never leaves device. Positions jittered. Aggregate only.
import sseclient
import requests
import json
# Subscribe to movement stream
def subscribe_movement():
url = "https://mobility.md/stream?corridor=LAX_405_interchange"
headers = {"Authorization": "Bearer $TOKEN"}
response = requests.get(url, headers=headers, stream=True)
client = sseclient.SSEClient(response)
for event in client.events():
data = json.loads(event.data)
# React to swarm consensus
if data.get("swarm", {}).get("consensus_heading_deg"):
adjust_heading(data["swarm"]["consensus_heading_deg"])
# Avoid hazards
if data.get("hazards"):
reroute_around(data["hazards"])
# Contribute back
contribute_state()
def contribute_state():
requests.post("https://mobility.md/contribute", json={
"entity_id": "robot_44729",
"position": get_gps(),
"velocity_mps": get_velocity(),
"observed_at_iso": datetime.now().isoformat()
})mobility.md
© 2025 mobility.md authors · MIT License · Pragmatic specification