Add Home Security AI Agent with iOS-Compatible Mobile API#2
Draft
nfaggian wants to merge 3 commits into
Draft
Conversation
- Create home_security_agent with Google ADK integration - Smart lock management (view status, lock/unlock doors) - Camera monitoring (status, snapshots, motion events) - Sensor monitoring (motion, door/window, smoke, water leak) - Security system control (arm/disarm with modes) - AI chat interface for natural language interaction - Build FastAPI mobile backend for iOS/Android apps - RESTful API endpoints for all device operations - Quick action endpoints (goodnight, leaving, arriving routines) - Push notification registration and settings - Pydantic models for request/response validation - Full Swagger/OpenAPI documentation at /docs - Add comprehensive test suite (52 tests) - Tests for all device tools - Tests for all API endpoints - Tests for chat functionality - Update documentation with usage examples - API endpoint reference - Swift integration examples - New Makefile targets Co-authored-by: Nathan Faggian <nathan.faggian@gmail.com>
- Change default model from gpt-oss:20b to gemma2:9b via Ollama - Add HOME_SECURITY_MODEL environment variable for model override - Support multiple Gemma variants (7b, 9b, 27b) and Google AI Studio - Update README with Gemma setup instructions Co-authored-by: Nathan Faggian <nathan.faggian@gmail.com>
Features: - Dashboard with security score gauge and quick actions (goodnight/leaving/arriving) - Locks view with real-time status, lock/unlock controls, battery indicators - Cameras view with motion events timeline and detection confidence - AI Chat assistant with conversation history and smart suggestions - Settings with server config, arm/disarm controls, activity log, sensors Architecture: - SwiftUI with MVVM pattern - Async/await networking via URLSession - Codable models matching API responses - iOS 17.0+ with modern SwiftUI features Includes: - Full Xcode project configuration - Asset catalogs for app icon and accent color - Detailed README with setup instructions Co-authored-by: Nathan Faggian <nathan.faggian@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a comprehensive home security AI agent that monitors smart locks, cameras, and sensors, with a REST API and a complete native iOS app.
Features
Home Security Agent
Uses Gemma 2 9B model by default via local Ollama for AI interactions.
Mobile API (FastAPI)
/docsiOS App (NEW)
A complete native SwiftUI iOS application:
Screens:
Technical:
Project Structure
Usage
Testing
52 tests covering all agent tools and API endpoints:
make testRequirements