How newo-ether/agora works
Agora is an Android BYOK LLM client. The main workflow is: a user selects a model and sends a chat message; Agora routes generation to a configured provider, streams the response, and stores conversations locally. Agent runs can additionally invoke tools, retrieve memory or conversation context, and schedule Tasks or Loops. Other documented capabilities include local llama.cpp models, remote device control, portable import/export, and scheduled backups. The graph combines README-documented flows with sampled source references; unsampled implementation details are not assumed.
Main entry points: ToolProvider.kt Agent tools · viewmodel Generation runtime · TaskExecutionEngine.kt Task execution · ConversationRepository.kt Conversation repository
Components 27
Chat experience
- Chat UI
app/src/main/java/com/newoether/agora/ui/chat/ChatApp.kt - Android app
app/src/main/java/com/newoether/agora/MainActivity.kt
Models and generation
- Generation runtime
app/src/main/java/com/newoether/agora/viewmodel - Provider API
app/src/main/java/com/newoether/agora/api/HttpClient.kt - Provider adapters
app/src/main/java/com/newoether/agora/api/openai - Local models
app/src/main/java/com/newoether/agora/api/local/LocalProvider.kt - llama.cpp runtime
app/src/main/java/com/newoether/agora/api/LlamaChatEngine.kt
Agent capabilities
- Agent tools
app/src/main/java/com/newoether/agora/tool/ToolProvider.kt - MCP integration
app/src/main/java/com/newoether/agora/mcp/McpProtocolClient.kt - Memory
app/src/main/java/com/newoether/agora/data/MemoryManager.kt - Conversation RAG
app/src/main/java/com/newoether/agora/viewmodel/RagManager.kt - Embedding indexer
app/src/main/java/com/newoether/agora/service/EmbeddingCacheWorker.kt - Web search
app/src/main/java/com/newoether/agora/tool/WebSearchToolProvider.kt - Image generation
app/src/main/java/com/newoether/agora/tool/ImageGenToolProvider.kt
Data and persistence
- Conversation repository
app/src/main/java/com/newoether/agora/data/repository/ConversationRepository.kt - Chat database
app/src/main/java/com/newoether/agora/data/local/ChatDatabase.kt - Settings repository
app/src/main/java/com/newoether/agora/data/repository/SettingsRepository.kt - Settings manager
app/src/main/java/com/newoether/agora/data/SettingsManager.kt - Portable archives
app/src/main/java/com/newoether/agora/data/DataExporter.kt
Automation and remote
- Task execution
app/src/main/java/com/newoether/agora/automation/TaskExecutionEngine.kt - Task scheduler
app/src/main/java/com/newoether/agora/automation/AutomationScheduler.kt - Foreground service
app/src/main/java/com/newoether/agora/service/AgoraForegroundService.kt - Remote control
app/src/main/java/com/newoether/agora/remote/FiloClient.kt - Alpine sandbox
app/src/fdroid/java/com/newoether/agora/sandbox/ProotSandboxManager.kt - Scheduled backups
app/src/main/java/com/newoether/agora/data/AutoBackupManager.kt
Other components
- User
- Model providers
Connections 27
- User → Chat UI: sends message
README.md - Chat UI → Generation runtime: starts generation
README.md - Generation runtime → Provider API: requests completion
README.md - Provider API → Provider adapters: routes protocol
- Provider adapters → Model providers: sends request
README.md - Generation runtime → Local models: uses local model
README.md - Local models → llama.cpp runtime: runs inference
- Generation runtime → Conversation repository: persists conversation
README.md - Conversation repository → Chat database: stores messages
app/src/main/java/com/newoether/agora/data/repository/ConversationRepository.kt - Chat UI → Settings repository: reads settings
- Settings repository → Settings manager: publishes settings
app/src/main/java/com/newoether/agora/data/repository/SettingsRepository.kt - Generation runtime → Agent tools: invokes tools
README.md - Agent tools → MCP integration: uses MCP
README.md - Agent tools → Memory: accesses memory
README.md - Agent tools → Conversation RAG: retrieves context
README.md - Conversation RAG → Embedding indexer: schedules indexing
app/src/main/java/com/newoether/agora/viewmodel/RagManager.kt - Agent tools → Web search: searches web
README.md - Agent tools → Image generation: generates images
README.md - Task execution → Generation runtime: runs generation
app/src/main/java/com/newoether/agora/automation/TaskExecutionEngine.kt - Task scheduler → Task execution: schedules tasks
- Task execution → Conversation repository: records executions
app/src/main/java/com/newoether/agora/automation/TaskExecutionEngine.kt - Task execution → Foreground service: keeps work active
- Agent tools → Remote control: controls devices
README.md - Agent tools → Alpine sandbox: runs sandbox commands
README.md - User → Portable archives: imports or exports
README.md - Portable archives → Conversation repository: archives conversations
- Scheduled backups → Portable archives: creates backups