Skip to content

mastercoder421/Astra-Ai

 
 

Repository files navigation

AI Secretary App

Overview

The AI Secretary App is an AI-powered personal secretary application designed to assist users with various tasks through voice and text interactions. It utilizes a local LLM (LLaMA 3 via Ollama) to provide intelligent responses and has memory-based context and retrieval-augmented generation (RAG) capabilities.

Features

  • Voice and text input support
  • Intelligent responses using LLaMA 3
  • Memory management for context-aware interactions
  • User-friendly chat interface
  • Settings management for user preferences

Project Structure

ai-secretary-app
├── app
│   ├── src
│   │   ├── main
│   │   │   ├── kotlin
│   │   │   │   └── com
│   │   │   │       └── example
│   │   │   │           └── aisecretary
│   │   │   │               ├── MainActivity.kt
│   │   │   │               ├── SecretaryApplication.kt
│   │   │   │               ├── ui
│   │   │   │               │   ├── chat
│   │   │   │               │   │   ├── ChatFragment.kt
│   │   │   │               │   │   ├── ChatViewModel.kt
│   │   │   │               │   │   └── MessageAdapter.kt
│   │   │   │               │   └── settings
│   │   │   │               │       ├── SettingsFragment.kt
│   │   │   │               │       └── SettingsViewModel.kt
│   │   │   │               ├── data
│   │   │   │               │   ├── model
│   │   │   │               │   │   ├── Message.kt
│   │   │   │               │   │   └── ConversationContext.kt
│   │   │   │               │   ├── repository
│   │   │   │               │   │   ├── ChatRepository.kt
│   │   │   │               │   │   └── VoiceRepository.kt
│   │   │   │               │   └── local
│   │   │   │               │       ├── database
│   │   │   │               │       │   ├── AppDatabase.kt
│   │   │   │               │       │   └── dao
│   │   │   │               │       │       └── MessageDao.kt
│   │   │   │               │       └── preferences
│   │   │   │               │           └── UserPreferences.kt
│   │   │   │               ├── ai
│   │   │   │               │   ├── llm
│   │   │   │               │   │   ├── LlamaClient.kt
│   │   │   │               │   │   └── OllamaService.kt
│   │   │   │               │   ├── voice
│   │   │   │               │   │   ├── SpeechRecognizer.kt
│   │   │   │               │   │   └── TextToSpeech.kt
│   │   │   │               │   ├── memory
│   │   │   │               │   │   ├── ConversationMemory.kt
│   │   │   │               │   │   └── MemoryManager.kt
│   │   │   │               │   └── rag
│   │   │   │               │       ├── DocumentStore.kt
│   │   │   │               │       ├── Retriever.kt
│   │   │   │               │       └── VectorStore.kt
│   │   │   │               └── di
│   │   │   │                   └── AppModule.kt
│   │   │   ├── res
│   │   │   │   ├── layout
│   │   │   │   │   ├── activity_main.xml
│   │   │   │   │   ├── fragment_chat.xml
│   │   │   │   │   └── fragment_settings.xml
│   │   │   │   ├── values
│   │   │   │   │   ├── colors.xml
│   │   │   │   │   ├── strings.xml
│   │   │   │   │   └── themes.xml
│   │   │   │   └── navigation
│   │   │   │       └── nav_graph.xml
│   │   │   └── AndroidManifest.xml
│   │   └── test
│   │       └── kotlin
│   │           └── com
│   │               └── example
│   │                   └── aisecretary
│   │                       └── LlmClientTest.kt
│   └── build.gradle.kts
├── build.gradle.kts
├── settings.gradle.kts
└── README.md

Setup Instructions

  1. Clone the repository:
    git clone https://github.com/A-Akhil/Astra-Ai.git
    
  2. Open the project in your preferred IDE.
  3. Copy secrets.properties.template to secrets.properties and configure:
    OLLAMA_BASE_URL=https://your-ollama-server-url
    LLAMA_MODEL_NAME=llama3:8b
  4. Ensure you have the necessary SDKs and dependencies installed.
  5. Build and run the application on an Android device or emulator.

Model Configuration

The LLM model is configurable in secrets.properties. For low-RAM systems, use lightweight alternatives:

# Lightweight options (requires less RAM):
LLAMA_MODEL_NAME=phi3           
LLAMA_MODEL_NAME=llama3.2:1b    
LLAMA_MODEL_NAME=qwen2.5:0.5b   
LLAMA_MODEL_NAME=gemma2:2b      
LLAMA_MODEL_NAME=llama3:8b

