DEV Community

Cover image for I gave my Android AI agent a $0.25 budget per task. Here's how it still finishes.
Grokkris
Grokkris

Posted on

I gave my Android AI agent a $0.25 budget per task. Here's how it still finishes.

I've been building Kryzz AI, a free MIT-licensed Android app where you hand an agent a task and it plans, searches, reads pages and gives you back an actual file. It runs on your own OpenRouter key, so every step it takes costs you real money. That made one problem impossible to ignore: agent loops quietly burn credit.

The problem

On a laptop you might watch an agent run. On a phone you put it in your pocket. If the agent decides to search twelve more times "just to be sure", you find out when you check your OpenRouter balance. People who bring their own key notice that fast, and they don't come back.

The rule

Every turn has a hard cost cap. The default is $0.25 and you can raise it up to $2 in settings. The planning step doesn't count against that budget, so the agent can always at least tell you what it intends to do.

What happens when it hits the cap

This is the part I spent the most time on. The easy version is to throw a "budget exceeded" error and stop. That's the worst outcome: you paid for the searches and got nothing.

Instead, when the cap is close, the agent stops calling tools and writes the best answer it can from what it already collected. The work log under the answer shows what it did and what it skipped, so you can tell whether to rerun with a bigger budget or whether it's good enough.

Fast / Balanced / Max

The cap works together with three quality modes:

  • Fast skips the review pass and keeps the step count low.
  • Balanced is the default.
  • Max gets a 24-step budget plus a review pass before it hands the answer over.

Most of my own tasks run fine on Balanced. Max is for the "compare these and give me a spreadsheet" kind of task where a second look actually catches mistakes.

An example run

Prompt: "Compare 3 budget phones, read the reviews and make me a spreadsheet."

It shows the plan as a checklist first, runs the searches and page reads in parallel, checks the numbers, and returns an .xlsx with sources. The chip under the answer says something like "3 searches · read 4 pages · 1 file", and tapping it shows every query and URL.

Honest notes

  • Models are not on-device. Requests go from your phone straight to the provider behind your OpenRouter key.
  • No analytics, no telemetry, no bundled keys. Chats, memory and files stay in app storage.
  • The current APK is a debug build (Android 9+). A release-signed build is planned.

Try it

Free APK and MIT source: https://github.com/kriddss3/kryzz-ai/releases/tag/v1.1.2

I'm genuinely unsure about the default. Is $0.25 per task too low, too high, or should it ask before going over? I'd like to hear where you'd set it.

Top comments (0)