Skip to content

Keeping the agent in-sync with the page's context #312

Description

@yoavweiss

Playing around with WebMCP, I find myself in situations where the agent is not aware of the page's context. The human user has visuals and text that help them understand what page they are on. The agent needs to use snapshots and DOM/a11y tree walking to get similar context.

Context changes can be a result of tool calls, but can also be the result of a human user interaction with the page or time-based context changes (e.g. video ended and a new one starts playing). Tool output can help provide contexts in the first case, but not others.

It might be good to enable developers with the means to:

  • Let the agent know that the context has changed (due to a hard navigation, soft navigation or some other interaction).
  • Provide the current page context to agents, and potentially add extra details about it.

Example use cases:

  • A product page could provide high-level details about the product, allowing the agent to have more context when the user asks it basic questions about it, even before calling tools that provide more detailed descriptions.
  • A checkout page with multiple different shipping addresses can provide them as context for the agent, allowing it to offer contextual shortcut enabling the user to indicate preference for one versus the other (instead of the user typing in a full address that's already on file).

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