Usage

  • Launch the application and interact with the AI Secretary using voice or text.
  • Access settings to customize your preferences.
  • The app will remember previous interactions to provide context-aware responses.

Contributing

Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.

Contributors

License

This project is licensed under the MIT License. See the LICENSE file for details.

Please support the development by donating.

BuyMeACoffee

Current Features ✅

🤖 AI & Machine Learning
  • LLM Integration

    • LLaMA 3 integration via Ollama
    • System prompt management
    • Context-aware responses
    • Error handling and retry logic
  • Memory System

    • Basic memory storage
    • Memory detection from responses
    • JSON memory extraction
    • Memory cleanup
  • Voice Processing

    • Text-to-Speech
    • Speech Recognition
    • Wake word detection
    • Background listening
📱 Core Features
  • User Interface

    • Chat interface
    • Settings management
    • Voice input/output
    • Message history
  • System Integration

    • Background service
    • Lifecycle management
    • Model loading/unloading
    • Error recovery

Future Enhancements 🚀

🤖 AI & Machine Learning
  • Offline LLM Integration

    • On-device model processing
    • Model quantization
    • Model download management
    • Fallback system
  • Enhanced Memory System

    • Memory categories
    • Memory search
    • Memory expiration
    • Memory tags
    • Export/import feature
  • Learning & Adaptation

    • User preference learning
    • Response style adaptation
    • Conversation history analysis
    • Pattern recognition
    • Behavior learning
🎤 Voice & Communication
  • Voice Improvements

    • Multiple voice options
    • Voice activity detection
    • Background noise cancellation
    • Voice profiles
    • Voice command shortcuts
  • Messaging Integration

    • WhatsApp integration
    • SMS integration
    • Telegram integration
    • Message scheduling
    • Message templates
  • Email Integration

    • Gmail/Outlook integration
    • Email composition
    • Email reading
    • Email scheduling
    • Email categorization
📱 App Integration & Automation
  • System Integration

    • Screen brightness control
    • Volume control
    • Bluetooth management
    • WiFi control
    • Battery optimization
  • App Control

    • App launching
    • Settings management
    • Permissions management
    • Updates checking
    • Usage statistics
  • Quick Actions

    • One-tap actions
    • Custom shortcuts
    • Gesture controls
    • Widget controls
    • Quick reply templates
📅 Task & Time Management
  • Calendar Integration

    • Google Calendar integration
    • Meeting scheduling
    • Event reminders
    • Recurring events
    • Calendar sharing
  • Task Management

    • Todo list integration
    • Task prioritization
    • Deadline tracking
    • Task sharing
    • Progress tracking
🔒 Security & Privacy
  • Access Control

    • App-specific permissions
    • Data access controls
    • Integration permissions
    • Privacy settings
    • Security policies
  • Data Protection

    • End-to-end encryption
    • Secure storage
    • Data backup
    • Data recovery
    • Privacy controls
📊 Analytics & Insights
  • Usage Tracking

    • App usage statistics
    • Integration usage
    • Command frequency
    • Response times
    • Error rates
  • Performance Monitoring

    • Battery usage
    • Memory usage
    • CPU usage
    • Network usage
    • Storage usage
🔄 Integration & APIs
  • Third-party Apps

    • Slack integration
    • Microsoft Teams
    • Zoom integration
    • Trello integration
    • Jira integration
  • Cloud Services

    • Google Drive
    • Dropbox
    • OneDrive
    • iCloud
    • Backup services
🎨 UI/UX Improvements
  • Customization

    • Dark/light theme
    • Custom voice commands
    • Custom shortcuts
    • Custom templates
    • Custom workflows
  • Accessibility

    • Voice control
    • Gesture control
    • Screen reader support
    • High contrast mode
    • Font size adjustment

In Progress 🏗️

Current Development
  • Voice Improvements

    • Basic TTS implementation
    • Basic Speech Recognition
    • Multiple voice options
    • Voice activity detection
    • Background noise cancellation
  • Memory System

    • Basic memory storage
    • Memory detection
    • Memory categories
    • Memory search
    • Memory expiration
  • UI/UX

    • Basic chat interface
    • Settings screen
    • Dark/light theme
    • Custom voice commands
    • Gesture controls

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%