# Sleepy Agent iOS - File Structure ## Complete File List (19 Swift files) ### App (1 file) - `SleepyAgentApp.swift` - App entry point, AppDelegate, AudioSessionManager ### Core (2 files) - `Core/Models/Message.swift` - Message, ToolCall, ModelVariant models - `Core/DI/AppContainer.swift` - Manual dependency injection container ### Inference (4 files) - `Inference/LlmEngine.swift` - LiteRT-LM wrapper - `Inference/Agent.swift` - High-level agent with tool calling - `Inference/ConversationContext.swift` - Chat history management - `Inference/ToolCalling.swift` - Tool definitions and parsing ### Services (5 files) - `Services/AudioRecorder.swift` - Voice recording with VAD - `Services/TtsService.swift` - Text-to-speech (AVSpeechSynthesizer) - `Services/WebSearchService.swift` - SearXNG client - `Services/ModelDownloadService.swift` - Model download with progress - `Services/ConversationStorage.swift` - JSON persistence ### UI Views (4 files) - `UI/Views/MainView.swift` - Main chat interface with sidebar - `UI/Views/SettingsView.swift` - Settings screen - `UI/Views/MessageBubble.swift` - Chat message component - `UI/Views/InputBar.swift` - Text input with buttons ### UI ViewModels (2 files) - `UI/ViewModels/MainViewModel.swift` - Main screen logic - `UI/ViewModels/SettingsViewModel.swift` - Settings logic ### Documentation - `README.md` - Project overview - `plan.md` - Development plan with lessons learned - `FILES.md` - This file ## Missing Components The following still need implementation: 1. **Podfile** - For LiteRT dependency 2. **Info.plist** - App permissions (camera, microphone, photo library) 3. **Assets** - App icons, colors 4. **LiteRT Integration** - The actual LiteRT-LM Swift bindings need proper integration ## Next Steps to Build 1. Create Xcode project or use Swift Package Manager 2. Add LiteRT dependency via CocoaPods 3. Configure signing and bundle ID 4. Add required permissions to Info.plist 5. Test on physical device