A voice-powered AI agent that helps you order from the Walmart mobile app using natural language commands.
- 🎤 Voice Commands: Speak naturally to add items to your cart
- 📦 Order History: Automatically add items from previous orders
- 🤖 AI-Powered: Understands natural language and context
- 🔄 Extensible: Designed to support other shopping apps in the future
- Backend: Python 3.11+
- API Framework: FastAPI
- Mobile App: React Native with Expo (TypeScript)
- Voice Recognition: OpenAI Whisper API (or Google Speech-to-Text)
- AI Agent: OpenAI GPT-4 / GPT-4 Turbo (or Anthropic Claude)
- Mobile Automation: Appium (cross-platform) or Android ADB
- Database: SQLite (development) / PostgreSQL (production)
- Task Queue: Celery with Redis (for async operations)
- OpenAI API: For voice transcription and AI agent
- Walmart API: (Note: Walmart doesn't have a public API, so we'll use mobile automation)
- Android Debug Bridge (ADB): For Android device automation
┌─────────────────┐
│ Mobile Device │
│ (Walmart App) │
└────────┬────────┘
│
│ ADB/Appium
│
┌────────▼─────────────────────────┐
│ Automation Layer │
│ (Appium/ADB Controller) │
└────────┬─────────────────────────┘
│
│
┌────────▼─────────────────────────┐
│ Backend API (FastAPI) │
│ ┌─────────────────────────────┐ │
│ │ Voice Processing Module │ │
│ │ (Speech-to-Text) │ │
│ └─────────────────────────────┘ │
│ ┌─────────────────────────────┐ │
│ │ AI Agent Module │ │
│ │ (Intent Recognition) │ │
│ └─────────────────────────────┘ │
│ ┌─────────────────────────────┐ │
│ │ Order History Manager │ │
│ └─────────────────────────────┘ │
└────────┬─────────────────────────┘
│
│
┌────────▼────────┐
│ Database │
│ (SQLite/Postgres)│
└─────────────────┘
Wally/
├── backend/ # Python FastAPI backend
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py # FastAPI application
│ │ ├── config.py # Configuration management
│ │ ├── models/ # Database models
│ │ ├── api/ # API routes
│ │ ├── services/ # Business logic
│ │ │ ├── voice_service.py
│ │ │ ├── ai_agent.py
│ │ │ ├── order_history.py
│ │ │ └── automation.py
│ │ └── utils/ # Utilities
│ ├── tests/
│ └── requirements.txt
├── mobile/ # React Native Expo mobile app
│ ├── app/ # Expo Router screens
│ │ ├── (tabs)/ # Tab navigation
│ │ ├── onboarding.tsx # First-time setup
│ │ └── _layout.tsx # Root layout
│ ├── api/ # API client layer
│ ├── config/ # Configuration & storage
│ └── package.json
├── automation/
│ ├── android/ # Android automation scripts
│ └── ios/ # iOS automation scripts (future)
├── config/
│ └── config.yaml # Configuration file
├── env.example # Environment variables template
├── README.md # This file
└── MOBILE_SETUP.md # Mobile app setup guide
- Python 3.11+
- Rust (for building Pydantic) - Installation Guide
- Android Debug Bridge (ADB) - Installation Guide
- Android device with USB debugging enabled (or Android emulator)
- OpenAI API key
-
Clone the repository
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r backend/requirements.txt
-
Copy
env.exampleto.envand fill in your API keys:copy env.example .env # Windows # or cp env.example .env # macOS/Linux
-
Run the backend server:
cd backend uvicorn app.main:app --reload
-
Start the backend server:
cd backend uvicorn app.main:app --reload -
The backend will be available at
http://localhost:8000- API docs:
http://localhost:8000/docs - Health check:
http://localhost:8000/health
- API docs:
-
Setup Mobile App (see MOBILE_SETUP.md for details):
cd mobile npm install npm start -
First Launch:
- Grant microphone permission
- Enter backend URL (local network IP or cloud URL)
- Enable wireless debugging (for automation)
-
Using Voice Commands:
- Open the Voice tab
- Tap record button and speak your command
- View transcription and results
You can also use the backend API directly:
- Send voice commands via
POST /api/v1/voice/process-command - View order history via
GET /api/v1/orders/history - See API documentation at
http://localhost:8000/docs
- "Add milk, eggs, and bread"
- "Add my usual groceries"
- "Show me my previous orders"
- "Add everything from my last order"
- Project structure and setup
- Voice recognition integration
- AI agent for intent recognition
- Android automation for Walmart app
- Order history tracking
- Mobile app (React Native/Expo)
- iOS support
- Support for other shopping apps
- Requires the Walmart app to be installed
- May break if Walmart updates their app UI
- Should be used responsibly and in compliance with Walmart's Terms of Service
MIT License