Project Info
Fetch.ai Track Submission ๐ค Complete ASI:One Workflow: https://asi1.ai/shared-chat/3a7383cc-c9a7-412c-a473-0e0665ab97ea ASI Demo: https://youtu.be/EdWXfnOk8GI?is=RygbgCXSJ7HwRoXo **Agentverse Profiles: AeroFreight Orchestrator The central user-facing agent that handles ASI:One chat interactions, session state, and coordinates tasks among the sub-agents. AeroFreight Orchestrator The central user-facing agent that handles ASI:One chat interactions, session state, and coordinates tasks among the sub-agents. Economic Constraints Agent Analyzes transport preferences and calculates necessary international taxes and customs requirements. Economic Constraints Agent Analyzes transport preferences and calculates necessary international taxes and customs requirements. Routing Agent The primary routing decision-maker that evaluates the extracted data to determine the optimal shipping method. Routing Agent The primary routing decision-maker that evaluates the extracted data to determine the optimal shipping method. Air Freight Sub-Agent Specialized agent responsible for quoting and logistics mapping for air-based transit routes. Air Freight Sub-Agent Specialized agent responsible for quoting and logistics mapping for air-based transit routes. Ship Freight Sub-Agent Specialized agent responsible for quoting and logistics mapping for sea-based maritime freight. Ship Freight Sub-Agent Specialized agent responsible for quoting and logistics mapping for sea-based maritime freight. Treasury Agent Handles the final checkout pipeline, integrating the Stripe payment wall, generating PDF invoices, and managing documentation. Treasury Agent Handles the final checkout pipeline, integrating the Stripe payment wall, generating PDF invoices, and managing documentation. GitHub: [https://github.com/aniketggg/AeroFreight-AI] Problem: International freight planning is fragmented across routing, cost estimation, and payment. Target User: Businesses importing goods into the United States. Outcome: AeroFreight AI produces a validated route, landed-cost estimate, and user-approved settlement workflow. We designed AeroFreight AI as a four-agent system: one central Orchestrator and three specialized agents. Each agent has a clearly defined responsibility, typed inputs and outputs, and an independent Agentverse-compatible interface, allowing the workflow to fit naturally within the Fetch.ai ecosystem and expand with additional logistics agents. The project demonstrates multi-agent collaboration, ASI: One integration, structured agent-to-agent messaging, external transportation data, failure handling, and a human-approved payment workflow. One shipment request. Specialized agents. One coordinated international freight workflow.
Inspiration
๐ก International shipping is fragmented across route planning, cost estimation, and payment systems. Before a shipment can move, businesses must compare freight modes, calculate tariffs, identify transportation hubs, plan inland delivery, and approve payment. We built AeroFreight AI to coordinate this workflow through a network of specialized autonomous agents. Each agent focuses on a specific task while a central orchestrator maintains the shared shipment state. What It Does ๐ AeroFreight AI converts a natural-language shipping request into a structured freight plan for shipments traveling from an international origin to a destination in the United States. The user provides: origin and destination; cargo details; weight and volume; declared value; preference for speed or lower cost. If information is missing, the system asks a follow-up question before continuing. The completed request then moves through four coordinated stages. 1. Orchestrator Agent The Orchestrator acts as the central coordinator. It: connects the user experience to ASI:One; converts natural language into structured shipment data; validates required fields; stores the shared shipment state; communicates with each agent in sequence. 2. Economist Agent The Economist Agent evaluates the shipment's financial and physical constraints. It determines: whether the cargo is high-value or luxury; estimated U.S. tariffs and entry taxes; whether the shipment should use AIR, SHIP, or EITHER. 3. Routing Agent The Routing Agent calculates route options, transportation cost, and estimated transit time. It coordinates two Fetch.ai sub-agents: AIR Agent โ evaluates airport-based routes; SHIP Agent โ evaluates seaport-based routes. Each sub-agent calculates: route nodes; countries visited; inland trucking; freight charges; route fees; estimated transit time. When both modes are allowed, the system prioritizes based on the user's SPEED or COST preference and returns a validated RouteData object. 4. Treasury and Settlement Agent The Treasury and Settlement Agent generates the final shipment summary, including: recommended route; transportation mode; itemized cost breakdown; total landed cost. The user must explicitly approve the transaction before settlement begins. System Architecture ๐๏ธ AeroFreight AI uses a centralized hub-and-spoke architecture. The Orchestrator maintains the global shipment state, while each agent receives only the information required for its task. How We Built It ๐ ๏ธ Technology Stack Python 3.11 and 3.12 Fetch.ai uAgents ASI:One Pydantic airport and seaport datasets Structured Agent Communication Each workflow stage communicates through typed request and response messages. We created shared Pydantic models for: ShipmentRequest EconData RouteData SettlementStatus These shared schemas prevent inconsistencies between independently developed agents. Agent-to-Agent Messaging Agents communicate asynchronously through Fetch.ai protocols. The Orchestrator manages the flow, ensuring each agent receives validated input from the previous step. For dependent operations, we use: Geographic Routing The Routing Agent uses airport and seaport coordinates to estimate great-circle distance with the Haversine formula. This includes inland transportation instead of comparing only airport-to-airport or port-to-port distance. Cost and Time Comparison The total landed cost is calculated as: Challenges We Faced ๐งฉ Agent Integration Small differences in field names, data types, or expected outputs could break the workflow. We solved this by treating shared Pydantic schemas as fixed interfaces between agents. Transportation Data Airport and seaport datasets use different identifiers, coordinate formats, country codes, and naming conventions. We added normalization and fallback logic so both routing agents could use a consistent process. Asynchronous Dependencies The workflow must execute in order: This required careful handling of asynchronous messages, validation, timeouts, agent addresses, and downstream failures. Human Control International shipping and payment decisions can have major legal and financial consequences. AeroFreight AI therefore requires explicit user confirmation before settlement. What We Learned ๐ Multi-agent systems work best when every agent has: a clear responsibility; a limited and stable interface; validated inputs and outputs; access only to the data required for its task. This structure made AeroFreight AI easier to test, debug, integrate, and extend. We also gained experience with: Fetch.ai uAgents; ASI:One integration; asynchronous messaging; Pydantic validation; hub-and-spoke orchestration; geospatial routing; transportation data normalization; cost-versus-time optimization; human-in-the-loop approval; environment-based credential management. Most importantly, we learned that autonomous agents can do more than generate text. With structured data and reliable communication, they can collaborate on complex operational workflows. Responsible AI and Privacy ๐ AeroFreight AI is designed as a decision-support platform rather than an unchecked autonomous authority. The system clearly displays: transportation mode; route nodes; countries visited; freight costs; entry taxes; total landed cost. Users can reject the proposed transaction, and explicit confirmation is required before settlement. Credentials and agent seeds are stored in environment variables, secrets are excluded from version control, and typed schemas limit unnecessary data sharing. Environmental Impact ๐ฑ Transportation mode affects a shipment's environmental footprint. A future version could add estimated carbon emissions so users can compare environmental impact alongside cost and delivery time. What's Next ๐ฎ Future improvements include: live freight pricing; real-time weather and port congestion; updated tariff and customs APIs; live shipment tracking; rail and trucking agents; carbon-emission estimates; sanctions screening; automated carrier bidding; dynamic route replanning; production-grade payment and escrow. Our long-term vision is for AeroFreight AI to become an intelligent logistics coordination layer that helps businesses plan, approve, and execute international shipments through a trusted network of specialized agents. One request. Multiple agents. One smarter freight workflow.
AeroFreight AI
AeroFreight AI is an autonomous, multi-agent logistics orchestration platform built on the Fetch.ai uAgents framework. A swarm of specialized agents, governed by strict Pydantic data contracts, automates the end-to-end logistics lifecycle: natural-language intent parsing, mode/route selection, pricing, and simulated financial settlement (Stripe checkout + PDF invoicing).
Architecture Overview
The system employs a Hub-and-Spoke model. A centralized Orchestrator Agent acts as the system's "brain," coordinating specialized teammate agents โ Economic Agent (pricing), Riya/Routing Agent (route + carrier selection), and Treasury Agent (invoicing + payment). Each teammate can run as a local in-process mock or as a remote uAgent reachable over the Fetch.ai network.
The Workflow Loop
User message (CLI, Agent Chat Protocol, or browser UI via server.py)
โ ConversationController
โ ClaudeShipmentExtractor (natural-language extraction)
โ OrchestratorService + validation (deterministic Python)
โ WorkflowCoordinator
โ [Mock or Remote] Economist, Routing, and Treasury agents
โ Quote โ User CONFIRM โ Stripe checkout (simulated) โ Invoice โ COMPLETED
Technical Stack
- Runtime: Python 3.11+
- Agent Framework:
uagents(Fetch.ai) - Data Validation:
Pydantic(strict inter-agent contracts in shared_models.py) - LLM: Anthropic Claude (
anthropicSDK, default modelclaude-opus-4-8) - Web/API:
FastAPI+uvicorn(server.py) serving a static browser demo (index.html) - Payments: Stripe (embedded checkout via
treasury_agent/payment_backend.py) - Invoicing:
reportlab(PDF generation), with optional Google Drive upload for invoice links - Testing:
pytest, with mocked Anthropic/Stripe clients
Getting Started
1. Installation
git clone https://github.com/aniketggg/AeroFreight-AI/
cd AeroFreight-AI
python -m venv .venv && source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
NOTE: You will need to refer to the fetchai-asi branch if you want to run the code specifically backend based only using the ASI ONE Platform.
2. Configuration
Copy .env.example to .env and fill in your keys. Never commit .env. Key variables:
# --- LLM ---
ANTHROPIC_API_KEY=replace_with_your_key
ANTHROPIC_MODEL=claude-opus-4-8
# --- Agent network ---
AGENT_SEED=replace_with_a_private_random_seed
AGENT_NAME=aerofreight-orchestrator
AGENT_PORT=8001
# Leave blank to fall back to the local mock agents
ECONOMIST_AGENT_ADDRESS=
ROUTER_AGENT_ADDRESS=
TREASURY_AGENT_ADDRESS=
# --- Treasury process (separate agent) ---
TREASURY_AGENT_NAME=aerofreight-treasury-agent
TREASURY_AGENT_SEED=
TREASURY_AGENT_PORT=8014
ORCHESTRATOR_AGENT_ADDRESS=
# --- Stripe ---
STRIPE_SECRET_KEY=sk_test_...
STRIPE_PUBLISHABLE_KEY=
STRIPE_RETURN_URL=https://agentverse.ai
# --- Optional: Google Drive invoice upload ---
GOOGLE_DRIVE_FOLDER_ID=
GOOGLE_SERVICE_ACCOUNT_JSON=
See .env.example for the full list of supported variables.
3. Running it
- Local CLI demo (no network agents, mocked teammates):
python -m orchestrator.cli - Browser demo (FastAPI bridge driving real Stripe checkout + invoice generation):
then openuvicorn server:app --reloadindex.htmlvia the server's root route. - Distributed mode โ run teammate agents and the orchestrator as separate uAgents, each in its own terminal:
python -m economic_agent.agent python -m step3_riya.agent python -m treasury_agent.agent python -m orchestrator.agent
Integration: ASI:One & Agentverse
The Orchestrator exposes the workflow via the Agent Chat Protocol:
- Run
python -m orchestrator.agent. - Open the Inspector URL printed in the terminal.
- Connect via Mailbox to chat with the agent through the ASI:One interface.
Logic & Constraints
- Deterministic safety: Claude performs natural-language intent extraction only. All workflow transitions, validation, and pricing math are deterministic Python in orchestrator/validation.py and orchestrator/service.py.
- Mode/route selection: Handled by the routing agent (step3_riya), which resolves airports/seaports/cities from local reference data (
step3_riya/data/) and applies route logic to compare carriers/modes. - Settlement: Once a quote is accepted (
CONFIRM), the Treasury Agent (treasury_agent) creates a Stripe checkout session, then on payment confirmation generates an itemized PDF invoice (optionally uploaded to Google Drive).
Project Structure
shared_models.py # Inter-agent Pydantic contracts
schemas.py # Additional shared schemas
server.py # FastAPI bridge for the browser demo (index.html)
index.html # Static browser UI for the demo
orchestrator/
agent.py # uAgent + Agent Chat Protocol entry point
cli.py # Interactive local CLI demo
conversation.py # ConversationController
extractor.py # Claude-based shipment extraction
coordinator.py # WorkflowCoordinator
service.py # Workflow state machine
validation.py # Deterministic data validation
mock_agents.py # Local in-process mock teammate agents
remote_agents.py # Remote uAgent clients
location_normalization.py # Address/location cleanup
session_store.py # Conversation/session persistence
uagents_mailbox.py / uagents_storage.py # Mailbox + storage helpers
economic_agent/ # Pricing teammate agent
step3_riya/ # Routing teammate agent (airports/ports/cities lookups)
treasury_agent/ # Invoicing + Stripe settlement teammate agent
tests/ # Unit tests, with mocked Anthropic/Stripe clients
Warning: All freight costs, tariffs, routes, documents, and payments in this repository are simulated demo values for research purposes.
Analysis
View
Metric
- 18
- 15
- 13
- 5
- 4
- 2
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- FastAPIIn code
- HTMLIn code
- PythonIn code
4 of 4 appear in the indexed code.
AI coding agents
- Claude CodeCommits
- CursorCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
509 KB
Source files
76
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
aniketggg/AeroFreight-AI
84 files ยท 45.3 MB ยท @ 83f3540
Structure
Interface
1 file ยท 1%Screens, components and styles rendered to the user.
Application logic
51 files ยท 61%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here โ open the file browser to check anything the diagram implies.
Languages
- Python88%
- HTML10%
- Markdown2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi ยท 9- anthropic
- fastapi
- pydantic
- pytest
- python-dotenv
- reportlab
- stripe
- uagents
- uvicorn
Declared in the repositoryโs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
Agent-to-agent messaging via Fetch.ai uAgents (async send_and_receive)Verified
Agents communicate asynchronously through Fetch.ai protocols, Orchestrator manages flow between validated steps
Claimed on Devposthigh confidenceorchestrator/remote_agents.py:51โ UAgentsEconomistClient and router/treasury clients use context.send_and_receive to call remote uAgents
ASI:One integration via Agent Chat ProtocolVerified
Connects user experience to ASI:One via Agentverse Mailbox and Agent Chat Protocol
Claimed on readmemedium confidenceorchestrator/agent.py:688โ Registers chat_protocol_spec Protocol and handles ChatMessage/ChatAcknowledgement, consistent with Agent Chat Protocol used for ASI:One/Agentverse mailbox connectivity
Deterministic Python workflow/validation (Claude used only for NL extraction)Verified
Claude performs natural-language intent extraction only; all workflow transitions, validation, and pricing math are deterministic Python
Claimed on readmehigh confidenceorchestrator/validation.pyโ Dedicated deterministic validation module separate from the Claude-based extractororchestrator/service.pyโ State machine implementing workflow transitions in plain Python
Economist Agent: high-value/luxury classification and tariff/entry-tax estimationVerified
Economist Agent determines high-value/luxury status, estimated U.S. tariffs and entry taxes, and AIR/SHIP/EITHER preference
Claimed on Devposthigh confidenceeconomic_agent/economics.py:186โ is_luxury_shipment classifies luxury goodseconomic_agent/economics.py:161โ compute_entry_tax computes MPF + ad-valorem duty (entry tax)economic_agent/economics.py:216โ compute_econ_data assembles EconData with is_high_value, is_luxury, base_entry_tax_usd
Human-in-the-loop CONFIRM approval before settlementVerified
User must explicitly approve the transaction before settlement begins
Claimed on Devposthigh confidenceorchestrator/service.py:177โ Requires exact 'CONFIRM' input to transition from AWAITING_CONFIRMATION to payment execution
Local mock agents / in-process teammates as fallbackVerified
Each teammate can run as a local in-process mock or as a remote uAgent
Claimed on readmehigh confidenceorchestrator/mock_agents.pyโ Local in-process mock teammate agent implementations exist, matching README's fallback description when agent addresses are blank
Multi-agent architecture (Orchestrator, Economist, Routing, Treasury)Verified
Four-agent system: Orchestrator, Economic Constraints Agent, Routing Agent, Treasury Agent
Claimed on Devposthigh confidenceorchestrator/agent.pyโ Orchestrator uAgent entry point presenteconomic_agent/agent.pyโ Economist agent module presentstep3_riya/agent.pyโ Routing agent module presenttreasury_agent/agent.pyโ Treasury agent module present
Natural-language shipment extraction via ClaudeVerified
Converts natural-language shipping request into structured freight plan using Claude for intent extraction
Claimed on readmehigh confidenceorchestrator/extractor.py:9โ Uses anthropic.Anthropic client with system instructions to extract structured ShipmentRequest fields from user text
Routing Agent with AIR/SHIP sub-agents and Haversine great-circle distanceVerified
Routing Agent coordinates AIR and SHIP sub-agents, using Haversine formula for great-circle distance including inland trucking
Claimed on Devposthigh confidencestep3_riya/route_logic.py:120โ haversine_km function implemented and used for hub distances and inland trucking legsstep3_riya/air_agent.pyโ Dedicated AIR sub-agent modulestep3_riya/ship_agent.pyโ Dedicated SHIP sub-agent module
Shared Pydantic data contracts between agents (ShipmentRequest, EconData, RouteData, SettlementStatus)Verified
Shared Pydantic models prevent inconsistencies between independently developed agents
Claimed on Devposthigh confidenceshared_models.py:12โ ShipmentRequest, EconData, RouteData, SettlementStatus all defined as Pydantic BaseModel classes
Speed vs. cost route prioritizationVerified
When both modes are allowed, system prioritizes based on SPEED or COST preference and returns validated RouteData
Claimed on Devpostmedium confidencestep3_riya/route_logic.pyโ route_logic.py builds CandidateQuote objects per mode and RouteData is a typed Pydantic model (step3_riya/routing_models.py) used to return the selection
Test suite with mocked Anthropic/Stripe clientsVerified
Testing via pytest, with mocked Anthropic/Stripe clients
Claimed on readmemedium confidencetests/test_extractor.pyโ Test file targeting the Claude-based extractor, implying mocked Anthropic client usagetests/test_treasury_payment_backend.pyโ Test file targeting Stripe payment backend
Treasury/Settlement: Stripe checkout, PDF invoicing, landed cost summaryVerified
Treasury Agent integrates Stripe payment wall, generates PDF invoices, computes itemized landed cost breakdown
Claimed on Devposthigh confidencetreasury_agent/payment_backend.py:1โ Stripe embedded Checkout session creation code using the stripe SDK and STRIPE_SECRET_KEYtreasury_agent/invoice.pyโ Uses reportlab to generate PDF invoices
FastAPI browser demo bridging to Stripe/invoice flowCode-supported
Browser demo (FastAPI bridge driving real Stripe checkout + invoice generation) served via server.py and index.html
Claimed on readmemedium confidenceserver.pyโ FastAPI app file present at repo root, paired with index.html static UI, but full request wiring to checkout/invoice not traced line-by-lineindex.htmlโ Static browser UI file exists as claimed
Follow-up questions for missing shipment fieldsCode-supported
If information is missing, the system asks a follow-up question before continuing
Claimed on Devpostmedium confidenceorchestrator/validation.pyโ Deterministic validation module referenced by README as enforcing required fields before workflow proceedsorchestrator/conversation.pyโ ConversationController drives multi-turn extraction/validation loop
Optional Google Drive invoice uploadCode-supported
Optional Google Drive upload for invoice links
Claimed on readmemedium confidencetreasury_agent/drive_upload.py:9โ Reads GOOGLE_DRIVE_FOLDER_ID/service-account config and defines is_configured(), but actual upload call path not traced end-to-end
An AI agent derived these features from the projectโs Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.