Skip to content

feat: Create native Android AI companion app (AndroidAgent)#1

Draft
magicalmutation-coder with Copilot wants to merge 4 commits into
mainfrom
copilot/create-native-android-agent-app
Draft

feat: Create native Android AI companion app (AndroidAgent)#1
magicalmutation-coder with Copilot wants to merge 4 commits into
mainfrom
copilot/create-native-android-agent-app

Conversation

Copilot AI commented Apr 27, 2026

Copy link
Copy Markdown

Bootstrap a full native Android AI companion app from an empty repo. The app connects to a local LLM, monitors messages, and exposes a robot-themed agent UI with persistent memory.

Architecture

  • Single Activity + Jetpack Navigation + BottomNavigationView (Home / Chat / Files / Settings)
  • MVVM: Room (SQLite), LiveData, Coroutines, ViewBinding, Material Design 3
  • Min SDK 26, Kotlin 1.9.22, AGP 8.2.2, Gradle 8.6

LLM Integration (llm/)

  • LLMProvider interface: chat() + listModels()
  • OllamaProvider — streaming NDJSON (/api/chat)
  • OpenAICompatibleProvider/v1/chat/completions for LM Studio, LLaMA.cpp, Jan.ai, GPT4All
  • LLMManager singleton routes to the active provider and injects Memory rows as context

Robot Agents (agents/)

Five named agents expose LiveData<String> status observed by the home screen:

Robot Role
ARIA 🤖 Main companion; mood drives CompanionFaceView expression
MAXIE 💬 SMS / WhatsApp / email monitor & auto-reply
FELIX 📁 Workspace file manager
NEXUS 🌐 Web / internet lookups
MEMO 🧠 Conversation memory indexing

UI

  • CompanionFaceView — custom Canvas view: metallic rounded head, blinking eyes with wandering pupils, mood-driven mouth, antenna; all driven by ValueAnimator
  • ChatFragment / ChatAdapter — dual-ViewHolder message bubbles (user / agent), typing indicator
  • FilesFragment — workspace CRUD with SwipeRefreshLayout
  • LLMConfigFragment — provider spinner with pre-filled base URLs, Fetch Models button, temperature Slider, Test Connection

Data Layer (data/)

Room DB with four entities: Message, Memory (key/value/category/importance 1–10), AgentContact (per-contact auto-reply config), LLMConfig

Services

  • AgentSmsReceiverBroadcastReceiver for SMS_RECEIVED → MAXIE
  • AgentNotificationListenerService — watches WhatsApp, Gmail, Outlook, Samsung/Google SMS packages

Bug fix

ChatViewModel used observeForever without cleanup; observer is now stored and removed in onCleared().

Original prompt

I want an native android app that will do the following. I will run a local llm but it should ask for which llm to use (give a list of common and their config already pre entered for editing). it is to act as an agent and be able to monitor sms, email, WhatsApp etc and if enabled for a contact or a chat reply automatically. it should be able to accept force and camera input for commands and info. should be able to chat and converse like a friendly agent and companion.. have access to a local workspace for files etc. it should have a memory of the conversations (unless they are deleted) to be able to build a useful resource for answering common questions or be able to perform tasks. it should use the memory to build up a personality and conversational material and interactions with the user and others. maybe it should have a mini sql db to store info in. make it a graphical and friendly environment with a talking face etc showing mood and whats happening. make it themed with little robots that go off on the screen and do the tasks with menus for each robot having differnt names. they should report back conversationally with whats happening like 'new mail' etc.. it should have a file manager for the stored files, and also be able to access the internet for resources. basically i bit like OpenClaw but stand alone using its own local llm config. a personal companion i can take with me and grow into a freind who can do everythign from translate to read and reply to my mail etc but with a bit of fun thrown in

Copilot AI and others added 3 commits April 27, 2026 11:46
- MainActivity with bottom navigation (Home, Chat, Files, Settings)
- CompanionFaceView: custom Canvas-drawn animated robot face with mood expressions
- 5 robot agents: ARIA (main companion), MAXIE (messaging), FELIX (files), NEXUS (web), MEMO (memory)
- AgentManager singleton with LiveData status updates for all robots
- Room database: Message, Memory, AgentContact, LLMConfig entities with DAOs
- LLM integration: OllamaProvider (streaming) and OpenAICompatibleProvider
- Pre-configured presets: Ollama, LM Studio, LLaMA.cpp, Jan.ai, GPT4All
- Chat UI with bubble messages, typing indicator, per-agent emoji/name display
- File manager with workspace directory, create/read/delete, swipe-to-refresh
- Settings: LLM config (all fields + test connection + fetch models), auto-reply toggles
- Contacts auto-reply management with per-contact toggle
- AgentNotificationListenerService: monitors WhatsApp, email, SMS notifications
- AgentSmsReceiver: intercepts SMS, routes to MAXIE, auto-replies via LLM if configured
- Persistent memory system (key/value/category/importance) injected into LLM context
- Material Design 3 dark theme with robot-blue accent color palette
- All permissions declared: INTERNET, READ/RECEIVE/SEND_SMS, READ_CONTACTS, CAMERA, RECORD_AUDIO

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: magicalmutation-coder <246345154+magicalmutation-coder@users.noreply.github.com>
… color hex casing

- SettingsFragment: use viewLifecycleOwner.lifecycleScope instead of GlobalScope
  for the clear-memories coroutine, properly tying it to the fragment lifecycle
- Remove unused ViewModel/viewModels imports from SettingsFragment
- colors.xml: fix hex casing #CCffffff -> #CCFFFFFF

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: magicalmutation-coder <246345154+magicalmutation-coder@users.noreply.github.com>
Agent-Logs-Url: https://github.com/magicalmutation-coder/AndroidAgent/sessions/70e6cbaf-2536-46e5-81c3-e4a687a6090e

Co-authored-by: magicalmutation-coder <246345154+magicalmutation-coder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add native Android app for local LLM agent feat: Create native Android AI companion app (AndroidAgent) Apr 27, 2026
@magicalmutation-coder

Copy link
Copy Markdown
Owner

@copilot ok let me see it then

Copilot AI commented Apr 27, 2026

Copy link
Copy Markdown
Author

@copilot ok let me see it then

The full source is in this PR and ready to build! Here's what you'll see when you run it:

To build and install:

git clone <repo> && cd AndroidAgent
# Open in Android Studio → click Run ▶
# OR via command line:
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk

What the app looks like:

🏠 Home screen — ARIA's animated metallic robot face at the top, blinking eyes that wander around, mood-driven mouth expression. Below it are 4 robot status cards (MAXIE, FELIX, NEXUS, MEMO) in a 2-column grid showing their current activity. A mic FAB sits bottom-right.

💬 Chat screen — Dark chat bubbles, user messages right-aligned in blue, ARIA's responses left-aligned in dark grey with robot emoji. "🤖 ARIA is thinking..." typing indicator appears while the LLM responds. Mic + camera buttons on the input bar.

📁 Files screen — SwipeRefresh list of your workspace files with name, size, date. FAB to create new text files, long-press to delete, tap to read.

⚙️ Settings → LLM Config — Provider spinner (Ollama/LM Studio/LLaMA.cpp/Jan.ai/GPT4All) auto-fills the base URL. "Fetch" button pulls available models from the server. Temperature slider, system prompt editor, Test Connection button.

First-time setup:

  1. Start your local LLM (e.g. ollama serve)
  2. Settings → Configure LLM Server → select provider → Fetch models → Set Active
  3. Go to Home and start chatting!

Note: For SMS/WhatsApp monitoring, grant Notification Access in Android system settings when prompted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants