I'm curious as to why this is being pursued exclusively as a JavaScript API. It seems that most of this could be done entirely declaratively, or at least that there should be a declarative equivalent. Simply adding a few attributes, combined with existing HTML semantics should do the trick for a lot of scenarios.
<form action="/todos" method="post" tool-name="add-todo" tool-description="Add a new todo item to the list">
<input type="text" name="description" required tool-prop-description="The text of the todo item">
<button type="submit">Add Todo</button>
</form>
This might even be a good opportunity to improve forms with features that folks have been asking for for decades, such as:
- Supporting more
action values.
- Enable a form to use AJAX
- Do different things with the response from an AJAX form submission (e.g. pass it to the agent vs. put it somewhere in the HTML document).
While agent interaction is a "big thing" right now, it would be great to think of this in the context of the broader, long-term web platform, and come up with a consistent, extensible solution. We should also consider how content creators without JS experience will be able to participate in the agent ecosystem, and strive to be as inclusive as we can.
I'm curious as to why this is being pursued exclusively as a JavaScript API. It seems that most of this could be done entirely declaratively, or at least that there should be a declarative equivalent. Simply adding a few attributes, combined with existing HTML semantics should do the trick for a lot of scenarios.
This might even be a good opportunity to improve forms with features that folks have been asking for for decades, such as:
actionvalues.While agent interaction is a "big thing" right now, it would be great to think of this in the context of the broader, long-term web platform, and come up with a consistent, extensible solution. We should also consider how content creators without JS experience will be able to participate in the agent ecosystem, and strive to be as inclusive as we can.