Admin assistant actions and operation receipts
Register a page guide and live actions, and distinguish reads, UI changes, drafts, and business writes.
The Admin assistant reuses existing workflows through actions exposed by the current page. Opening the editor, filling a draft, and saving are different outcomes. Declare the effect each action has and use a business receipt to confirm a write.
Integrate a feature page
| What the assistant needs | Where it is wired |
|---|---|
| Instructions, data scope, and API contracts | Declare a guide with defineAgentModule and defineAgentGuide, and include it in config/agent.ts |
| Route and page ownership | Declare path, loadPage, and loadAgent in config/routes.ts. Bind the guide with defineAgentPage |
| Current data and actions | Publish committed context through usePageAgent, limited to relevant scope, IDs, selection, and state |
| Input and execution | Use definePageAction with a stable name, input schema, and handler. Reuse the page’s confirmation, validation, and authorization workflow |
For example, the CMS entries page declares a moduleId parameter and loads its feature context. Actions that use the current selection should include its revision so a later selection change cannot apply an old action. Unmounting the page unregisters its instance.
Decide what counts as success
| Assistant result | What it establishes |
|---|---|
| Open a panel or apply a filter | A UI action was requested. Read back the interface or applied filter to establish the result |
| Change a form draft | The editable values changed. Saving and publishing still follow their existing workflows |
| Receive a business receipt | A write can be saved, partial, or unknown. Read business state before retrying an unknown write |
agent.operation.run shares validation and business callbacks with the submit button. After asynchronous preparation or confirmation, use control.isCurrent() before writing. Record the receipt through control.report separately from refreshing the list. See Admin forms for drafts and validation.
How external agents discover capabilities
External agents discover guides from Admin’s /llms.txt and call management APIs on the public Service Origin. Guide reads in deployed Admin use an Agent Bearer credential. The browser assistant reads guides through short-lived Service-issued tickets. Live page actions use the authenticated browser session and active page state. Assistant workflows · Management API