Widget

Put Edward on your iOS home screen with a Scriptable widget.

Overview

Edward can render a live widget on your iPhone or iPad home screen using the Scriptable app. The widget fetches data from Edward's API and displays it natively — upcoming events, memory stats, custom dashboards, or anything Edward decides to show you.

How It Works

Edward (LLM tools)
       ↓
  PostgreSQL (widget_state)
       ↓
  GET /api/widget?token=<token>
       ↓
  Scriptable app (iOS)
       ↓
  Home screen widget

Edward updates the widget state via LLM tools. The Scriptable app periodically fetches the latest state from the public API endpoint (authenticated by token, no login required) and renders it.

Setup

  1. Install Scriptable from the App Store
  2. Get your widget token from Edward's settings page or via GET /api/widget/token
  3. Create a new script in Scriptable and paste the widget code (available in settings)
  4. Update the TOKEN and BASE_URL variables in the script to point to your Edward instance
  5. Add a Scriptable widget to your home screen and select the script

Structured Data Mode

By default, the widget uses structured data — Edward sets a title, subtitle, theme, and an array of sections. Available section types:

TypeDescription
headerBold section header text
textPlain text content
listBulleted list of items
statSingle key-value statistic
stats_rowHorizontal row of multiple stats
progressProgress bar with label and percentage
countdownCountdown to a target date
dividerVisual separator line
spacerEmpty vertical space

Themes control the color scheme. Edward can set the theme dynamically based on time of day or content. Each section can include an optional SF Symbol icon.

Raw JavaScript Mode

For full control, Edward can store raw Scriptable JavaScript via the update_widget_code tool. The script must create a ListWidget and call Script.setWidget(). When custom code is set, the structured data mode is bypassed entirely.

Use clear_widget_code to revert back to structured data mode.

Auto-Generated Default

When no custom widget state has been set, Edward auto-generates content including:

  • A time-of-day greeting
  • Upcoming scheduled events
  • Memory statistics

Widget Chat

The widget can send quick messages to Edward via POST /api/widget/chat. This is a lightweight endpoint that allows simple interactions without opening the full web UI.

LLM Tools

Widget tools are always available (not skill-gated):

ToolDescription
update_widgetSet widget title, subtitle, sections, and theme
get_widget_state_toolRead the current widget state
update_widget_codeStore raw Scriptable JavaScript
clear_widget_codeClear custom script, revert to structured data