Skip to content

AI Agents, Hyperlinks, and Buttons #303

Description

@AdamSobieski

During breakout sessions on the first day of a W3C/GS1 Workshop: E-commerce for Humans and AI Agents, participants explored topics including: AI Agent Friendly Web Pages.

For brainstorming and discussion purposes, how might one describe and distinguish important hyperlinks, buttons, and custom elements for AI agents?

  1. Should scrolling to, focusing, and clicking important hyperlinks, buttons, and custom elements correspond with WebMCP tools to be provided to AI agents?

    1. How might one indicate to an AI agent that it should, for a hyperlink, button, or custom element, use a provided tool, additionally or instead?
  2. What about ARIA attributes, e.g., aria-description, aria-describedby, or aria-details, intended for use by AI agents?

  3. What about a new about attribute on hyperlinks, buttons, and custom elements which would refer to data, e.g., JSON/JSON-LD, intended for use by AI agents?

  4. What about a new pair of attributes preconditions and effects, on hyperlinks, buttons, and custom elements which would each refer to data, e.g., JSON/JSON-LD, intended for use by AI agents?

  5. Should some DOM events, e.g., click, be able to provide additional information to event-handler functions for them to be able to distinguish between events originating from human end-users and those from AI agents – assuming that it is possible to do so?

For those options involving markup attributes (2, 3, 4) or any custom data-* variants, in theory, JavaScript libraries could process documents' markup to automatically create WebMCP tools for attribute-bearing hyperlinks, buttons, and custom elements.

For the option involving action description language (4) or any custom data-* variants, in theory, JavaScript libraries could also process documents' markup to automatically create or modify event-handler functions to ensure or enforce that recognized preconditions were met.

In these regards, JavaScript decorators could also be of use for processing provided JSON/JSON-LD resources into code to be run before and/or after event-handling functions. This might resemble:

@preconditions('resource.jsonld')
function eventhandler(event)
{
    // ...
}
<button onclick="eventhandler(event)">Click here</button>

What do you think about these ideas? Are there any more possibilities to consider? Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions