Page Overview | AIUI | Rokid

A Page defines what users see and how they interact with an AIUI agent. Register it in app.json, then write its interface and behavior in the page files.

Page Overview

A Page defines what users see and how they interact with an AIUI agent. Register it in app.json, then write its interface and behavior in the page files.

Page Organization

Register an extensionless path in app.json under pages, such as pages/index/index. Create the corresponding files in one of these forms.

FormFiles for pages/index/index
Single fileindex.ink contains configuration, logic, markup, and styles.
Separate filesindex.json supplies configuration, index.js or index.ts default-exports Page logic, index.wxml defines markup, and index.wxss styles it.

Both forms use the same page state, lifecycle callbacks, and event handlers. Keep one form per path so it is clear which file to edit. The complete Page example shows how to create and preview a single-file page.

Launch Context

On Rokid Glasses, an inline page (_current) fits a short result, status update, or interaction in the conversation. A standalone page (_blank) has room for forms or multi-step tasks. A user can double-tap an inline page to expand it.

AIX uses the optional target in the page’s <script def> or matching JSON file when it generates a tool definition. Use "_current" for inline or "_blank" for standalone. "_inline" is an alias for "_current". Because the presentation can change after opening, use the current target and target change callback to adapt the running page.

Its Place In Open Agent Format

From the perspective of Open Agent Format, pages are a key layer where AIUI turns agent capabilities into an interactive UI:

  • AGENTS.md: Defines the agent identity and system instructions
  • app.json: Defines the application entry and global configuration
  • pages/: Defines concrete pages and UI interaction

Therefore, one of the key extensions AIUI makes to OAF is to expand an agent that originally stayed only at the description layer into a truly runnable and interactive AI-Native User Interface.

Continue Reading

  • Page Definition: View the Page object, parameter table, example code, and instance methods
  • Lifecycle: View the lifecycle order, callback table, and interactive demo
  • Events: View page-level event callbacks, voice wakeup details, and example code
  • Focus System: View the two-layer focus model, focus styling, focus callbacks, and Navigation interaction mode
  • Target: View target semantics, target-based styling, and target change callbacks

Recommended Reading

  • app.json