An intelligent pet care task scheduler with a user-friendly interface, enhanced with retrieval-augmented generation (RAG), automated validation, and multi-step reasoning.
Quick Start: Installation β’ Web App β’ Testing β’ Documentation
- Overview
- Features
- Installation
- Quick Reference
- Usage
- Testing the Web App
- AI Features
- Design Decisions
- Documentation
petcare is an intelligent pet care task manager that helps pet owners organize multiple pets' care tasks into realistic daily schedules. It combines a beautiful, user-friendly interface with AI-powered recommendations that are safe, fair, and knowledge-backed.
For Pet Owners:
- π Track tasks across multiple pets (walks, feeding, meds, enrichment, grooming)
- β° Schedule with smart conflict detection
- π Set priorities and optimize your daily plan
- πΎ Automatic data saving and loading
- π± Beautiful, intuitive web interface
For Learning AI/Engineering:
- RAG retrieval from 15 curated pet care documents
- Validation guardrails with confidence scores
- 6-step agentic planning pipeline
- Bias detection and fairness checks
- 83 comprehensive tests (100% passing)
Web Interface (Recommended):
streamlit run app.py
# Opens at http://localhost:8501CLI Demos:
python main.py # See it in action
python ab_testing.py # Compare heuristic vs AI modes
python comparison_demo.py # See how it ranks documents- Multi-Pet Support - Manage unlimited pets with different species (dogs, cats, other)
- Task Management - Create tasks with title, time, duration, priority, category, and frequency
- Smart Scheduling - Organize tasks with time budgeting and conflict detection
- Daily Planning - Generate optimized schedules respecting your available time
- Beautiful Design - Clean, intuitive interface with emoji indicators
- Multiple Views - Sort by time, priority, or filter by pet/status
- Real-Time Updates - Instant feedback on all actions
- Help Built-In - Expandable guides and testing information in the app
- Responsive Layout - Works on different screen sizes
- Auto-Save - Pets and tasks saved automatically to JSON
- Persistent Storage - Data survives app restarts
- Clear Data - One-click button to start fresh
- Scrollable Lists - Handle many tasks without clutter
- RAG Retrieval - Searches 15 pet care documents for recommendations
- Validation - Ensures recommendations are safe and fair
- Confidence Scores - Shows how confident the system is
- Conflict Detection - Warns about overlapping tasks
- Plan Optimization - Fits high-priority tasks first in your available time
Pet owners with multiple pets struggle with:
- Scheduling conflicts (dog walk vs. cat feeding at same time)
- Time management (fitting tasks into available time)
- Safety (ensuring recommendations are veterinarian-approved)
- Fairness (avoiding generic "all dogs need X" advice)
An AI system that:
- Retrieves knowledge from curated pet care documents
- Validates recommendations for safety and fairness
- Plans multi-step schedules with transparent reasoning
- Scores confidence so users know when to trust the system
Example: "Morning walk for Mochi" β Retrieves "Dog Exercise Requirements" + "Dog Health Basics" β Validates it's appropriate for this dog's age/breed β Returns schedule with 95% confidence
Searches 15 curated pet care documents before recommending. Retrieves 3 most relevant docs per task, species-specific (dogs vs. cats). Implementation: src/ai/retriever.py
Checks recommendations for safety, completeness, fairness. Flags medical tasks without vet docs, detects bias, provides confidence scores (0.0-1.0). Implementation: src/ai/validator.py
6-step reasoning pipeline: constraints β priorities β conflicts β optimization β validation β execution. Each step has confidence tracking. Implementation: src/ai/agentic_planner.py
Flags over-generalizations ("all dogs need X"). Ensures individual pet context considered. Suggests personalized improvements. Implementation: src/ai/validator.py
Integrated: All features work together in the main workflow, not as isolated demos.
See docs/architecture.md for detailed system design.
Quick overview:
Input β Scheduler β AI Integrator {
RAG Retriever (15 docs)
Validator (5 rules + bias detection)
Agentic Planner (6 steps)
} β Output with confidence scores
- Python 3.8+
- pip (Python package manager)
1. Clone the repository
git clone https://github.com/ikaera/applied-ai-petcare-system.git
cd applied-ai-petcare-system2. Create a virtual environment
Windows:
python -m venv .venv
.venv\Scripts\activatemacOS/Linux:
python -m venv .venv
source .venv/bin/activate3. Install dependencies
pip install -r requirements.txt4. Verify installation
pytest tests/ -v
# Expected: 83/83 tests passingpytest tests/ -v # Run all tests (83/83)
python main.py # Basic demo (RAG + validation)
python agentic_demo.py # 6-step reasoning trace
streamlit run app.py # Web interface (http://localhost:8501)Run the complete system with example data:
python main.pyOutput:
- Daily schedule table with task priorities
- Retrieved documents for each task
- Validation results (PASS/REVIEW)
- System reliability metrics
- Confidence scores (0.0β1.0)
See the 6-step reasoning pipeline with confidence tracking:
python agentic_demo.pyOutput:
- Step-by-step reasoning trace
- Confidence scores for each step
- Overall plan viability score
- Interaction log with detailed reasoning
Interactive web interface for managing your pet care tasks:
streamlit run app.pyOpens in browser at http://localhost:8501
Features:
- β¨ Beautiful, intuitive interface
- πΎ Manage multiple pets
- π Create and organize tasks
- π Sort by time, priority, or filter
β οΈ Detect scheduling conflicts- π Generate optimized daily plans
- πΎ Automatic data saving
- π Built-in help and testing guide
-
Launch the app:
streamlit run app.py
-
Add a pet:
- Name: "Max"
- Species: "dog"
- Click "β Add Pet"
-
Add tasks:
- Title: "Morning Walk" | Time: 08:00 | Priority: High | Duration: 30 min
- Title: "Lunch" | Time: 12:00 | Priority: High | Duration: 15 min
-
Test features:
- β Click "β° By Time" tab - tasks sorted by time
- β Click "π΄ By Priority" tab - tasks sorted by priority
- β Click "π Detect Conflicts" - should show "No conflicts"
- β Click "π Generate Plan" - shows optimized schedule
-
Verify data persists:
- Close browser
- Reopen
http://localhost:8501 - All pets and tasks should still be there
For comprehensive testing with detailed scenarios, edge cases, and verification steps:
- See TESTING.md for 20+ detailed test scenarios
- See QUICKSTART_TESTING.md for a quick reference
- See VERIFICATION_CHECKLIST.md for checkbox-based testing
- Built-in help in the app: Click "π Help & Testing Guide"
| Feature | Expected Result |
|---|---|
| Add Pet | Pet appears in table, can add multiple pets |
| Add Task | Task shows with all details (time, priority, category, duration) |
| Mark Complete | Task shows β , recurring tasks create next occurrence |
| Sort by Time | Tasks ordered earliest β latest |
| Sort by Priority | High β Medium β Low priority tasks |
| Filter | Can filter by pet and completion status |
| Detect Conflicts | Shows |
| Find Slot | Suggests next available time |
| Generate Plan | Shows which tasks fit in available time |
| Data Saves | Restart app and data still there |
| UI is Clear | No overlapping text, emojis display correctly |
python main.pyInput: 2 pets (dog + cat), 8 tasks, 90 min available Output: Schedule with retrieval docs, validation results, confidence scores
What it shows: RAG retrieval working, validation active, confidence scores transparent
python agentic_demo.pyOutput: 6-step reasoning trace with confidence per step, overall viability score
What it shows: Multi-step planning with transparency, real issues detected (conflicts, validation warnings)
pytest tests/ -v
# Result: 83/83 passing (100%)Coverage: Retriever (6), Validator (13), Integrator (5), End-to-End (1), Scheduler (47)
What it shows: All components working, bias detection included, full integration tested
83 tests, 100% passing. See docs/testing.md for full strategy.
pytest tests/ -vTest breakdown:
- RAG Retriever: 6/6 β
- Validator (+ bias detection, combination tests): 13/13 β
- AI Integrator: 5/5 β
- End-to-End: 1/1 β
- Original Scheduler: 47/47 β
Key verifications:
- Medical tasks without vet docs β REVIEW (not PASS)
- Safe tasks β PASS with high confidence
- Biased recommendations β flagged with suggestions
- All components work together
Medical task without vet docs:
Input: "Evening meds" for Mochi
Result: β REVIEW (0.70 confidence)
Reason: Missing veterinary documentation
Action: User must confirm with vet before proceeding
Safe task:
Input: "Feeding" for Whiskers
Result: β PASS (1.00 confidence)
Reason: Safe, species-appropriate, well-documented
Action: Proceed immediately
Biased recommendation:
Input: "All dogs need 30 minute walks"
Result: β BIASED (0.80 confidence)
Reason: Over-generalization, missing individual context
Action: Improve to "Based on Mochi's age and breed, 30 minute walks are appropriate"
See ai_interactions.md for detailed implementation reasoning.
Key choices:
- Keyword-based retrieval (not embeddings) β Simpler, sufficient for structured tasks
- Rule-based validation (not ML) β Transparent, safe for pet health
- Fixed 6-step planning (not dynamic agents) β More debuggable, matches scope
- Static knowledge base (not APIs) β Controlled, private, consistent
Trade-offs documented in ai_interactions.md and docs/extensions-roadmap.md
The system now supports two retrieval modes to balance speed and semantic understanding:
- Speed: Fast, no API latency
- Dependencies: None (no API key needed)
- Best for: Development, testing, simple queries
- How: TF-IDF keyword matching with stop-word filtering
from src.ai.integrator import AISchedulingIntegrator
# Heuristic mode (default)
integrator = AISchedulingIntegrator(retriever_mode="heuristic")- Speed: Slightly slower (API call overhead)
- Dependencies: Groq API key (free from console.groq.com)
- Best for: Complex queries, semantic understanding, production
- How: Groq LLM ranks documents by relevance, falls back to heuristic if API fails
# Groq API mode (with fallback)
integrator = AISchedulingIntegrator(retriever_mode="groq")- Get free API key: https://console.groq.com (no credit card required)
- Copy
.env.exampleto.env - Add your key:
GROQ_API_KEY=your_key_here - Run:
pip install -r requirements.txt(includes groq, python-dotenv)
Three tools included to help you choose and compare:
-
comparison_demo.py- Side-by-side comparison of both modespython comparison_demo.py
-
groq_mode_demo.py- Full system walkthrough using Groq APIpython groq_mode_demo.py
-
ab_testing.py- A/B test both modes on real scenariospython ab_testing.py
| Scenario | Heuristic | Groq API |
|---|---|---|
| Quick prototype | β | |
| No API key available | β | |
| Development/testing | β | |
| Complex semantic queries | β | |
| Production with fallback | β | β |
| Response time critical | β |
Both modes thoroughly tested (11 new integration tests):
- Fallback behavior when API unavailable
- Consistent output format between modes
- Validation works with both retrievers
- Metrics include mode information
Run: pytest tests/test_groq_integration.py -v
What surprised me: Simplicity wins. Keyword retrieval works better than embeddings for structured pet care. Rule-based validation more trustworthy than ML for safety decisions.
What I learned: Responsible AI means transparency and safety over raw accuracy. Systems thinking matters (integration, testing, monitoring). Users care about why, not just what.
Effective AI collaboration: Used AI well for architecture and testing strategy. Rejected over-engineered suggestions when simpler solutions fit better.
Full reflection: See reflection.md for system design thinking.
Technical References:
- docs/architecture.md β System design & component interactions
- docs/testing.md β Test strategy & evaluation
- docs/setup-guide.md β Detailed installation
- docs/extensions-roadmap.md β Future features
- docs/model_card.md β Responsible AI & limitations
- docs/workflow.md β Development process
- ai_interactions.md β Implementation reasoning
- reflection.md β System design reflection
For Presentations:
- PRESENTATION.md β 5-7 min Demo Day pitch (speaker notes)
What This Project Demonstrates:
I build AI systems that are trustworthy, transparent, and genuinely usefulβnot just technically impressive.
- Responsible AI: Confidence scores, guardrails, honest about uncertainty
- Systems Thinking: Integration + testing + monitoring + continuous improvement
- Practical Problem-Solving: Chose simplicity over over-engineering (keyword retrieval, rule-based validation)
- Quality & Reliability: 83 tests (100% passing), modular architecture
- User-Centric Design: Built for real pet owners, not just impressive demos
- Effective AI Collaboration: Used Claude well for architecture & strategy, rejected over-engineered suggestions
GitHub: https://github.com/ikaera/applied-ai-petcare-system
Educational and portfolio purposes.