OpenAssistant Intents Audit — Modern-Apps
Date: 2026-12-01 (America/Denver) · Branch: agent-oa-intents · Worktree: /home/vayun/code/wt-oa-intents · Scope read: openassistant/ + library/ (intents/, util/AssistantIntent.kt) + every app's AGENTS.md overview + each app's intents/ package where one exists. No app code was changed. This is an audit + design document only.
0. How to read this, and the context rule
Verified mechanism (not assumed). Cross-app assistant calls go through AssistantIntent<In,Out> (library/util/AssistantIntent.kt): a NoDisplay ComponentActivity in the target app decodes JSON DATA, runs suspend performCalculation(input), and replies with JSON RESPONSE_DATA over a ResultReceiver. IntentLauncher (same file) serialises launches with a mutex and a 30 s timeout. Shared wire DTOs live in library/src/main/java/com/vayunmathur/library/intents/<app>/; each app exposes validated contracts in <app>/.../intents/. OpenAssistant dispatches via domain/AssistantToolSpecs.kt (the catalogue: name, risk, description, params) and platform/AssistantTools.kt (the handler map) — an init check fails if they disagree. Host-side back ends are platform/AssistantCoreToolIntents.kt (notes/todo/contacts/calendar/ family/music/email/clock/weather/maps/taxi) and platform/AssistantToolIntents.kt (communicate/food/shop + summarizers). Tool names are snakecase. Risk classes in the catalogue: - = READ, C = WRITECONFIRM (gated through a pending-call store, executed once via invokeConfirmed), L = WRITELIGHT (executed immediately, result rendered back), H = HANDOFFPREP (prepares a summary; the user acts in the target app; never money-moving).
Why size caps are the whole game. PromptBudgetTest pins the system header (default prompt + A2UI section + all tool declarations) at ≤ 24,500 chars (≈ 6k tokens at ~4 chars/token). The on-device model (Gemma 4 E2B) then fits history (domain/HistoryFit) and up to 6 tool rounds (domain/ToolLoop). Every tool result is re-injected as text, so one unbounded result evicts history and can dominate all later rounds. Design rule applied to every proposal below (owner's rule, restated as a contract):
- Inputs are filtered or query-based: a text query, a date/range
window, a category/enum filter, an id from a prior search — never "give me everything".
- Result counts are capped provider-side (validated/clamped in the
app's intents/ backend, not just in the spec text), and the host summarizer truncates each text field to a stated char cap.
- A full-dataset return is allowed only when the dataset is provably
small; the bound is named (e.g. "≤ 20 family members in practice, hard-cap 50").
- Estimates below use chars ÷ 4 ≈ tokens. "Typical" assumes realistic
personal data; "max" is the contractual worst case after caps.
Good existing patterns to copy. AssistantWebTools: web_search clamps count 1–10 and reshapes to {title,url,snippet}; web_read returns 6,000-char pages paged by offset, with a 2M-char fetch cap and a 4-page × 24k cache. Food/shop/communicate backends clamp limits provider-side (MAX_RESTAURANT_LIMIT=50, MAX_SEARCH_LIMIT=50, MAX_FIND_LIMIT=50/MAX_MESSAGES_LIMIT=100) and host summarizers cap per-item text (conversation snippet 80 chars, message body 200 chars, menu shown 24 items, orders shown 10). Calendar's provider caps at 500 events explicitly to stay under the binder transaction limit.
1. What exists today
1.1 Tool catalogue (54 tools)
Counted from TOOL_DATA in AssistantToolSpecs.kt and the handler map in AssistantTools.kt (they agree — the init check enforces it).
| App / surface | Tool | R/W | Input → Output (wire DTO) | Host summarizer? |
|---|---|---|---|---|
| notes | get_notes | R | Unit → List<NoteData{title,content}> | No — raw .toString() |
| notes | create_note | C | NoteData → Unit | n/a (success string) |
| todo | get_todos | R | GetTodosQuery{scope} → List<TodoData> (provider cap 200) | No — raw .toString() |
| todo | create_todo | C | InsertTodoData → String(id) | n/a |
| todo | complete_todo | C | `CompleteTodoData{id | title} → Boolean` |
| contacts | get_contacts | R | Unit → List<ContactData{name,phone}> | No — raw .toString() |
| contacts | search_contacts | R | query → filters the full list host-side, cap 10 | Yes (filter) |
| contacts | create_contact | C | ContactData → Unit | n/a |
| calendar | get_calendar_events | R | Unit → List<EventData> (provider cap 500) | No — raw .toString() |
| calendar | create_calendar_event | C | EventData → Unit (validated) | n/a |
| findfamily | get_family_locations | R | Unit → List<FamilyMemberData{name,locationName,lat,lon}> | No — raw .toString() |
| findfamily | create_location_share_link | C | {name,duration} → String(link) | n/a |
| music | search_music | R | String(query) → List<MusicSearchResult{id,name,type}> | No cap anywhere |
| music | play_music | C | PlayMusicData{id,type} → Unit | n/a |
search_emails | R | EmailSearchQuery → List<EmailData> (DAO LIMIT 30) | No — raw .toString(), body ≤2,000 ch each | |
get_recent_emails | R | Unit → List<EmailData> (DAO LIMIT 30) | No — same | |
| clock | set_alarm | C | SetAlarmData{hour,minute,label} → Unit | n/a |
| clock | set_timer | C | SetTimerData{seconds,label} → Unit | n/a |
| weather | get_weather | R | {lat,lon} → WeatherData (single record) | .toString() of one record — fine |
| weather | get_weather_by_name | R | {name} → WeatherData (geocode limit 1) | fine |
| maps | get_directions | R | DirectionsRequest{coords,mode} → DirectionsResult{polyline,segments,totals} | Yes — totals + segment count only |
| taxi | get_ride_estimate | R | RideEstimateRequest → RideEstimateResult | Yes — one line |
| fooddelivery | food_order_lookup | R | OrderLookupRequest → OrderLookupResult | Yes — one line |
| fooddelivery | find_restaurants | R | FindRestaurants{query?,lat,lng,limit=5} (backend cap 50) | Yes — address ≤60 ch |
| fooddelivery | get_restaurant_menu | R | GetMenu{merchantId} → MenuData (full menu over the wire) | Yes — 24 items shown |
| fooddelivery | food_get_cart | R | GetCart → CartData | Yes |
| fooddelivery | food_set_cart | L | SetCart{merchantId,items} (re-validated) | Yes — cart rendered back |
| fooddelivery | food_prepare_order | R | PrepareOrder → OrderSummaryData (prices only, creates nothing) | Yes |
| fooddelivery | place_food_order | H | merchantId → priced summary + fooddelivery://checkout | Yes — user pays in-app |
| fooddelivery | get_food_orders | R | GetOrders → List<OrderData> | Yes — cap 10 |
| shop | search_products | R | SearchProductsQuery{query,limit=5} (backend cap 50) | Yes — one line/variant |
| shop | get_product_detail | R | GetProductQuery → ProductDetailData (description field exists) | Yes — variants only, description dropped |
| shop | shop_get_cart | R | Unit → CartData (grouped by store) | Yes |
| shop | shop_add_to_cart | L | AddToCartRequest (exact variant re-verified) | Yes — cart rendered back |
| shop | shop_remove_from_cart | L | RemoveFromCartRequest{variantId} → CartData | Yes |
| shop | start_shop_checkout | H | shop_domain → per-store summary + shop://cart | Yes — user checks out in-app |
| shop | get_shop_orders | R | Unit → List<OrderData> | Yes — cap 10 |
| communicate | find_conversations | R | FindConversationsQuery{query,limit=5} (backend cap 50) | Yes — snippet ≤80 ch |
| communicate | get_conversation_messages | R | GetMessagesQuery{threadKey,limit=10} (backend cap 100) | Yes — body ≤200 ch/msg |
| communicate | draft_message | R* | recipient/line/body → A2UI composer card | Sends nothing (*renders UI) |
| communicate | send_message_v2 | C | SendMessageRequest → SendMessageResult (GV typed-refused) | Yes |
| openassistant (internal) | get_memories / add_to_memory / remove_memory | R / R(!) / C | Room MemoryDao direct | No cap on get_memories |
| openassistant (internal) | get_local_current_date_time, set_conversation_title | R | device direct | tiny |
| openassistant (device) | get_app_list | R | launcher activities → labels | No cap — raw list .toString() |
| openassistant (device) | open_app | R(!) | package_id → launch intent | side effect, classified READ |
| openassistant (device, legacy) | send_message | R(!) | recipient+message → opens SMS composer (ACTION_SENDTO) | Not WRITE_CONFIRM — see §1.3 |
| openassistant (device, legacy) | make_phone_call | R(!) | recipient → opens dialer (ACTION_DIAL) | Not WRITE_CONFIRM — see §1.3 |
| openassistant (web) | web_search | R | query, count 1–10, kind text/news | Yes — {title,url,snippet} |
| openassistant (web) | web_read / web_read_result | R | url / index+offset | Yes — 6,000-ch pages |
| openassistant (UI) | render_ui | R | A2UI JSON, ≤12,000 ch enforced | n/a |
DTO packages present in library/intents/: calendar, clock, communicate, contacts, email, euicc (see §1.4), findfamily, fooddelivery, maps, music, notes, shop, taxi, todo, weather. Apps with an intents/ package: calendar, clock, communicate, contacts, email, findfamily, fooddelivery, logviewer (see §1.4), maps, music, notes, shop, taxi, todo, weather.
1.2 Data-volume estimates for existing reads
| Tool | Typical | Worst case today | Verdict |
|---|---|---|---|
get_notes | 30 notes × ~600 ch ≈ 18k ch (~4.5k tok) | 500 notes × 10k ch content — unbounded | 🔴 flood risk |
get_contacts | 300 × ~35 ch ≈ 10k ch (~2.6k tok) | 5,000 contacts ≈ 175k ch | 🔴 flood + binder risk |
get_calendar_events | 500 × ~60 ch ≈ 30k ch (~7.5k tok) | capped at 500, still ~30k ch | 🟠 too big for a "what's on" answer |
get_todos | 200 × ~80 ch ≈ 16k ch (scope=today usually ≪) | 200 cap, ~16k ch | 🟠 shrink cap for all |
search_emails / get_recent_emails | 30 × (subject+from+≤2,000 ch body) ≈ up to 66k ch (~16k tok) | same — DAO LIMIT 30 is the only cap | 🔴 biggest single flood |
search_music | query-dependent; 4 entity types concatenated, no cap | whole library matches a common letter | 🔴 uncapped |
get_family_locations | 5–15 members × ~60 ch ≈ 1k ch | unbounded in code; dataset provably small (family) | 🟢 add hard cap 50 anyway |
get_app_list | 100–300 labels ≈ 3–8k ch | ~300+ labels | 🟠 cap/sort or query-based |
get_memories | user-grown list, one line each | unbounded over years | 🟠 cap (e.g. last 100) |
get_conversation_messages | 10 × ≤200 ch ≈ 2k ch | limit=100 → ~21k ch | 🟢 typical fine; clamp spec max to 50 |
get_restaurant_menu | summarizer shows 24 items (~3k ch to model) | full MenuData (100+ items + modifiers) crosses the binder | 🟢 model-side fine; 🟠 wire-side: page provider-side |
get_weather, get_directions, get_ride_estimate, food_order_lookup | single record / one line | — | 🟢 exemplars |
find_restaurants, search_products, orders, carts | ≤5–10 short lines | backend caps 50 if model asks | 🟢 good |
web_search / web_read | ≤10 hits / 6k ch page | — | 🟢 exemplar |
1.3 Risk-classification findings (existing)
send_messageandmake_phone_call(legacy device tools) are
classified READ (-) but open a composer/dialer. They do not send or call directly (user taps), so impact is low — but they should be re-classified or folded into draft_message / a dialer handoff, and the catalogue should not carry two send paths (send_message vs send_message_v2).
add_to_memoryis READ-class yet writes. It is the model's own memory
and remove_memory is WRITE_CONFIRM, so this looks deliberate; note it, don't churn it.
open_appis READ-class with a visible side effect (foregrounds an
app). Acceptable, worth a spec-wording tweak only.
- Writes that move money do not exist — by design. Food/shop use
HANDOFFPREP + in-app checkout; travel (below) must follow the same rule. Deletes: none exposed except `removememory (confirm-gated) and shopremovefrom_cart` (light, local cart only). This is the right posture; proposals keep it.
1.4 intents/ ≠ assistant coverage
euicc:library/intents/euicc/EsimLink.ktis a shared eSIM deep-link
constant, not an AssistantIntent. No OA tool. Correct — see §4.
logviewer:intents/holdsLogcatActivity/ErrorReportActivity
entry points, not assistant contracts. No OA tool.
maps:intents/also hosts cross-app clients (OrderLookupClient,
RideEstimateClient, FamilyLocationClient) — maps consuming food/taxi/findfamily, not OA tools.
code: "handles VIEW/EDIT intents" = Android intent filters, not
assistant intents.
2. Design rules for every proposal
Each proposal names: tool (snake_case) · app · read/action (risk class) · input DTO · output DTO + max response size · contract location (library/intents/<app>/… DTOs + <app>/…/intents/…Intent.kt provider + two OA touchpoints: AssistantToolSpecs.kt row + AssistantTools.kt handler with a host summarizer in AssistantToolIntents.kt).
Universal caps unless stated otherwise: list limit default 5, hard max 20 (search) / 10 (detail lists); title ≤ 120 ch; snippet/body excerpt ≤ 300 ch; one-line summaries ≤ 200 ch; ids are short stable strings from the provider. No proposal returns a full feed, full library, full history, full document, or full message/email body. Bodies are available only through a follow-up get-by-id with a stated char cap and offset paging where the text can be long (the web_read pattern).
Priorities: P0 = clear user value + small data + provider data already local/queryable. P1 = valuable, needs a new provider query or moderate DTO work. P2 = niche, sensitive, or larger design surface.
3. Proposed tools
3.0 P0 — News (owner-named; currently zero intents)
News has no intents/ package and no DTOs. Verified shape: feed is Room-cached CachedArticle{url,sourceId,title,publishedAtMillis,imageUrl, keywords,bookmarked,storyId,storyOneLiner,storyTitle} (cache pruned to 500), grouped into domain/Story (server storyId only); categories are NewsCategory{WORLD,US,TECHNOLOGY,SCIENCE,LOCAL} derived from the source catalog; on-device search (NewsRepository.search + domain/NewsSearch, relevance-ranked) already exists over titles/keywords/source/bodies of opened articles; article bodies are extracted on device (NewsRepository.articleBody(url) → ExtractedArticle{blocks}) and can be long. Never return the 500-article cache or an extracted body whole.
| Tool | R/W | Input DTO | Output DTO + cap | Max size |
|---|---|---|---|---|
news_search_headlines | R | NewsSearchQuery{query:String (req, ≤200 ch), category:String? (enum name), limit:Int=5 (clamp 1–10)} | List<NewsHeadlineData{storyId,url,title≤160 ch,sourceName,sourceCount,publishedAtMillis,oneLiner≤200 ch?}> | 10 × ~350 ch ≈ 3.5k ch (~0.9k tok) |
news_top_stories | R | NewsTopQuery{category:String?=null, local:Boolean=false, limit:Int=5 (clamp 1–10)} | same NewsHeadlineData list, feed ranking (sourceCount desc, newest) | ≈ 3.5k ch |
news_get_story | R | NewsStoryQuery{storyId:String (from search/top)} | NewsStoryData{title,oneLiner≤300 ch,members≤8×{title≤160 ch,sourceName,publishedAtMillis,url}} | ≈ 2k ch |
news_read_article | R | NewsArticleQuery{url:String (req, from a prior result), offset:Int=0} | NewsArticleExcerptData{title,byline?,excerpt≤3,000 ch,nextOffset:Int?} — extracted paragraphs joined + truncated provider-side; paging by offset like web_read | 3k ch (~0.75k tok)/page |
news_get_bookmarks | R | NewsBookmarksQuery{limit:Int=10 (clamp 1–20)} | List<NewsHeadlineData> (bookmarked only) | 20 × ~350 ≈ 7k ch worst; typical ≪ |
news_set_bookmark | C (WRITE_CONFIRM) | NewsBookmarkRequest{url,bookmarked:Boolean} | String success | tiny |
Contracts: library/intents/news/NewsData.kt (DTOs above) + news/.../intents/{SearchHeadlinesIntent,TopStoriesIntent,GetStoryIntent, ReadArticleIntent,GetBookmarksIntent,SetBookmarkIntent}.kt over NewsRepository (search/top/bookmarks are Room reads; read_article reuses articleBody() then truncates — the full ExtractedArticle must not cross as-is). Privacy: all local; the only network the provider may already do is its normal refresh — the intents should read the cache and not trigger a refresh (stale headlines beat a 30 s tool timeout).
Also note the overlap: web_search kind=news already searches the web for news. These tools answer "what's in my news app / my feed / my bookmarks" and read articles the app has already extracted — different data, no duplication problem.
3.1 P0 — fixes to existing floods (no new app, shrink the wire)
These are not new tools; they are cap retrofits the audit ranks P0 because the tools already exist and already flood:
| Fix | Change |
|---|---|
get_notes → add search_notes | New SearchNotesQuery{query,limit=10} returning title + ≤200 ch excerpt; deprecate raw get_notes or cap it provider-side (limit param, content ≤300 ch/note). Contract: library/intents/notes/ + notes/intents/SearchIntent.kt. |
get_contacts | Cap provider-side (e.g. 200, sorted) as a binder guard; steer the model to search_contacts (already capped 10). Long-term: make search_contacts query provider-side instead of fetching all contacts to the host. |
search_emails/get_recent_emails | Split DTO: list calls return EmailData without body (subject/from/date/isRead + ≤200 ch snippet); add get_email_excerpt (get-by-id, body ≤3,000 ch + offset). Needs an id field on EmailData (additive, defaulted — DTO-compat rule). |
search_music | Provider-side cap 20 total (songs/albums/artists/playlists share the budget), spec gains optional limit. |
get_calendar_events | Add range input (CalendarQuery{fromMillis,toMillis,limit=50}); default window = next 7 days. Keep 500 as a binder guard, not the model-visible size. |
get_todos(scope=all) | Lower model-visible cap to 50 for all (provider already caps 200 for binder safety; summarizer-side take(50)). |
get_app_list | Cap 100 sorted labels, or add query filter. |
get_memories | Return last 100 (id desc) with a "(N more)" line. |
get_conversation_messages | Clamp spec max 100 → 50 (backend already clamps; align the catalogue). |
3.2 P0/P1 — new app coverage
| # | Tool | App | R/W | Input → Output (caps) | Max | Pri |
|---|---|---|---|---|---|---|
| 1 | maps_search_places | maps | R | MapsPlaceSearchQuery{query,lat?,lng?,limit=5 (≤10)} → List<PlaceData{id,name≤120,address≤120,lat,lng,category?}>. Today OA can only route between raw coordinates — it cannot answer "coffee near X" or resolve a place name to coordinates for get_directions/get_ride_estimate. This is the missing front door for three existing tools. Contracts: library/intents/maps/PlaceData.kt + maps/intents/SearchPlacesIntent.kt (offline POI index; no Google calls). | ~2.5k ch | P0 |
| 2 | health_get_metric_summary | health | R | HealthMetricQuery{metric:enum(steps,sleep,heart_rate,weight,hydration,…), range:enum(today,7d,30d)} → HealthMetricSummaryData{metric,range,latestValue?,average?,min?,max?,total?,unit,recordCount} — aggregates only (HealthRepository.sumInRange/getDailySums/getLastRecord already exist). Never raw record lists. Contracts: library/intents/health/ + health/intents/GetMetricSummaryIntent.kt. Sensitive: health data — read-only, no export of FHIR records, see §5. | ~300 ch | P0 |
| 3 | health_get_medications | health | R | HealthMedsQuery{date:String?=today} → List<MedicationDoseData{name≤80,dose≤40,scheduledTimeMillis,taken:Boolean?}> cap 20. Answers "what do I take tonight?" — MedicationSchedule + DoseScheduler already model this. No dose changes proposed. | ~2k ch | P0 |
| 4 | flashcards_get_due_summary | flashcards | R | FlashcardsDueQuery{deckId:Long?=null} → DueSummaryData{dueCount,newCount,deckName?,nextDueMillis?} or per-deck list cap 10 × {deckId,deckName≤80,dueCount}. Counts only — card fronts/backs stay out (a deck can hold thousands). Contracts: library/intents/flashcards/ + flashcards/intents/GetDueIntent.kt (FSRS due query provider-side). | ~1k ch | P0 |
| 5 | translate_text | translate | R (compute) | TranslateQuery{text≤1,000 ch (req), targetLang (req, BCP-47/catalog code), sourceLang?=auto} → TranslateResultData{translatedText≤2,000 ch,detectedLang?}. Pure on-device NLLB via domain/TranslationEngine; degrade with typed error when models aren't downloaded. Contracts: library/intents/translate/ + translate/intents/TranslateIntent.kt. | ~2k ch | P0 |
| 6 | calculator_evaluate | calculator | R (compute) | EvaluateQuery{expression≤200 ch} → EvaluateResultData{result:String≤100,error?} over the app's pure Expression helpers. | ~200 ch | P0 |
| 7 | calculator_convert_unit | calculator | R (compute) | ConvertQuery{value:Double,fromUnit,toUnit} (ids from domain/UnitRegistry; currency pair allowed — rates are the app's one network call) → ConvertResultData{result,unit,rate?,asOfMillis?}. | ~300 ch | P0 |
| 8 | travel_get_trips | travel | R | TripsQuery{when:enum(upcoming,past,all)=upcoming, limit=5 (≤10)} → List<TripSummaryData{id,title≤120,startMillis,endMillis,status,origin?,destination?}> from on-device Room (getAllBookedTrips, filtered/sorted provider-side). No booking, no payment, no passenger PII (no Customer/FrequentFlyer DTOs). Contracts: library/intents/travel/ + travel/intents/GetTripsIntent.kt. | ~2k ch | P0 |
| 9 | screentime_get_usage | screentime | R | UsageQuery{period:enum(today,yesterday,7d)=today, limit=8 (≤15)} → UsageSummaryData{totalMillis,apps≤15×{label≤60,packageName,millis,limitMillis?,paused}}. Aggregates from platform/UsageHistory; typed empty result when usage access isn't granted. Contracts: library/intents/screentime/ + screentime/intents/GetUsageIntent.kt. | ~2k ch | P1 |
| 10 | photos_search_photos | photos | R | PhotoSearchQuery{query (content/OCR/person text), limit=10 (≤20)} → List<PhotoHitData{id,takenMillis,albumName?≤60,matchReason:enum(content,ocr,person,textMatch≤120)} — metadata only: no image bytes, no paths the model could exfiltrate, no secure-folder results ever. Provider reuses the existing combined search. Contracts: library/intents/photos/ + photos/intents/SearchPhotosIntent.kt. Follow-up open-in-app stays a deep link the user taps. | ~2.5k ch | P1 |
| 11 | astronomy_get_tonight | astronomy | R | TonightQuery{lat,lng,dateMillis?=today,limit=8 (≤12)} → List<SkyObjectData{id,name≤80,type,riseMillis?,setMillis?,peakAltitudeDeg?,magnitude?}> from domain/engine rise/set calculators over bundled catalogs. Fully offline; dataset is a bounded catalog, results are computed, not dumped. Contracts: library/intents/astronomy/ + astronomy/intents/TonightIntent.kt. | ~2k ch | P1 |
| 12 | web_get_bookmarks | web | R | BookmarkSearchQuery{query?=blank→recent, limit=10 (≤20)} → List<BookmarkData{title≤120,url≤300,folder?≤60}>. | ~4k ch worst | P1 |
| 13 | web_search_history | web | R | HistorySearchQuery{query (req), limit=10 (≤20)} → List<HistoryHitData{title≤120,url≤300,visitedMillis}>. Private tabs excluded provider-side (verify no private rows are stored; if they are, filter by flag). Contracts (12–13): library/intents/web/ + web/intents/…Intent.kt. | ~4k ch worst | P1 |
| 14 | youpipe_get_subscriptions_latest | youpipe | R | SubsLatestQuery{category?=null, limit=8 (≤15)} → List<VideoHitData{videoId,title≤140,channelName≤80,publishedMillis,durationSec?}> from the local subscription feed. Plus P2 youpipe_search_history{query,limit} over watch history. No playback/download actions (playback is a visible UI act; downloads are bulk data movement). Contracts: library/intents/youpipe/ + youpipe/intents/…. | ~3k ch | P1 |
| 15 | files_search_files | files | R | FileSearchQuery{query (name substring, req), limit=15 (≤25)} → List<FileHitData{name≤120,path≤200,sizeBytes?,modifiedMillis,isDirectory}> — name search only (MediaStore/SAF index), no content reads, no move/copy/delete. Contracts: library/intents/files/ + files/intents/SearchFilesIntent.kt. | ~5k ch worst | P1 |
| 16 | appstore_search_apps | appstore | R | AppStoreSearchQuery{query, limit=8 (≤15)} → List<AppHitData{packageName,name≤80,source,securityTier≤80,versionName?≤40,summary≤200}> over searchLocal (already limit-shaped). No install/update action — installs are signature-verified, user-reviewed acts (§5). Contracts: library/intents/appstore/ + appstore/intents/SearchAppsIntent.kt. | ~3k ch | P1 |
| 17 | appstore_get_updates | appstore | R | Unit → List<AppUpdateData{packageName,name≤80,installedVersion≤40,availableVersion≤40,source}> cap 20, via updatesFor(installed). Provably small (installed-app count, hard cap). | ~3k ch | P1 |
| 18 | education_get_progress | education | R | ProgressQuery{} → ProgressSummaryData{learnerFirstName?≤40,band,streakDays,skillsStarted,skillsMastered, dueDeadlines≤5×{title≤80,dueMillis}} — aggregates over skillProgressFlow/deadlinesFlow. Kids' data: first name only, read-only, no per-answer history. Contracts: library/intents/education/ + education/intents/GetProgressIntent.kt. | ~1k ch | P1 |
| 19 | get_weather_forecast | weather | R (extension) | WeatherForecastQuery{location (name) or lat/lng, days=3 (clamp 1–7)} → List<ForecastDayData{dateMillis,highC,lowC,condition≤60,precipChancePercent}>. Existing tools return current only; the app already fetches daily arrays to build WeatherData. Contracts: extend library/intents/weather/ + new weather/intents/GetForecastIntent.kt. | 7 × ~120 ≈ 0.9k ch | P1 |
| 20 | maps_get_saved_places | maps | R | SavedPlacesQuery{query?=null, limit=10 (≤20)} → List<PlaceData> (same DTO as #1) from SavedPlaceStore. | ~2.5k ch | P1 |
| 21 | music_get_now_playing + music_get_playlists | music | R | Unit → NowPlayingData{title≤120,artist≤80,album≤80?,isPlaying,positionSec?,durationSec?}; Unit → List<PlaylistData{id,name≤80,trackCount}> cap 20. Small, bounded. Contracts: extend library/intents/music/ + music/intents/…. | ~1.5k ch | P1 |
| 22 | flashcards_search_cards | flashcards | R | CardSearchQuery{query, deckId?, limit=8 (≤10)} → List<CardHitData{cardId,deckName≤80,frontExcerpt≤200,backExcerpt≤200,dueMillis?}>. Excerpts, never whole decks. | ~3.5k ch | P1 |
| 23 | office_list_recent_documents | office | R | RecentDocsQuery{query?=null, limit=10 (≤20)} → List<DocumentData{name≤120,kind:enum(text,sheet,slides,other),modifiedMillis,sizeBytes?}> — recents metadata only. No document content extraction (documents are unbounded; a future get-by-id excerpt tool needs its own design + E2EE-collab exclusion). Contracts: library/intents/office/ + office/intents/ListRecentIntent.kt. | ~3k ch | P2 |
| 24 | things_get_hydration | things | R | HydrationQuery{date?=today} → HydrationData{totalMl,goalMl,sipCount,lastSipMillis?} — only when a bottle is paired; typed unavailable otherwise. Tiny and genuinely assistant-shaped ("how much water today?"). Contracts: library/intents/things/ + things/intents/GetHydrationIntent.kt. | ~200 ch | P2 |
| 25 | games_get_achievements_summary | games/hub | R | Unit → AchievementSummaryData{level,xp,streakDays,recent≤5×{game≤60,achievement≤100,earnedMillis}} via :sdk:games reporting data. Fun, tiny, zero risk. Contracts: library/intents/games/ + hub intents/. | ~1k ch | P2 |
| 26 | email_draft_email | C-prep (HANDOFF_PREP-like) | DraftEmailRequest{to≤200,subject≤200,body≤4,000} → opens composer prefilled in Email; sending stays a user tap in Email. Never a direct send tool. Contracts: library/intents/email/ + email/intents/DraftIntent.kt (activity handoff, not a silent write). | tiny | P2 | |
| 27 | calendar_get_events_in_range | calendar | R | (See §3.1 — this is the get_calendar_events retrofit, listed there.) | — | P0* |
| 28 | backup_get_status | backup | R | Unit → BackupStatusData{lastBackupMillis?,lastResult≤80,scheduled:Boolean,nextPlannedMillis?} — status scalars only. No restore, no backup trigger, no file lists, no key material (§5). Contracts: library/intents/backup/ + backup/intents/GetStatusIntent.kt. | ~300 ch | P2 |
3.3 News worked example (the shape every proposal follows)
User: "What's happening in tech, and summarize the main story."
news_top_stories{category:"TECHNOLOGY", limit:5}→ 5 headlines with
storyIds, ≤ 3.5k chars total. The model picks one.
news_get_story{storyId}→ server one-liner + ≤ 8 member headlines
across sources (~2k chars) — enough to summarize coverage.
- Only if the user wants depth:
news_read_article{url, offset:0}→
≤ 3,000 chars of extracted text; further pages via offset (the web_read contract). At no point do 500 cached articles, the full feed JSON, or a whole extracted body enter context.
4. Apps deliberately skipped (and why)
| App(s) | Why no intent |
|---|---|
passwords | Vault contents must never enter an LLM context — credential exfiltration by design. No search, no get, no exceptions. (Autofill already serves the user without the assistant.) |
euicc | Privileged LPA: profile enable/disable/delete/download are carrier-grade, irreversible-ish acts. The existing EsimLink deep link is the right surface. |
vpn | Config import/connect state is security posture; an assistant toggling a tunnel or reading per-app bypass creates risk with near-zero conversational value. At most a future read-only vpn_get_status{connected,configName≤60} — P2 backlog, not proposed. |
updater | A/B OTA apply/reboot is privileged and irreversible; status is already surfaced by system notifications. No tool. |
parentalcontrols | PIN-gated supervision controls. Bypassing the PIN via assistant — even read-only rule dumps — defeats the product. Skip entirely. |
emergency | Lockscreen medical/SOS surface. Reading medical info into chat is a privacy regression; triggering SOS is dangerous. Skip. (Health §3.2 #2–3 covers the user's own, unlocked, in-app health queries.) |
backup (actions) | Restore/trigger/key handling excluded; only the scalar status read in §3.2 #28 survives, P2. |
camera | Capture is a physical, permission-gated act with viewfinder state; "take a photo" via a headless intent produces blind photos and privacy surprises. Recent-photo questions belong to photos metadata search (#10). |
keyboard, speech | IMEs and speech engines are system services already invoked directly by the user/OS. speech output via assistant adds a lossy hop; use device TTS settings instead. No tool. |
launcher, setupwizard, watch, auto, cast, share, networklocation, measure, tuner, logviewer | System plumbing / one-shot surfaces / hardware-in-the-loop tools. No conversational query or safe action: launcher state duplicates get_app_list; setup is one-time; watch/auto/cast are transports; measure/tuner need live sensors in hand; logviewer output is exactly the massive-data case (logcat) — a future logviewer_get_recent_crashes{limit=3, excerpt≤500} is conceivable but P2 backlog, not proposed here. |
games/* (all 12, except hub summary #25) | Game state (boards, hands, positions) is large, fast-moving, and useless in text form; no safe action. Hub aggregates are the only assistant-shaped data. |
everysync | Sync engine; its sinks (notes/todos/contacts/passwords) are already covered by the sink apps' tools. Exposing vault metadata adds attack surface for no user question it answers better than the sink apps. Password-vault sync: doubly excluded (see passwords). |
findfamily-ios, apple/* | SwiftPM/xtool target, not an Android AssistantIntent host. Out of scope for this mechanism. |
openassistant itself | Already the dispatcher; internal tools (memory, web, device, render_ui) are §1.1. No self-intent. |
code | File contents are unbounded and workspace-shaped; "search my project" needs a repo-scoped design (and leaks code into chat by default). Revisit only as code_search_symbols{query,limit} with path/title hits — P2 backlog, not proposed. |
things (actions), health (writes), travel (booking), fooddelivery/shop (checkout), appstore (installs) | Actions excluded or handoff-only — see §5. Reads proposed where safe. |
5. Privacy & safety rules (binding on any implementation)
- Money never moves. No place-order, book, pay, install-with-payment,
or checkout-creation tool — the existing food/shop HANDOFF_PREP pattern (priced summary → user acts in-app) is the ceiling. Travel follows it: trips are read-only; booking stays in travel.
- Sends are confirm-gated or handoff.
send_message_v2already
requires WRITECONFIRM. New message/email creation is composer-handoff (#26) — never silent send. The legacy device `sendmessage` (§1.3) should be retired or reclassed when next touched.
- Deletes: none proposed. No delete-note/contact/event/photo/file/
order tool in this audit. Cart-line removal (existing, local, light) and bookmark toggle (#news, WRITE_CONFIRM) are the outer limit.
- Location is sensitive.
get_family_locationsalready returns live
coordinates — keep it, but any new location-shaped tool must return place names first and coordinates only when the caller already holds them (the maps_search_places proposal takes optional user-supplied coords, it does not read family location).
- Health & education are read-only aggregates. No FHIR record
export, no medication edits, no learner answer history. Results are numbers/schedules the user already sees on their dashboard.
- Credentials & vaults: absolute exclusion (
passwords, backup keys,
euicc profiles). Not read-only, not "just metadata" — nothing.
- Provider-side validation is mandatory. Every proposed intent
clamps limits, validates enums/ranges, and truncates text in the target app (the food/shop/communicate backend pattern), because the catalogue spec is model-facing text, not enforcement. Co-signed caller
- the app's
ACCESS_*permission where the app already has one
(communicate/shop/fooddelivery pattern); add the permission for news/ health/photos on first implementation.
- No silent triggers. Intents read the local cache/store; they do
not kick off syncs, refreshes, scans, or downloads (30 s launcher timeout; stale data with an honest timestamp beats a hang).
6. Priority summary
P0 (do first): News read trio (news_search_headlines, news_top_stories, news_get_story + news_read_article), the §3.1 flood retrofits (search_notes, email split, music/calendar/todos caps), maps_search_places, health_get_metric_summary, health_get_medications, flashcards_get_due_summary, translate_text, calculator_evaluate, calculator_convert_unit, travel_get_trips.
P1: screentime_get_usage, photos_search_photos, astronomy_get_tonight, web_get_bookmarks, web_search_history, youpipe_get_subscriptions_latest, files_search_files, appstore_search_apps, appstore_get_updates, education_get_progress, get_weather_forecast, maps_get_saved_places, music_get_now_playing/music_get_playlists, flashcards_search_cards, news_get_bookmarks/news_set_bookmark.
P2: office_list_recent_documents, things_get_hydration, games_get_achievements_summary, email_draft_email, backup_get_status. Backlog-only (named, not designed): vpn_get_status, logviewer_get_recent_crashes, code_search_symbols.
Top 10 proposed tools (with hard caps)
| # | Tool | App | Cap that keeps it safe |
|---|---|---|---|
| 1 | news_search_headlines | news | limit ≤ 10; title ≤ 160 ch; one-liner ≤ 200 ch |
| 2 | news_top_stories | news | limit ≤ 10; category-filtered; feed-ranked |
| 3 | news_read_article | news | 3,000-ch excerpt pages by offset; never whole body |
| 4 | maps_search_places | maps | limit ≤ 10; name/address ≤ 120 ch |
| 5 | health_get_metric_summary | health | aggregates only; zero raw records |
| 6 | translate_text | translate | input ≤ 1,000 ch; output ≤ 2,000 ch |
| 7 | travel_get_trips | travel | limit ≤ 10; summaries only; no PII fields in DTO |
| 8 | flashcards_get_due_summary | flashcards | counts only; zero card text |
| 9 | news_get_story | news | ≤ 8 member headlines; one-liner ≤ 300 ch |
| 10 | calculator_evaluate / calculator_convert_unit | calculator | expression ≤ 200 ch; scalar results |
7. Verification of this audit
Read-only. Sources: AssistantToolSpecs.kt (54-row catalogue), AssistantTools.kt handler map, AssistantCoreToolIntents.kt / AssistantToolIntents.kt (launch targets + summarizers), all 17 library/intents/* DTO files, per-app intents/ listings, provider caps grepped in notes/contacts/calendar/todo/email/music/findfamily/ communicate/fooddelivery/shop/weather (MAX_RESULTS, DAO LIMIT 30, backend MAX_*_LIMIT, summarize* truncations), NewsRepository/ Story/NewsSearch/CachedArticle for the news design, repository signatures for health/flashcards/travel/youpipe/web/appstore/education, and PromptBudgetTest (24,500-char header budget). No builds were run — no code changed.