API Reference
API Reference/Utilities/Xochi

Xochi “flower”

org.poca.xochi

Offline digital assistant: an on-device model that answers voice and text questions using only what is on the PAC, through a typed tool contract. No cloud, no eavesdropping.

on-device LLMsystem assistant8 typed tools

The tool contract

Xochi reaches PAC content only through typed tools published in the shared poca-pac-contract library; the provider imports the same constants, so the two can never disagree on the authority. Consecutive read-only tools execute in parallel; open_card is the only non-read-only tool and runs serially.

ToolParamsHitsReturns
get_cardcard_id/cards/{id}One card as JSON; renderable as a tile.
get_cards_for_appapp_id/apps/{app_id}Card array; renderable.
get_featured_cardsnone/featuredCard array; renderable.
get_all_cardsnone/cardsCard array; context only.
search_cardsqueryin-app over /cardsTop 5 by weighted match on title, description, exact card_id and app_id, plus per-token bonuses.
get_pac_infonone/indexPAC metadata JSON.
get_app_configapp_id/config/{app_id}Provision row; re-parses config_json into a nested object when valid JSON.
open_carddeep_linkAndroid IntentFires ACTION_VIEW on any poca:// link; rejects other schemes.

Cards return with extensions_json re-expanded into flat top-level keys, so the model sees app-specific fields directly. Deep-link format across the suite: poca://{app_id}/{type}/{identifier}.

Grounding and caching

The engine infers tool calls from the user’s prompt (a pasted poca:// link triggers open_card; app mentions trigger per-app queries; anything else falls back to search), parses model-emitted tool calls, then feeds successful tool JSON back as grounded context and turns returned cards into on-screen tiles. A provider client keeps an indexed snapshot (by card_id, deep_link, app_id, featured) and drops it whenever the provider fires a change notification, so a card swap updates the assistant immediately.

Why it cannot leak

Xochi registers as the system assistant and runs its language model on-device. Its entire knowledge of the world is the mounted PAC: it cannot answer about, or transmit to, anything else. Communities extend what Xochi knows by curating the card, not by granting network access.

Last updated: July 2026
PreviousPAC