Agents League Hackathon 2026 - Reasoning Agents Track Microsoft Foundry | Foundry IQ | Azure OpenAI
Turn a spreadsheet of UPCs and SKUs into a complete, market-ready product catalog with verified photos, titles, and descriptions powered by multi-step reasoning and Microsoft Foundry IQ.
When someone buys a pallet of inventory, they often receive hundreds of products with nothing but UPC barcodes or internal SKUs on the packaging. Before they can sell anything online, they have to figure out what each item is — searching Google, checking marketplaces, comparing listings, finding product photos, copying specifications, and writing descriptions.
At around 8 minutes per item, a pallet with 400 products can require more than 50 hours of manual work before anything is listed for sale. For many small businesses, that work never gets done. Inventory sits in storage instead of generating revenue.
ShelfWise turns a spreadsheet of UPCs and SKUs into a complete, market-ready product catalog. Users upload a CSV or paste identifiers directly into the app. The system searches across the web — retailer listings, manufacturer pages, marketplaces, specialty stores, distributor catalogs, and public product databases — to gather evidence for each product.
A multi-step reasoning agent resolves conflicting names, deduplicates evidence, scores source reliability, and builds a cited product record. Verified images are ranked into a gallery of up to 5 marketplace-ready photos. The final catalog exports to Shopify, Amazon Seller Central, eBay, Facebook Marketplace, WooCommerce, Etsy, BigCommerce, DoorDash, Uber Eats, Grubhub, or generic CSV/JSON.
Key capabilities:
- Web-wide evidence gathering — 10 core sources plus a registry of 270+ additional sources, queried concurrently. Searches the broader web, not just a fixed UPC catalog.
- Direct retailer programs — Category-aware task flows probe Amazon, eBay, Walmart, Target, Sam's Club, Costco, Kroger, Chewy, Petco, PetSmart, Tractor Supply, Home Depot, Lowe's, Grainger, Uline, Staples, Office Depot, Walgreens, and CVS.
- Multi-step reasoning agent — Jaccard deduplication, weighted brand/category resolution, attribute normalization, confidence scoring, and grounded citations.
- Verified product imagery — Downloads and scores every candidate photo for white/clean backgrounds, resolution, central product focus, sharpness, frame fill, and source validity, then returns a ranked gallery of up to 5 verified multi-angle photos per product.
- Name-based image search fallback — When a barcode has no public match, ShelfWise searches the web by product name/brand and verifies those images.
- Manual upload & review — Users can delete auto-selected images or upload their own through the image manager on each product card.
- Foundry IQ integration — Optional Azure OpenAI enrichment with JSON-structured responses and full citation trails.
- Real-time SSE streaming — Watch each UPC get processed live with progress bars.
- 11 export formats — CSV, JSON, Shopify, Amazon, WooCommerce, eBay, Etsy, BigCommerce, DoorDash, Uber Eats, Grubhub.
- Accessibility-first — WCAG 2.1 AA compliant, keyboard navigation, screen reader support, reduced motion support.
Watch the 5-minute demo on YouTube (placeholder - record and replace before submission)
Open architecture.html in a browser to view the full interactive architecture diagram.
- Input - User uploads a CSV or enters UPCs/SKUs manually
- Scraping - Core sources and top-weighted registry sources queried concurrently with rotating user-agents, retry logic, circuit breakers, and health tracking
- Name-Based Image Search Fallback - When no public UPC match exists, the system searches the web by product name/brand
- Reasoning - ProductReasoningAgent weights sources, deduplicates names, resolves fields, merges attributes, and generates citations
- Image Verification - Candidate photos are scored for white/clean backgrounds, quality, focus, sharpness, frame fill, source validity, and perceptual diversity; a ranked gallery of up to 5 verified multi-angle images is selected per product
- Foundry IQ - If Azure OpenAI credentials are configured, the agent sends raw data for LLM-based enrichment
- Storage - SQLite database tracks jobs and stores consolidated products
- Output - Live SSE updates to frontend, product cards with verified images/citations, manual upload/review, multi-format export
| Layer | Technology |
|---|---|
| Backend | Python 3.12, FastAPI, Uvicorn |
| Scraping | httpx, BeautifulSoup4, async concurrency |
| Reasoning | Custom multi-step agent with Jaccard similarity |
| AI/LLM | Azure OpenAI GPT-4.1-mini (optional) |
| Database | SQLite (file-based, zero config) |
| Frontend | Vanilla JS, CSS Grid/Flexbox, SSE |
| DevOps | Docker, docker-compose, GitHub Actions |
# Clone the repo
git clone https://github.com/t957095/shelfwise.git
cd shelfwise
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# (Optional) Set up Azure OpenAI
# cd backend && ./setup-azure-openai.ps1 # Windows PowerShell
# Run the server
cd backend
python -m uvicorn main:app --host 127.0.0.1 --port 8000
# Open http://localhost:8000/app in your browserdocker-compose up --build
# Open http://localhost:8000/app in your browsercd backend
.\setup-azure-openai.ps1 # Auto-provisions Azure OpenAI
python -m uvicorn main:app --host 127.0.0.1 --port 8000Copy backend/.env.example to backend/.env and fill in your values:
# Required for Foundry IQ integration
FOUNDRY_ENDPOINT=https://your-resource.openai.azure.com/openai/deployments/gpt-4.1-mini/chat/completions?api-version=2024-02-01
FOUNDRY_API_KEY=your-azure-openai-key
FOUNDRY_MODEL=gpt-4.1-mini
# Optional - required for strongest marketplace/image acquisition
BRAVE_API_KEY=your-brave-search-key
GOOGLE_API_KEY=your-google-api-key
GOOGLE_CX=your-programmable-search-engine-id
SERPAPI_KEY=your-serpapi-key
SEARCHAPI_KEY=your-searchapi-io-key
EBAY_BEARER_TOKEN=your-ebay-browse-api-token
AMAZON_SCRAPER_API_KEY=your-omkar-amazon-scraper-api-key
RAPIDAPI_AMAZON_SCRAPER_KEY=your-rapidapi-amazon-product-scraper-key
AMAZON_COUNTRY_CODE=USSERPAPI_KEY and SEARCHAPI_KEY are used for both web/image search and Google Shopping-style product evidence. A Google Maps-only key is not enough unless the same Google Cloud project also has Custom Search enabled and a GOOGLE_CX Programmable Search Engine ID.
Never commit .env to Git. It is already in .gitignore.
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | App info and feature list |
/app |
GET | Web application (frontend) |
/api/health |
GET | Health check with feature flags |
/api/batch |
POST | Submit UPCs for processing |
/api/upload-csv |
POST | Upload POS CSV; auto-detects UPC/EAN/SKU/PLU, accepts max_rows query param |
/api/upload-csv/preview |
POST | Preview a POS CSV: detected columns and sample UPCs |
/api/products |
GET | List all products |
/api/products/{upc} |
GET | Get single product |
/api/products/{upc}/images |
POST | Upload a product image |
/api/products/{upc}/images |
DELETE | Remove a product image by URL |
/api/export |
POST | Export as csv/json/shopify/amazon |
/api/jobs/{job_id} |
GET | Get job status |
/api/jobs/{job_id}/stream |
GET | SSE stream of live updates |
/api/sources |
GET | Source redundancy counts, retailer programs, and acquisition channels |
/api/foundry/tools |
GET | Foundry function-tool definitions and sample retailer workflow context |
/api/stats |
GET | Portfolio analytics and statistics |
/api/products/{upc}/compare |
GET | Compare raw vs consolidated data |
/api/clear |
POST | Clear all products and jobs |
curl -X POST http://localhost:8000/api/batch \
-H "Content-Type: application/json" \
-d '{"upcs": ["049000050103", "022000020806"], "auto_scrape": true}'curl -X POST http://localhost:8000/api/export \
-H "Content-Type: application/json" \
-d '{"format": "shopify"}' \
--output shelfwise-shopify.csvShelfWise integrates with Microsoft Foundry through Azure OpenAI, Azure AI Inference, and Azure AI Projects when credentials are configured. The integration is architecturally complete and functional:
- Knowledge Retrieval - The scraper acts as the knowledge retrieval layer, pulling structured and unstructured data from core UPC databases, 270+ registry sources, and category-aware retailer programs
- Citations - Every field in the consolidated record includes source attribution with confidence scores (Foundry IQ-style grounding)
- Foundry Tool Calls -
/api/foundry/toolsexposes function tools for retailer workflow planning, direct retailer probe URLs, and category-scoped search domains - LLM Enrichment - When
FOUNDRY_ENDPOINT/FOUNDRY_API_KEYorAZURE_FOUNDRY_CONNECTION_STRINGare configured, the reasoning agent sends raw evidence plus the retailer tool context to Foundry for advanced consolidation - Graceful Degradation - If Foundry is unavailable, the deterministic local reasoning engine and local Foundry IQ-style knowledge graph continue to produce cited product records
Run backend/setup-azure-openai.ps1 to automatically provision the Azure OpenAI resource and configure the connection.
# Run linting
ruff check backend/
ruff format --check backend/
# Run tests
pytest tests/ -v
# Test health endpoint
curl http://localhost:8000/api/healthshelfwise/
├── backend/
│ ├── main.py # FastAPI app with SSE streaming
│ ├── models.py # Pydantic data models
│ ├── database.py # SQLite layer
│ ├── scraper.py # Async scraper with 270+ source registry
│ ├── foundry_agent.py # Multi-step reasoning agent + Azure OpenAI
│ ├── image_verifier.py # Verified product photo pipeline
│ ├── setup-azure-openai.ps1 # One-click Azure provisioning
│ └── .env.example # Environment template
├── frontend/
│ ├── index.html # Accessible UI with ARIA labels
│ ├── styles.css # Dark mode, responsive grid
│ └── app.js # SSE client, product rendering, export
├── architecture.html # Interactive architecture diagram
├── Dockerfile # Multi-stage production build
├── docker-compose.yml # One-command deploy
├── requirements.txt # Python dependencies
└── .github/workflows/ci.yml # GitHub Actions CI
- Track: Reasoning Agents (Microsoft Foundry)
- IQ Layer: Foundry IQ (agentic knowledge retrieval + citation generation)
- Repository: https://github.com/t957095/shelfwise
- Demo Video: YouTube link
- Architecture Diagram: Open
architecture.html
ShelfWise was built with accessibility as a first-class requirement:
- WCAG 2.1 AA compliant color contrast ratios
- Full keyboard navigation with visible focus indicators
- ARIA labels on all interactive elements
- Screen reader announcements for live status updates
prefers-reduced-motionsupportprefers-contrast: highsupport- Skip-to-content link for keyboard users
MIT License - see LICENSE.md
For questions or issues, open a GitHub issue or reach out on the Agents League Discord.
Built with ⚡ by the ShelfWise team for the Microsoft Agents League Hackathon 2026.