Inspiration
Modern logistics companies still struggle with fragmented last-mile coordination - dispatchers manually assign tasks, drivers lose time rerouting after delays, and customers rarely get accurate ETAs. With the rise of AI Agents and Google’s Agent Development Kit (ADK), we wanted to explore whether multiple domain-specific agents could coordinate autonomously to make last-mile delivery smarter, faster, and more explainable. Our inspiration was to show that multi-agent intelligence can handle real-world transportation complexity - not just chatbots, but true operational AI.
What it does
Final Mile Engine is a multi-agent platform for real-time delivery orchestration. It features three autonomous services - each built as an AI agent - that communicate through Pub/Sub and share state in PostgreSQL:
Dispatch Agent – Receives new delivery orders, matches drivers using geospatial proximity, capacity, and priority. Reassigns tasks automatically when incidents occur.
Driver Agent – Represents each delivery vehicle; acknowledges tasks, publishes telemetry, and reports incidents (like traffic or delays).
Customer Agent – Keeps customers informed with live ETAs, supports reschedules, and feeds updates back into Dispatch.
Together, they form a self-organizing delivery network that continuously optimizes routes and customer satisfaction. A lightweight React dashboard shows a live map, telemetry, message timeline, and incident injections for demos.
How we built it
Language & Framework: Java 21 + Spring Boot 3.5.6
Data Store: PostgreSQL 15 with Flyway migrations
Communication: Google Cloud Pub/Sub topics for agent-to-agent events
Orchestration: Google ADK (Agent Development Kit) for capability registration and discovery
Deployment: Independent microservices deployed to Google Cloud Run
Infrastructure as Code: Docker + Compose for local, YAML manifests for Cloud Run
Observability: Spring Actuator, centralized audit logs, and a real-time React dashboard
Testing: Pub/Sub emulator and Testcontainers for integration tests
Each agent runs as its own container with clear responsibilities. They communicate via JSON messages and maintain a synchronized view of orders, vehicles, and deliveries through a shared schema. The Customer Agent (on branch 003-customer-agent) demonstrates the ADK principle of capability modularity: it can publish domain events without direct coupling to Dispatch or Driver logic.
Challenges we ran into
Multi-agent coordination: Designing asynchronous communication without circular dependencies required event-driven patterns and strict topic separation.
ADK capability modeling: Mapping logistics operations into declarative capabilities and goals was new territory. We iterated several times to balance clarity and flexibility.
Idempotency & retries: With multiple agents listening to Pub/Sub, we had to ensure messages were processed exactly once - audit IDs and transaction guards solved it.
Cloud Run deployment: Managing environment configuration (database, Pub/Sub credentials, service accounts) across three microservices was tricky but taught us the value of automation.
Synthetic data realism: Creating believable telemetry for multiple drivers while keeping demo speed manageable was a balancing act.
Accomplishments that we're proud of
Built three fully independent AI agents communicating autonomously through Pub/Sub and ADK.
Delivered a complete end-to-end delivery simulation where a customer update can trigger dynamic dispatch and ETA recomputation.
Achieved a clean architecture with zero hard dependencies between agents - everything happens through events and capability registration.
Designed and implemented explainable audit logs, allowing observers to see why a particular dispatch or reassignment occurred.
Deployed all agents successfully to Google Cloud Run, proving scalability and portability.
What we learned
How to apply Google’s ADK to a real, operational workflow - not just chat use-cases.
That multi-agent systems demand clear boundaries: communication contracts (topics, schemas) are as important as code.
How to model asynchronous decision-making with Spring Boot and Pub/Sub while keeping transactions consistent.
The importance of observability - once we visualized telemetry and audit events, debugging and storytelling became easy.
Collaboration in an A2A environment can scale naturally once each agent is well-defined and autonomous.
What's next for Final Mile Engine
AI-driven optimization: Integrate Vertex AI models to score routes, predict delays, and suggest reassignments dynamically.
Adaptive negotiation: Enable driver bidding and multi-criteria negotiation through ADK-powered goal reasoning.
Multi-tenant support: Allow different logistics providers to plug in their agents via capability descriptors.
Advanced dashboard: Real-time map with anomaly detection and live incident simulation controls.
Open-source release: Package the project as a sample “A2A Logistics Blueprint” for ADK developers.
Real data integration: Connect to live telematics or order feeds for field trials with smaller fleets.
Log in or sign up for Devpost to join the conversation.