At this Google I/O, Google introduced a new development tool: https://jules.google.com
What are the advantages? Itโs currently free, runs on Gemini, and itโs an AI Agent.
What does this mean (example)? Often, thereโs a problem where the number of modules or libraries youโd like to create or maintain in the project exceeds what can be maintained (if you are solo or small team), especially if youโre managing an open-source library in spare time.
Background agents help take on some of the work. Iโve found them useful for documentation, light refactoring, and implementing small features.
To get started, you can usually use a short prompt to pre-create a plan that Jules will partially follow (in reality, it will recreate the plan, but having references will make it easier):
Please write a condensed plan for an AI Agent so it can execute it step by step. Make sure that the plan has only one final goal; otherwise, ask the user what to do.
Make sure that the plan contains original links to sources, a chosen configuration script, and is written in a way that allows for one-click copy & paste.
This plan can be created in any AI chat, but when working with the plan, itโs advisable to specify the project/documentation the agent will be working with.
An important part of the prompt that needs to be included in the prompt-plan is the Flutter installation in Ubuntu:
Always add as first steps:
- Branch & Environment Setup
1.1 Create a new branch from the default branch (e.g., {name}).
1.2 Run the provided environment setup scripts to ensure Dart, FVM, and Flutter are correctly installed and configured.
- For flutter fvm (should be dependent from what user asks):
# Install Dart SDK (using apt, official Google repo)
sudo apt-get update
sudo apt-get install -y apt-transport-https wget
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt-get update
sudo apt-get install -y dart
# Add Dart to PATH
export PATH="$PATH:/usr/lib/dart/binโ
# Install FVM globally
dart pub global activate fvm
# Add FVM to PATH
export PATH="$PATH:$HOME/.pub-cache/bin"
# Install Flutter version from .fvmrc
fvm install
# Get Flutter dependencies
fvm flutter pub get
- For flutter without fvm:
# Install Dart SDK (using apt, official Google repo)
sudo apt-get update
sudo apt-get install -y apt-transport-https wget
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt-get update
sudo apt-get install -y dart
# Add Dart to PATH
export PATH="$PATH:/usr/lib/dart/bin"
flutter pub get
Why is this important?
Initially, Jules (like Cursor background agents and Codex) runs in an isolated environment. Since Dart & Flutter are typically not present in the container, they need to be forcibly installed before starting work on a project. By declaring this in the initial prompt, we provide clearer instructions on how the agent should act, which enables it to complete the task with higher quality.
I hope this concept proves useful :-)
Please share your thoughts in the comments :-) This will help make this article visible to others and will be great support and motivation :-)
Thank you for your time and have a good day!
Anton
Top comments (4)
Super helpful in getting flutter started with jules.
Btw the quotes are messed up in your code snippets -- at least the closing quotes become fancy closing quotes instead of the default ones.
I guess some of the details from your post come from here: dart.dev/get-dart#install
Also can omit
wget
and theapt-get
step by usingcurl
instead (which I believe is installed by default). You also need to activateflutter
so it can be used (when not usingfvm
). This is what I ran:Glad it helped!
Yes, you are right, Iโve took the script from dart.dev:) thank you very much for sharing your tips and the script!
Thanks for breaking down where background agents actually pull their weight! Have you run into any blockers with Jules automating more complex Flutter tasks yet?
Iโm glad it helped!
Unfortunately, when I tried to run routine tasks (like replacing one function with one from a package), Iโve encountered an outdated information problem. At the time of writing Jules have had no access to the newer libraries, although I believe this may be resolved as Iโve heard that Jules can now access the web.
Another issue that Iโve encountered quite often, is that complex tasks fail after 10-12 steps if one problem is hard to fix (like lint or just one error) - it causes Jules literally stack in the loop.
The solution Iโve found useful is to plan out the steps in advance to guide Jules through the problem. However, if Jules gets stuck in the middle, itโs easier to start a new task instead of trying to correct the previous one.
What is your experience of working Jules?
Some comments may only be visible to logged-in visitors. Sign in to view all comments.