FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

AndroidUsePdd/conversationHistory at main · hackathonprojs/AndroidUsePdd · GitHub

Latest commit

 

History

History
 
 

README.md

AndroidUse durable memory architecture

This directory contains the Step 7 generation plan for adding a privacy-preserving, Mem0-backed long-term memory layer to the existing AndroidUse application. It is not a standalone Android project: generated Kotlin and documentation files merge into the repository's existing single :app Gradle module.

Prerequisites

  • JDK 17
  • Android SDK 36 with an API 34+ device or emulator
  • The repository's Gradle wrapper
  • An application backend implementing docs/memory-backend-contract.md
  • An application SessionProvider; the default no-session provider leaves memory disabled and the assistant operational

Installation and local use

  1. Copy the non-secret setting from conversationHistory/local.properties.example into the repository-root local.properties.
  2. Set MEMORY_BACKEND_BASE_URL to the authenticated application backend. Never put a Mem0 workspace key in this file or the Android app.
  3. Generate modules in conversationHistory/architecture.json by priority and merge dependencies into the existing version catalog and app/build.gradle.kts without upgrading unrelated libraries.
  4. Build with ./gradlew assembleDebug.
  5. Run unit checks with ./gradlew testDebugUnitTest lintDebug.
  6. With an emulator/device available, run ./gradlew connectedDebugAndroidTest.

Configuration

MEMORY_BACKEND_BASE_URL is a non-secret URL populated into BuildConfig from local.properties or CI. An empty value selects no-op memory behavior. Authentication comes at runtime from SessionProvider.currentSession(): AppSession?; the access token must never be placed in BuildConfig, resources, preferences, source control, or logs.

The enablement flag is stored in app-private SharedPreferences and defaults to disabled. Run IDs and retrieved context remain in RAM. The backend remains the source of truth.

Architecture overview

Pure Kotlin domain and policy layers feed an authenticated Ktor gateway. The gateway uses Ktor 2.3.12 with the existing OkHttp engine, one reused client, and org.json DTO parsing. A concurrency-safe coordinator retrieves once per task and caches a bounded untrusted context. UIAgentAccessibilityService passes that same context to Gemini, OpenAI, or Anthropic and writes an approved candidate only at the successful done boundary. Manual constructor injection in MemoryComponent selects backend or no-op behavior. Compose settings provide enable, list, delete-one, and confirmed delete-all controls.

No Android database or local memory-content cache is added. Screenshots, accessibility trees, visible/focused text, clipboard or notification content, coordinates, gestures, intermediate actions, conversation history, raw model reasoning, credentials, authorization headers, and backend bodies are never retained as durable memory or emitted through memory telemetry.

CI

The included workflow runs Gradle validation and build tasks with JDK 17. Instrumentation tests require an emulator-enabled runner and can be added to the repository's Android device-testing workflow.


Back | FazBrowse Home | New Git URL