An Android-first local AI Agent app
Lyra Code is an Android-first local AI Agent app. It brings model chat, file tools, native downloads, command execution, web search, MCP, SSH, WebDAV, backups, Skills, device diagnostics, and usage statistics into a mobile workflow, so an Android device can handle coding, writing, research, remote maintenance, and automation tasks.
| Chat | Settings | Agent Tools |
|---|---|---|
![]() |
![]() |
![]() |
- OpenAI Chat Completions-compatible APIs.
- Anthropic Messages API.
- Gemini GenerateContent API.
- Multiple providers, API keys, base URLs, and saved models.
- Fast provider/model/system-prompt/reasoning-depth switching during chat.
- HTTP API URLs are supported with an explicit security warning.
- File read, write, append, rename, move, delete, directory creation, and global file search.
- Native HTTP/HTTPS file downloads to the workspace or Android shared storage, with redirects, custom headers, timeouts, and optional SHA-256 verification.
- Command execution through Termux RunCommandService with stdout/stderr feedback.
- TODO planning, process records, file-change review, and diff visualization.
- Web search, web page reading, and source annotation.
- Time awareness, location awareness, and configuration management.
- Multi-round tool loops with user review, approval, and per-session confirmation bypass.
- Native downloads are preferred; Termux
curl/wgetare retained only as fallback options.
- Device information page covering manufacturer, model, Android version, CPU/hardware, ABI, memory, storage, display, network, Bluetooth, and battery state.
- Hardware inspection Agent for device diagnostics, troubleshooting, and hardware comparison.
- Installed-app recognition with app name, package name, version, size, category, and signing certificate SHA-256.
- Optional Shizuku Shell and Root command tools with configurable
sucommands, permission fallback, full command preview, and explicit user approval. - System-level tools can be disabled independently from the Agent settings page.
- MCP: remote MCP servers over Streamable HTTP or SSE.
- SSH: password/key login for Linux, Windows, and Git servers, with user-approved command execution.
- WebDAV: file listing, PROPFIND, search, upload, download, and cloud backup.
- Natural-language configuration management for MCP, SSH, WebDAV, Skills, and Agent tools.
- Import zip packages or a single
SKILL.mdfile. - Import a full GitHub / Gitee / GitLab repository.
- Manually create a Skill by editing
SKILL.md. - The Agent first reads
name/descriptionto judge relevance, then reads internal files on demand to avoid context bloat.
- Image upload, photo capture, cropping, rotation, brush annotation, and mosaic annotation.
- Thumbnail preview, full-screen preview, and save support for user/AI images and videos.
- Markdown, tables, code blocks, LaTeX math, and media Data URL rendering.
- Preview and save AI-returned base64 media, remote URLs, and local media files.
- Light, dark, and system-following theme modes.
- Optional Material You dynamic color, applying wallpaper-derived colors without changing the app layout.
- Adjustable font size with live preview, system-following mode, and a wider custom range.
- Refresh-rate preference: system smart mode, 30 Hz, 60 Hz, 90 Hz, or 120 Hz. The final effective rate still depends on device and Android display policy.
- Export/import profile data, conversation history, model providers, MCP, SSH, WebDAV, system prompts, Skills, and immersive roleplay scenarios.
- Local zip backup and WebDAV cloud backup.
- Supplement import mode with deduplication to reduce the risk of overwriting existing secrets.
- Safe export without API keys, or full migration export with secrets included.
- Counts conversations, messages, user-input tokens, and AI-output tokens, including reasoning and tool context.
- Offline token estimation without a network dependency.
- Daily, weekly, monthly, yearly, total, and historical date-range views.
- Import character scenario packages and configure AI nickname, avatar, chat background, and sticker shortcodes.
- Separate history between normal chat and immersive roleplay.
- Affection state, sticker replacement, and character memory.
- Chat-bubble UI optimized for roleplay sessions.
app/ Android application module
app/src/main/java/... Kotlin / Jetpack Compose source code
third_party/jlatexmath/ JLaTeXMath Android fork for LaTeX rendering
example-img/ README screenshots
gradle/ Gradle Wrapper configuration
- Android Studio or command-line Android SDK
- JDK 11+
- Android SDK 36
- Gradle Wrapper
Build a debug APK:
.\gradlew.bat assembleDebugThe generated APK is usually under:
app/build/outputs/apk/debug/
For release builds, configure signing in Android Studio manually. Do not commit signing keys, keystores, API keys, .env, local.properties, or local private files.
Before using run_command, enable external app calls in Termux:
mkdir -p ~/.termux && (grep -qxF 'allow-external-apps=true' ~/.termux/termux.properties || echo 'allow-external-apps=true' >> ~/.termux/termux.properties) && termux-reload-settingsThen grant the Termux communication permission in Lyra Code settings. If permission is not granted, run_command is disabled automatically.
Lyra Code may handle API keys, SSH passwords/private keys, MCP tokens, WebDAV passwords, conversations, local files, and remote server output. Please note:
- HTTP API, MCP, and WebDAV endpoints are insecure unless protected by HTTPS or a trusted network.
- Review tool calls before allowing AI to execute commands, edit files, upload/download files, or operate remote servers.
- Backup files containing secrets must be stored carefully and must not be shared publicly.
- This project does not verify that remote scripts, MCP servers, Skill repositories, or SSH commands are trustworthy.
This project does not accept external pull requests. If you have feedback or suggestions, please submit an issue. If you need long-term modifications, fork this repository for independent maintenance or contact the repository owner.
This project uses a dual-license model. The original Lyra Code source code is available under AGPLv3-or-later. A commercial license is required for closed-source distribution, private modifications, commercial exceptions, or use cases where you do not want to comply with AGPL copyleft obligations. Third-party components remain governed by their own licenses.
See LICENSE and THIRD_PARTY_NOTICES.md for details.



