Skip to main content
The state API gives your extension read/write access to Aether’s public app state. Use it to prefill the composer, toggle agent mode, change the selected model, or manage Skill selections — all through a consistent path-based interface that works across Script Mods.

API reference

Supported state paths

PathTypeDescription
draft_inputstringCurrent composer text
selected_skill_idsstring[]Skills active in the current chat
default_skill_idsstring[]Skills auto-selected for new chats
agent_mode_enabledbooleanWhether Agent Mode is on
selected_model_keystringKey of the active model
screenstringCurrent screen ("chat" or "settings")

state.get

Read the full public state object, or pass a path string to read a specific field:
Calling state.get() with no argument returns the entire public state snapshot as an object. Passing a path string returns only the value at that path.

state.patch

Write a single state path. patch is a convenience shorthand for a single-operation transaction:

state.transaction

Apply multiple state changes atomically. Operations are applied in array order:
Each operation defaults to op: "set" when op is omitted. Pass op: "remove" to clear a path:
Transactions apply operations in order. They provide a common mutation API, not database-level rollback across unrelated Android repositories. If an individual operation fails, earlier operations in the same transaction are not reversed.
Prefer state.transaction over multiple state.patch calls when you need to update several paths at once. Batching changes into a single transaction avoids intermediate re-renders between writes and keeps related state updates consistent from Aether’s perspective.