EggHatch-AI Tutorial
EggHatch-AI Codebase Guide
EggHatch-AI is an open-source AI shopping agent prototype for PC building and gaming laptop recommendations. It combines conversational intent understanding, review analysis, deterministic comparison logic, and local LLM synthesis into a small but thoughtfully structured demo.
This tutorial focuses on the current codebase shape:
- the Streamlit dashboard and multi-turn chat loop
- the master agent orchestration flow
- the data and NLP pipeline behind recommendations
- the new explainable laptop comparison flow
- the repo’s new spec-driven development workflow
Source Repository: AustinZ21/EggHatch-AI
flowchart LR
UI["Streamlit UI"] --> MA["Master Agent"]
MA --> DP["Data Pipeline"]
MA --> TA["Trend Analysis"]
TA --> SA["Sentiment Analysis"]
TA --> CMP["Comparison Helper"]
MA --> LLM["Ollama Client"]
MA --> STATE["Agent State"]
SPEC["Spec-Driven Workflow"] --> MA
What Changed Recently
- EggHatch-AI now supports structured laptop comparison rationale for explicit comparison queries.
- Comparison output is now rendered in the dashboard instead of living only in the generated response text.
- The repository now includes a spec-driven scaffold (
.specify/,.agents/skills/,AGENTS.md) for structured iteration. graphify-out/artifacts are being used to map the project structure as the codebase evolves.
Recommended Reading Path
If you want the fastest mental model, read in this order:
- Master Agent
- Trend Analysis
- Explainable Comparison
- Agent State
- Prompts
- Spec-Driven Workflow
Chapters
01
User Interface
How the Streamlit dashboard captures queries, streams answers, and now displays comparison breakdowns.
02
Master Agent
The orchestrator that interprets user intent, runs analysis tasks, and synthesizes the final answer.
03
LLM Client
How EggHatch-AI talks to a local Ollama model and handles generation requests.
04
Data Pipeline
Fixture loading, preprocessing, and feature engineering for recommendation logic.
05
Sentiment Analysis
How the project turns raw review text into positive, neutral, and negative signals.
06
Trend Analysis
Topic modeling, feature signals, top candidates, and the comparison payload that now sits on top.
07
Agent State
The shared state object that lets each step add context without losing the thread.
08
Prompts
The prompt layer that turns structured analysis into constrained recommendation responses.
09
Explainable Comparison
The newest feature: deterministic scoring, tradeoffs, and recommendation rationale for laptop comparisons.
10
Spec-Driven Workflow
How `.specify/` and Codex skills now shape feature design, planning, tasks, and implementation.