Repository navigation
Add Ask GalwayBus: an on-device agent over new AppFunctions - #151
Merged
Merged
Conversation
Exposes stops and departures as AppFunctions (for assistants as well as the app) and uses them as the tools of an ML Kit GenAI agent running Gemini Nano, the same approach as BikeShare. getDepartures resolves stop names, numbers and nearby places itself, since Galway stop names are abbreviated and most cover a stop each side of the road, and Gemini Nano guesses coordinates when asked for them. AppFunctions stays on 1.0.0-alpha13 (with a Renovate hold) because ML Kit genai-agent 1.0.0-alpha1 breaks on anything newer, and the app's minSdk rises to 26, which genai-agent requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XcDRQnBoiM8GnCbW7b4Dts
No route ends at Salthill, so "Eyre Square to Salthill" found nothing although the 401 goes there. towards now resolves to stops (by name, number or place) and keeps a bus if its route, in its direction, reaches one of them after the stop it leaves from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XcDRQnBoiM8GnCbW7b4Dts
Departures and stops from the AppFunction results now render as cards in the app's own route-badge style, so the times on screen come from the data rather than the model's retelling; the model is told to answer in one sentence instead of repeating the list, and a stop card asks for that stop's next buses. Tool chips read as people would put them, progress says what the agent is doing, and the model's raw function-call text no longer flashes up before each call. Also fixes a reply that rendered nothing (the Markdown renderer's empty loading and error states) or ended below the input, and the grey box on the drag handle after asking. findNearbyStops gains nearMe, using the same location as the Near me tab. It never prompts for permission, since an assistant can call it with nothing on screen; it tells the agent to have the user allow it in the app or name a place instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XcDRQnBoiM8GnCbW7b4Dts
joreilly
force-pushed
the
ask-galwaybus
branch
from
November 28, 2026 12:08
dd49f0a to
be84f1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getDepartures,findStops,findNearbyStops,listRoutesandlistSavedStops. Assistants can call them, and they're also the agent's tools.getDeparturesresolves a stop name, stop number or nearby place itself.towardsmatches places on the way as well as the final destination, using route stop order. So "Eyre Square to Salthill" finds the 401.findNearbyStops(nearMe=true)uses the same location as the Near me tab. It never prompts for permission, since an assistant can call it with nothing on screen. Without permission, it tells the agent to have the user allow it or name a place.App()gets an optionalextraActionsslot, andRouteBadgeis now public. iOS, desktop and web are otherwise unchanged.1.0.0-alpha13, with a Renovate rule, becausegenai-agent1.0.0-alpha1 is binary-incompatible with newer versions.genai-agentrequires.Test plan
:shared:jvmTestalso passes.adb shell cmd app_functionon an API 37 emulator and the Pixel:nearMewith and without location permission.🤖 Generated with Claude Code
https://claude.ai/code/session_01XcDRQnBoiM8GnCbW7b4Dts