Inspiration

In today's hyper-connected world, a single event—a port strike, a factory fire, a storm—can trigger a catastrophic domino effect across a global supply chain. The core problem for businesses isn't a lack of information, but a deluge of it. Human analysts are overwhelmed, and the critical delay between an event occurring and a company assessing its specific impact can lead to millions in losses. I was inspired to build an autonomous system that could act as a 24/7 global watchtower, intelligently filtering the noise and delivering critical, actionable alerts in minutes, not hours.

What it does

Project Atlas is an autonomous AI agent that proactively monitors, assesses, and visualizes supply chain disruptions in real-time.

  • It Monitors: It automatically scans global news feeds for events related to logistics and shipping.
  • It Reasons: Using an Amazon Bedrock Agent (powered by Claude 3 Haiku), it understands the context of a news event, identifies the geographic location, and determines if it's relevant to our supply chain.
  • It Acts: If an impact is detected, the agent autonomously invokes a series of tools to geocode the location, record the incident in a database, send an email alert to stakeholders, and push a live update to a front-end dashboard.
  • It Visualizes: It provides a live command-center map where the company's entire supply chain network is visible, and new incident markers appear in real-time, complete with popups detailing the event.

The end result is the transformation of raw, unstructured news into a clear, actionable alert on a global map, enabling businesses to react faster and mitigate losses.

How we built it

Project Atlas is a fully serverless, event-driven architecture built on a suite of powerful AWS services.

  1. The Brain: The core of the system is an Amazon Bedrock Agent. I provided it with a set of instructions and two "tools" (Action Groups) to orchestrate the entire workflow.

  2. The Tools: The agent's "hands" are two AWS Lambda functions written in Python:

    • ImpactAssessor: This tool intelligently queries a DynamoDB table (SupplyChainAssets) that holds our predefined routes. It uses flexible string matching to determine if an event location impacts any asset.
    • NotificationDispatcher: This multi-purpose tool first uses Amazon Location Service to geocode the event location into GPS coordinates. It then calls our AWS AppSync API to record the incident and sends an email alert via Amazon SES.
  3. The Real-Time API: An AWS AppSync GraphQL API acts as the central nervous system. It uses a multi-authorization model: AWS_IAM for secure backend mutations from our Lambda, and API_KEY for public-facing queries and subscriptions from the front-end. Resolvers connect the API directly to an AtlasIncidents DynamoDB table.

  4. The Front-End: A React application, deployed with AWS Amplify Hosting, provides the user interface. It uses Mapbox GL JS to render a 3D globe, draws the supply chain routes, and most importantly, uses GraphQL subscriptions to listen for live updates from AppSync, allowing new incident markers to appear in real-time.

  5. Automation: An Amazon EventBridge Scheduler triggers an orchestrator Lambda to automatically fetch news and kick off the entire agentic workflow every 15 minutes.

Challenges we ran into

This project was an incredible debugging journey. The biggest challenges were:

  • Agent Intelligence vs. Tool Logic: I quickly learned that the agent's LLM is incredibly smart (e.g., inferring "Port of Tokyo" from "Japan"), but the tools it uses must be robust enough to handle its intelligent inputs. I had to significantly refactor my ImpactAssessor Lambda to move from simple string matching to a more flexible, keyword-based search to handle the agent's creative queries.
  • The Authorization Chain: Getting the multi-layered permissions correct was a major hurdle. I had to debug the full chain: from the front-end's API Key, to the AppSync service role's access to DynamoDB, to the Lambda's IAM role's access to AppSync. This was a deep dive into AWS security.
  • Front-End Dependency Hell: The modern JavaScript ecosystem is notoriously difficult. I battled numerous version conflicts between React, Amplify, and various mapping libraries before landing on a stable, direct implementation with mapbox-gl.

Accomplishments that we're proud of

I'm incredibly proud of building a complete, end-to-end autonomous system. Specifically:

  • True Autonomy: The final system is designed to run on a schedule and requires zero human input to detect and report on a real-world event.
  • Multi-Step Reasoning: The agent successfully orchestrates a multi-tool workflow, using the output of the first tool to make a decision about whether to call the second.
  • Real-Time Data Pipeline: Implementing the AppSync subscription that pushes live updates from the backend all the way to the front-end map without a page refresh was a major achievement and the core "wow" factor of the project.
  • Robustness: The final ImpactAssessor tool, which uses dynamic geocoding, is far more intelligent and capable of handling a wide variety of real-world inputs than my initial simple version.

What we learned

The most important lesson was that building a truly "intelligent" agent is not just about the LLM; it's about the architecture that supports it. The agent is the "brain," but its effectiveness is entirely dependent on the quality, reliability, and security of the "tools" you give it. I learned how to create a clear separation of concerns: the agent handles reasoning and language, while the Lambda functions handle the deterministic, secure execution of specific tasks. This modular, tool-based approach is the key to creating powerful and trustworthy AI systems.

What's next for Project Atlas

The potential for Project Atlas is huge. The next steps would be to:

  • Integrate More Data Sources: Add live weather APIs, social media feeds (Twitter/X), and real-time shipping GPS data to provide an even richer picture of the global supply chain.
  • Proactive Rerouting Suggestions: Enhance the agent with a new tool that, upon detecting a disruption, could query for alternative routes in the SupplyChainAssets database and suggest an immediate, optimized plan B.
  • Impact Scoring: Develop a more sophisticated model within the agent to score the severity of an incident based on the type of event and the number of affected assets, allowing operators to prioritize the most critical threats.

Built With

Share this project:

Updates