How mangi-11/eta works
Eta is an Android system-level AI assistant. A task starts in chat or a system-assistant entry, enters the shared runtime, and is coordinated by an agent loop that requests model responses, dispatches tools, and returns results for display or local archiving. Tools span GUI interaction, device APIs, browser, terminal/files, and personal data; Skills and MCP extend tool availability. The README documents these capabilities, while source excerpts are partial, so edges below rely on documented relationships rather than unshown call paths.
Main entry points: AgentToolCatalog.kt Tool catalogs · AgentRuntimeService.kt Runtime service · AgentModelClient.kt Agent loop · MainActivity.kt Chat interface
Components 23
User entry
- Chat interface
app/src/main/kotlin/io/github/mangi/eta/ui/MainActivity.kt - Voice assistant
app/src/main/kotlin/io/github/mangi/eta/agent/voice/EtaAssistantOverlayService.kt - System hooks
app/src/main/kotlin/io/github/mangi/eta/hook/system/AssistantManager.kt
Agent runtime
- Runtime service
app/src/main/kotlin/io/github/mangi/eta/agent/runtime/AgentRuntimeService.kt - Agent loop
app/src/main/kotlin/io/github/mangi/eta/agent/model/AgentModelClient.kt - Model providers
app/src/main/kotlin/io/github/mangi/eta/agent/model/ProviderClientFactory.kt - Tool catalogs
app/src/main/kotlin/io/github/mangi/eta/agent/model/AgentToolCatalog.kt
Task capabilities
- GUI automation
app/src/main/kotlin/io/github/mangi/eta/agent/accessibility/AgentAccessibilityService.kt - Device operations
app/src/main/kotlin/io/github/mangi/eta/agent/device/RootShellDeviceController.kt - Web browser
app/src/main/kotlin/io/github/mangi/eta/agent/browser/AgentBrowserSession.kt - Terminal and files
app/src/main/kotlin/io/github/mangi/eta/agent/terminal/RootShellTerminalController.kt - Web search
app/src/main/kotlin/io/github/mangi/eta/agent/web/AgentWebTools.kt
Extensions and context
- Personal context
app/src/main/kotlin/io/github/mangi/eta/agent/context/PersonalContextQueryService.kt - Long-term memory
app/src/main/kotlin/io/github/mangi/eta/agent/memory - Skills
app/src/main/kotlin/io/github/mangi/eta/agent/skill/SkillRuntime.kt - MCP tools
app/src/main/kotlin/io/github/mangi/eta/agent/mcp/McpServerManager.kt - Character sessions
app/src/main/kotlin/io/github/mangi/eta/agent/roleplay/RoleplayRunContext.kt
Platform and persistence
- Local database
app/src/main/kotlin/io/github/mangi/eta/data/db/EtaDatabase.kt - Data repositories
app/src/main/kotlin/io/github/mangi/eta/data/repository - Run overlay
app/src/main/kotlin/io/github/mangi/eta/agent/overlay/AgentOverlayContent.kt
Other components
- User
- Model service
- Android device
Connections 28
- User → Chat interface: starts chat
README.md - User → Voice assistant: speaks or types
README.md - User → System hooks: invokes entry
README.md - Chat interface → Runtime service: submits task
README.md - Voice assistant → Runtime service: submits task
app/src/main/kotlin/io/github/mangi/eta/agent/voice/EtaAssistantOverlayService.kt - System hooks → Runtime service: hands off task
README.md - Runtime service → Agent loop: runs agent
README.md - Agent loop → Model providers: requests response
README.md - Model providers → Model service: sends request
README.md - Agent loop → Tool catalogs: selects tools
README.md - Tool catalogs → GUI automation: dispatches GUI
README.md - Tool catalogs → Device operations: dispatches operations
README.md - Tool catalogs → Web browser: dispatches browser
README.md - Tool catalogs → Terminal and files: dispatches commands
README.md - Tool catalogs → Web search: dispatches search
README.md - Tool catalogs → Personal context: dispatches retrieval
README.md - Tool catalogs → Long-term memory: uses memory
README.md - Tool catalogs → Skills: loads skills
README.md - Tool catalogs → MCP tools: dispatches MCP
README.md - Agent loop → Character sessions: uses character context
README.md - GUI automation → Android device: observes and acts
README.md - Device operations → Android device: reads and controls
README.md - Web browser → Android device: renders pages
- Runtime service → Data repositories: archives runs
README.md - Data repositories → Local database: persists data
app/src/main/kotlin/io/github/mangi/eta/data/repository/CharacterRepository.kt - Runtime service → Run overlay: reports run state
README.md - Runtime service → Chat interface: returns events
README.md - Runtime service → Voice assistant: returns events
app/src/main/kotlin/io/github/mangi/eta/agent/voice/EtaAssistantOverlayService.kt