How oaksat/cooranadination works
AI Freight Coordination turns inbound multilingual beer-shipment emails into validated, planned, quoted and—after explicit approval—booked freight orders. The principal flow runs from email ingestion through a per-order Step Functions workflow, with customer clarification and representative review as human gates. DynamoDB-backed persistence and an outbox support durable state and outbound mail. The README documents the end-to-end stages and AWS services; source excerpts and the index clarify selected implementation ownership, but several workflow and API details are not sampled.
Main entry points: steps.py Workflow steps · graph.py Order execution · storage_stack.py Inbound S3 · ingest.py Ingest handler
Components 26
Email intake
- Inbound S3
infra/stacks/storage_stack.py - Ingest queue
infra/stacks/storage_stack.py - Ingest handler
src/freight/handlers/ingest.py - Email routing
src/freight/workflow/ingest.py - Email composition
src/freight/email/compose.py
Order workflow
- Order execution
src/freight/workflow/graph.py - Workflow steps
src/freight/workflow/steps.py - Order confirmation
src/freight/workflow/steps.py
Freight domain
- Shipment extraction
src/freight/extraction/extractor.py - Request validation
src/freight/domain/rules.py - Cargo planning
src/freight/planning/quoting.py - Option ranking
src/freight/planning/alternatives.py
Human interfaces
- Rep dashboard
src/freight/dashboard/app.js - Rep API
src/freight/handlers/rep_api.py - Customer choice
src/freight/handlers/choose.py - Signed links
src/freight/workflow/links.py
Runtime services
- Provider client
src/freight/providers/client.py - Order repository
src/freight/persistence/repo.py - Mail outbox
src/freight/email/outbox.py - Outbox sender
src/freight/workflow/outbox_sender.py
Other components
- Customer
- Inbound email
- Bedrock LLM
- Mock freight providers
src/freight/providers/mock_app.py - Sales representative
- Amazon SES
Connections 28
- Customer → Inbound email: sends order
README.md - Inbound email → Inbound S3: writes email
README.md - Inbound S3 → Ingest queue: queues event
infra/stacks/storage_stack.py - Ingest queue → Ingest handler: invokes
- Ingest handler → Email routing: routes email
src/freight/handlers/ingest.py - Email routing → Order execution: starts order
src/freight/workflow/ingest.py - Order execution → Workflow steps: dispatches steps
README.md - Workflow steps → Shipment extraction: extracts details
README.md - Shipment extraction → Bedrock LLM: requests language extraction
README.md - Workflow steps → Request validation: validates request
README.md - Workflow steps → Email composition: drafts questions
README.md - Email composition → Customer: asks clarification
README.md - Workflow steps → Cargo planning: plans shipment
README.md - Workflow steps → Provider client: requests quotes
README.md - Provider client → Mock freight providers: calls providers
README.md - Workflow steps → Option ranking: ranks options
README.md - Workflow steps → Rep API: routes review
README.md - Rep API → Rep dashboard: serves dashboard
README.md - Sales representative → Rep dashboard: reviews quote
README.md - Workflow steps → Signed links: creates signed links
README.md - Customer → Customer choice: approves option
README.md - Customer choice → Order execution: resumes execution
README.md - Workflow steps → Order repository: persists transitions
README.md - Order repository → Mail outbox: records outgoing mail
src/freight/persistence/repo.py - Mail outbox → Outbox sender: triggers sender
README.md - Outbox sender → Amazon SES: sends email
README.md - Workflow steps → Order confirmation: confirms booking
README.md - Order confirmation → Customer: emails confirmation
README.md