Android·
How Instagram Direct engineers built AI-native UI architecture with Jetpack Compose and reduced token cost per agent session by 33%
TL;DR
Instagram Direct’s heavily optimized Android UI had become costly to maintain and difficult for AI coding assistants to work with reliably. Engineers gradually rebuilt it with Jetpack Compose, using clear state boundaries and shared AI workflows while testing against existing performance standards. Migrated surfaces used 50% less UI code, with 33% lower token cost per agent session and 35% less agent execution time per character of landed code.
Relevant links
- Blogdeveloper.android.com
- Case Studiesdeveloper.android.com
- Pavlo Stavytskyideveloper.android.com
- Rebecca Franksdeveloper.android.com
- Instagram Directabout.instagram.com
- Jetpack Composedeveloper.android.com
- Compose 1.10android-developers.googleblog.com
- LazyLayoutCacheWindowdeveloper.android.com
- Compose 1.9developer.android.com
- onVisibilityChangeddeveloper.android.com
- Baseline Profilesengineering.fb.com
- feedbackissuetracker.google.com