Skip to content

Commit e15a770

Browse files
authored
Update Agentic App Manager for Google I/O 25 (#24)
2 parents c3c1cd8 + eea54e2 commit e15a770

File tree

233 files changed

+785
-5458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+785
-5458
lines changed

agentic_app_manager_next_25/.gitignore renamed to agentic_app_manager/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ app.*.map.json
4343
/android/app/debug
4444
/android/app/profile
4545
/android/app/release
46+
47+
# Firebase
48+
google-services.json
49+
GoogleService-Info.plist
50+
firebase.json
51+
firebase_options.dart

agentic_app_manager/.metadata

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "ea121f8859e4b13e47a8f845e4586164519588bc"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
17+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
18+
- platform: android
19+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
20+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
21+
- platform: ios
22+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
23+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
24+
- platform: linux
25+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
26+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
27+
- platform: macos
28+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
29+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
30+
- platform: web
31+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
32+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
33+
- platform: windows
34+
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
35+
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

agentic_app_manager/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Agentic App Manager
2+
**Target Platforms:** iOS, Android, Web
3+
4+
**Tech Stack:** Flutter (frontend), Firebase AI Logic (Gemini API in Vertex AI for the backend)
5+
6+
![Agentic App Manager – Firebase AI Model Constructors w/ Screenshots](README/AppScreenshots.png)
7+
8+
This app demonstrates how to build agents an agentic experience in a Flutter app
9+
using Firebase AI Logic with the Gemini API in Vertex AI.
10+
11+
Users take and annotate screenshots, then add text to file feedback. An agent
12+
then interprets the feedback. For example, if a user wants a different color
13+
scheme (e.g., "I prefer blue!"), the agent identifies whether it has a tool to
14+
address the feedback, like changing the color. To avoid abrupt UI changes,
15+
the agent first uses _a different tool_ to ask for confirmation before applying
16+
the change.
17+
18+
If no tools can address the feedback or the user denies the change, the app
19+
automatically generates a detailed feedback report that includes device information,
20+
an "action history" of agent suggestions, and generated tags with a suggested
21+
priority level. This system demonstrates the potential of agent-based
22+
interactions in improving user's app experiences and streamlining developer
23+
workflows.
24+
25+
> [!NOTE]
26+
> Check out this Google I/O 2025 talk for a full walkthrough: [COMING SOON]().
27+
28+
## Getting Started
29+
30+
1. Follow [these instructions](https://firebase.google.com/docs/ai-logic/get-started?&api=vertex#set-up-firebase)
31+
to set up a Firebase project & connect the app to Firebase using `flutterfire configure`
32+
33+
1. Run `flutter pub get` in the root of the project directory `agentic_app_manager` to
34+
install the Flutter app dependencies
35+
36+
1. Run `flutter run -d <device-id>` to start the app on iOS, Android, or Web.
37+
38+
> [!TIP]
39+
> Get available devices by running `flutter devices` ex: `AA8A7357`, `macos`, `chrome`.
40+
41+
1. There are two main.dart files:
42+
- `main.dart` contains the app which has the Feedback UI for users to mark up.
43+
- `main_audio_streaming.dart` contains version of the app that uses real-time
44+
audio streaming.
45+
46+
Click the icon in the top right corner "bug report" or "call" to initiate a
47+
feedback session. You can file feedback about the app color, font size, or
48+
typeface and the agent will have tools that it can use address the feedback.
49+
50+
In the default version of the app, you can also file feedback about something else
51+
in the app and it will offer to file a feedback report for you.
52+
53+
## Implementation
54+
This demo showcases 3 different model constructors from Firebase AI, each
55+
supporting different model with different functionality functionality.
56+
Here's a high-level overview:
57+
1. `GenerativeModel`: Multimodal input with text & images. Tool use as output.
58+
2. `ImagenModel`: Generate the email senders' profile picture images.
59+
3. `LiveGenerativeModel`: Live audio streaming input & output, with tool use.
60+
61+
Check out [this table](https://firebase.google.com/docs/ai-logic/models) for more on the various supported models & features.
62+
63+
## Architecture
64+
65+
### `GenerativeModel`
66+
See code in [`lib/agentic_app_manager/`](https://github.com/flutter/demos/blob/main/agentic_app_manager/lib/agentic_app_manager/)
67+
![GenerativeModel Architecture Diagram](README/AgenticAppManagerArchitectureDiagram.png)
68+
69+
### `ImagenModel`
70+
See code in [`lib/image_generator.dart`](https://github.com/flutter/demos/blob/main/agentic_app_manager/lib/image_generator.dart)
71+
![ImagenModel Architecture Diagram](README/ImagenArchitectureDiagram.png)
72+
73+
### `LiveGenerativeModel`
74+
See code in [`lib/audio_app_manager/audio_app_manager_demo.dart`](https://github.com/flutter/demos/blob/main/agentic_app_manager/lib/audio_app_manager/audio_app_manager_demo.dart)
75+
![ImagenModel Architecture Diagram](README/AgenticAppManagerAudioArchitectureDiagram.png)
76+
77+
## Resources
78+
- [[Codelab] Build a Gemini powered Flutter app with Flutter & Firebase AI Logic](https://codelabs.developers.google.com/codelabs/flutter-gemini-colorist)
79+
- [Demo App] [Colorist](https://github.com/flutter/demos/tree/main/vertex_ai_firebase_flutter_app): A Flutter application that explores LLM tooling interfaces by allowing users to describe colors in natural language. The app uses Gemini LLM to interpret descriptions and change the color of a displayed square by calling specialized color tools.
80+
- [Firebase AI Logic docs](https://firebase.google.com/docs/ai-logic)
81+
Loading
Loading
1.18 MB
Loading
Loading

agentic_app_manager_next_25/android/app/build.gradle.kts renamed to agentic_app_manager/android/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
android {
12-
namespace = "com.example.agentic_app_manager_next_25"
12+
namespace = "com.example.agentic_app_manager"
1313
compileSdk = flutter.compileSdkVersion
1414
ndkVersion = "27.0.12077973"
1515

@@ -24,7 +24,7 @@ android {
2424

2525
defaultConfig {
2626
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
27-
applicationId = "com.example.agentic_app_manager_next_25"
27+
applicationId = "com.example.agentic_app_manager"
2828
// You can update the following values to match your application needs.
2929
// For more information, see: https://flutter.dev/to/review-gradle-config.
3030
minSdk = 23

scavenger_hunt_next_25/android/app/src/main/AndroidManifest.xml renamed to agentic_app_manager/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application
3-
android:label="scavenger_hunt"
3+
android:label="agentic_app_manager"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity

scavenger_hunt_next_25/android/app/src/main/kotlin/com/example/scavenger_hunt/MainActivity.kt renamed to agentic_app_manager/android/app/src/main/kotlin/com/example/agentic_app_manager/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.scavenger_hunt
1+
package com.example.agentic_app_manager
22

33
import io.flutter.embedding.android.FlutterActivity
44

agentic_app_manager_next_25/ios/Podfile renamed to agentic_app_manager/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '12.0'
2+
platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

0 commit comments

Comments
 (0)