Skip to content

Define the API for in-page Agents to use a site's declared tools #51

@khushalsagar

Description

@khushalsagar

The modelContext API currently only provides APIs for a site to declare tools. We also need an API surface for an Agent embedded on the site to use these tools. Technically this could all be managed within the site but having a dedicated web API is better for multiple reasons. #43 (comment) has a detailed explanation, adding a quick summary below:

  • We can a common registry of tools from all sources for all Agents.
  • The browser can help mediate which Agent is accessing the site's functionality at a time.

We should first resolve on the fact that this API is necessary.

In terms of API details, a few things on my mind:

  • It would be nice to have one interface for declaring functionality (right now tools, likely context going forward) since that's shared across all Agents. And a separate one for an Agent to use this functionality.
  • Should we assume that there's only one "in-page Agent" on a site? That's related to the agentIdentifier question on Managing action specific permissions #44. The browser can either allocate a "in-site agent" identifier if the site can only have one agent. Or we need an API for the site to request these.
  • We also added an interface called agent for the dependencies the site needs. I now think these are more like user-agent/browser dependencies. The site asks the browser for something which may need to ask the Agent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions