r/FlutterDev • u/Accomplished-Team725 • Aug 21 '26
Discussion I open-sourced Lucy — a Flutter Android AI agent that can see and operate your screen
Hey Flutter devs 👋
I’ve just open-sourced Lucy, an experimental screen-aware AI agent for Android built with Flutter.
🔗 https://github.com/alzin/lucy-screen-agent
Lucy can take a voice command, understand what’s currently on the phone screen, and then tap, type, swipe, open apps, and navigate the UI automatically.
The interesting part technically is the agent loop:
Screenshot + Android accessibility tree → Gemini → action → execute → observe again
Instead of asking the model to guess screen coordinates, Lucy gives UI elements IDs and their real bounds, which makes interaction considerably more reliable.
The project currently includes:
• Flutter UI + agent controller
• Android AccessibilityService
• MediaProjection screen capture
• Gemini vision/reasoning
• Speech-to-text + TTS
• English, Japanese and Arabic support
• Multi-step agent execution
It’s still experimental, and that’s one of the main reasons I wanted to open-source it.
I’d especially love feedback or contributions from Flutter/Android developers. PRs, issues, architecture suggestions, testing, and ideas are all welcome.
I’m also interested in eventually experimenting with other LLMs and local/on-device models.
What would you improve first if you were working on something like this?
2
u/Basic_Young538 Aug 21 '26
Will follow and perhaps tryout. Great stuff
1
u/Accomplished-Team725 Aug 24 '26
1
u/Tom_Vogel Aug 21 '26
Using accessibility-tree IDs and their actual bounds instead of letting the model guess coordinates seems like a much better approach. I’d probably explore on-device models next, especially to see how far you can reduce latency and dependency on an external API. Have you tested how reliably the agent recovers when an action leads to an unexpected screen?
1
u/zwells0225 Aug 21 '26
If it works out I would do iOS support next
1
u/Street-Long9793 Aug 24 '26 edited Aug 24 '26
Really interesting approach, especially using the accessibility tree instead of relying only on screen coordinates. For people who want the AI to guide rather than fully control the UI, Guidy ai takes a different approach by looking at the screen and showing you exactly where to click step by step. I like that model for keeping the user in control while still avoiding the usual back-and-forth with docs or tutorials.