Inspiration

Shopping on online marketplaces like eBay, Craigslist, Facebook Marketplace, and AutoTrader can be overwhelming. With thousands of listings for used cars, electronics, and other items, it's nearly impossible to quickly determine which deals are genuinely good and which are overpriced or hiding red flags. We've all experienced the frustration of spending hours comparing prices, reading descriptions, and second-guessing whether we're getting ripped off. We created Lookout to solve this problem—an AI-powered research assistant that instantly evaluates marketplace listings and tells you exactly what's a great deal and what's not worth your time.

What it does

Lookout is an intelligent marketplace research agent that helps users make smarter purchasing decisions. Users create evaluation sessions by category (cars, electronics, furniture, etc.) and paste in listing URLs or descriptions from any marketplace. The AI agent, powered by Google Gemini, analyzes each listing and assigns a deal quality score from 0-100 with clear rationales explaining the scoring.

The system goes beyond simple price comparison. If a listing lacks critical information—like mileage for a car or condition details for electronics—the agent asks targeted clarifying questions to get a complete picture before scoring. These questions appear inline with each listing, making it easy to provide missing details. The agent learns user preferences over time, remembering budget constraints, must-have features, and deal-breakers across sessions.

Listings are automatically ranked and color-coded: horrible deals (0-20) in red, poor deals (21-40) in orange, fair deals (41-60) in yellow, good deals (61-80) in lime, and great deals (81-100) in green with special highlighting. Users can chat with the agent via a popup interface to ask additional questions, and they can manually re-evaluate any listing with one click to get fresh analysis. Session-level requirements allow users to specify their budget, priorities, and preferences upfront, giving the agent better context for evaluations.

How we built it

Lookout uses a modern full-stack architecture with clean separation of concerns. The frontend is built with React and React Router, featuring a dark-themed UI with responsive design, real-time updates, and an innovative chat popup interface. The backend runs on FastAPI with SQLite for data persistence, structured around five core tables: users, sessions, listings, messages, and agent_memory.

The architecture has three distinct layers: the web UI handles user interactions and display, the backend API service owns all canonical data and orchestrates the agent, and the agent interface layer handles all LLM interactions and prompt engineering. This separation ensures the backend remains model-agnostic while the agent layer manages conversation history, user preferences, and session summaries in dedicated memory storage.

We integrated Google Gemini 2.0 Flash Lite for AI capabilities, implementing structured tool-calling patterns where the agent returns JSON actions like UPDATE_EVALUATIONS (with scores and rationales), ASK_CLARIFYING_QUESTION (for missing information), and UPDATE_PREFERENCES (for learned user preferences). The agent maintains stateful memory by storing user preferences and session summaries in the agent_memory table, reducing the need to send full conversation histories with each request.

Authentication uses session cookies with bcrypt password hashing. CORS middleware ensures secure cross-origin requests between frontend and backend. The entire system was built with comprehensive testing—95 passing tests across backend and frontend—ensuring reliability and maintainability.

Challenges we ran into The biggest technical challenge was implementing the clarifying question state machine. We needed a clean way to handle blocking questions where the agent pauses evaluation until the user provides an answer, while still allowing non-blocking chat interactions. This required careful state management with session statuses (ACTIVE, WAITING_FOR_CLARIFICATION, CLOSED) and message linking to track which answer corresponds to which question.

Preventing the agent from repeating questions proved surprisingly difficult. Even with explicit prompt instructions, the LLM occasionally asked for information already provided in conversation history or listing descriptions. We solved this by strengthening prompt guardrails with CRITICAL warnings and carefully structuring the conversation context to include previous clarifications.

Managing agent memory efficiently was another hurdle. Sending full chat histories with every request was expensive and slow. We implemented a dual-memory system: user-level preferences stored persistently across sessions, and session-level summaries that capture key decisions without retaining every message. This reduced token usage while maintaining context awareness.

UI/UX refinement took multiple iterations. Initial designs had the chat interface taking up significant screen space, competing with listings for attention. We pivoted to a bottom-right popup button that keeps the focus on listings while making the agent easily accessible. Color scheme adjustments were necessary to ensure text visibility in dark mode—input fields, placeholder text, and agent message bubbles all needed careful contrast tuning.

CORS configuration caused deployment headaches when frontend port switching (5173 vs 5174) broke authentication. We learned to maintain consistent .env configuration across root and backend directories and to properly restart services when environment variables change.

Accomplishments that we're proud of We're proud of building a fully functional MVP with 95 passing tests in a short timeframe. The clean architectural separation between data ownership (backend), LLM logic (agent interface), and presentation (frontend) makes the codebase maintainable and extensible. Our prompt engineering resulted in an agent that genuinely understands marketplace listings and provides insightful, actionable evaluations.

The user experience feels polished—the dark theme with gradient accents, floating chat popup, automatic listing ranking, and real-time updates create a professional, modern interface. The session requirements feature and preference learning demonstrate thoughtful design that respects user context.

Comprehensive documentation (CLAUDE.md, lookout_design.md, tasks.md) ensures the project is approachable for future development. The modular architecture means we can swap LLM providers or add new features without major refactoring.

What we learned

Prompt engineering is both an art and a science. Small wording changes—like replacing "do not repeat questions" with "CRITICAL: NEVER repeat a question"—significantly impact LLM behavior. Structuring conversation context carefully (listing descriptions, metadata, prior answers) is essential for reliable outputs.

Stateful AI interactions require thoughtful state management. Blocking clarifying questions needed a proper state machine, not ad-hoc flags. Agent memory reduces costs and latency, but requires careful design to avoid stale or conflicting information.

Separation of concerns isn't just good practice—it's essential for AI-powered applications. Keeping prompt logic isolated in the agent interface meant we could iterate rapidly on LLM behavior without touching core application logic.

User testing reveals unexpected issues. What seemed like a minor color choice (black text on dark backgrounds) rendered the app unusable. The chat interface placement went through three iterations based on how it competed with the primary content (listings).

What's next for Lookout

We plan to add web scraping integration to automatically extract listing details from URLs, eliminating manual copy-paste. Multi-marketplace comparison would let users see similar items across platforms with normalized scoring. Historical price tracking could alert users when listings drop to their target price.

Enhanced preference learning with explicit preference management UI would give users control over what the agent remembers. Category-specific evaluation criteria (different factors for cars vs. electronics) would improve accuracy. Collaborative filtering could show "users who liked this also liked..." recommendations.

Real-time notifications for new great deals in watched categories, export functionality for evaluation reports, and mobile app development round out our roadmap. The foundation is solid—now we're ready to scale Lookout into the ultimate marketplace research tool.

Built With

Share this project:

Updates