Skip to content
matthewcm.dev

    ↑ ↓ move · ↵ open · tab scopeopen graph →

    Smart Parking Multi-Agent System - Case Study

    A worked design exercise: turning reactive parking microservices (sensors, booking, users, notifications) into a proactive manager-worker multi-agent system with driver, zone, sensor and reservation agents.

    Seedtended planted 2 min read

    🌱 A rough idea, planted recently. Expect rough edges — it will grow.

    On this page

    A practice design I use to make the Agentic System Design Checklist concrete. The starting point is an ordinary set of parking microservices that are purely reactive. Agents make the system proactive, using a hybrid manager-worker pattern.

    Starting point

    Four existing services:

    • Sensor: real-time occupancy per space.
    • Booking: reservations.
    • User: profile and payment.
    • Notification: alerts.

    Why agency?

    • Proactive help: re-plan if a jam builds up near the destination.
    • Complex reasoning: dynamic pricing around local events.
    • Personalisation: cheap, covered, shaded, EV charging, family-friendly.
    • Robust error handling: if a few sensors drop out, mark the zone temporarily unavailable and use neighbouring readings.

    Doing all of that with rules means thousands of lines of code that are still reactive.

    Architecture

    The driver agent sends a parking request to a zone agent; the zone agent asks sensor agents for occupancy; a reservation agent claims the space. Zones hand off to neighbouring zones when they’re full, and a manager agent coordinates the workflow and reports back to the driver.

    The agents

    Each agent is written up as Interface → Reasoning → Tools → Memory, then given an orchestration style (ReAct vs Plan-and-Execute).

    AgentReasoningToolsMemoryStyle
    Driver (mobile app)Extract entities from “I need a cheap covered spot near…” and build a structured requestManager.requestParking(req), Notification.sendUpdateShort: the conversation. Long: profile, vehicle, payment, past choicesReAct
    ZoneWatch traffic, capacity and EV chargers; alert neighbours; price dynamically for events; fall back to nearby sensorsNotification(msg, severity), Manager(response), Traffic.receiveUpdate, Events.getAllShort: current status. Long: busy times, failure likelihoodsPlan-and-execute
    ReservationMatch spaces to price; claim on request, lock in only after payment; handle refundsManager.getAvailableAtPrice, Payment.pay/refund, Zone.claim, Email.sendConfirmationShort: active bookings. Long: reservation logPlan-and-execute

    The driver agent faces open-ended human input, so it reasons step by step. The zone and reservation agents do the same steps every time, and the reservation agent in particular needs ordering, atomicity and rollback, so a fixed plan wins.

    Guardrails

    • Prevent double booking (claim, then lock in after payment).
    • Never reveal location history: the driver agent keeps it and doesn’t forward it.
    • Validate the data that drives pricing; external feeds can be wrong or manipulated.
    • Redact PII and anonymise orchestrator logs.
    • Validate and rate-limit every tool’s arguments.

    More on each in Guardrails and Human Oversight for AI Agents.

    The lesson

    Applying design principles to a multi-agent system comes down to three moves per agent: define its job, give it the right guardrails, and pick its orchestration pattern (how it interacts and loops). Draw the diagram, and say the trade-off of each new box out loud.

    • #ai-agents
    • #multi-agent-systems
    • #system-design
    • #orchestration
    • #guardrails

    ↪ Links to (3)