Allow pages to send messages to agents
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
Read the related proposals in #31, #151, and #312, then compare their scope with the task-scoped message channel described here. The issue asks whether existing proposals can cover this interaction and raises protocol and security requirements, but names no files or tests. Done would mean deciding how the proposal fits and specifying the channel behavior and boundaries.
由索引模型根据 Issue 内容生成。
描述
Could we add a standard way for a page to send messages to the visiting agent, without waiting for another tool call?
Example
A concrete example is PostHog's ask_max tool. Currently, sending a question opens the assistant UI on the page, but the assistant's answer isn't sent back to the visiting agent through the tool. The conversation continues in the page UI.
This could be a smoother experience if the visiting agent could talk directly to the site's assistant through WebMCP, receive answers and follow-up questions, and continue the conversation without having to operate the assistant's UI.
@Kulikowski explored a similar interaction in The three homes of the Agentic Web and When agents talk, with a working demo comparing WebMCP tool calls with A2A. We also discussed the missing feedback channel in Bring your own agent, coauthored with @Kulikowski and @andreban.
Strawman
- The visiting agent opts into messages for a specific task.
- The browser gives the page a channel scoped to that task.
- The page can send structured messages through the channel:
{
"taskId": "analysis-123",
"type": "question",
"message": "Should I look at the last 7 or 30 days?"
}
The visiting agent decides whether to respond through the tool, ask the user or ignore the message. Either side can close the channel. Many websites have an in-page assistant whose logic runs on the backend. In this setup, the page relays messages between the visiting agent and the site's assistant.
Displaying messages
If the visiting agent displays a message directly, without processing it through its own LLM, the UI should clearly identify it as an unchanged message from the site's assistant. The user should be able to distinguish a relayed message from the visiting agent's own response.
Security
- Treat messages as untrusted site content, with the same trust level as tool results.
- Receiving a message should not grant new permissions or automatically trigger an action.
- Replies should not expose unrelated private context.
- The browser should enforce origin and task boundaries, rate and size limits, and close the channel when the task ends or the user leaves the page.
Relationship to A2A
A2A's task and messaging concepts could inform this without requiring sites to implement the full protocol.
Is this something the existing proposals could cover? @Kulikowski @andreban, curious how you see this fitting with those experiments.
Prior discussions
- #31: Support agent-to-agent interaction - Exposing a site's agent through a WebMCP tool so the browser agent can delegate tasks to it.
- #151: Reactive state streaming via resource subscriptions - Letting pages notify subscribed agents when state changes, without repeated polling.
- #312: Keeping the agent in sync with the page's context - Giving agents updated page context, including changes caused by users or events outside tool calls.
- 主要语言
- Bikeshed
- 星标
- 4.7k
- 派生
- 328
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 15
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
webmachinelearning/webmcp 的其他 Issue
-
Say how an agent should weigh annotations that the page wrote about itself可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
webmachinelearning/webmcp#353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#343 · 1 个 reaction ·
维护者通常 1 天内回复
-
Agenda+ i18n-tracker
难度 2/5 1-3 小时 新手友好度 75/100
webmachinelearning/webmcp#273 · 3 条评论 ·
维护者通常 1 天内回复
-
a11y-tracker Agenda+
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#272 · 4 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
webmachinelearning/webmcp#234 · 5 条评论 ·
维护者通常 1 天内回复
查看 webmachinelearning/webmcp 的全部 Issue
相似的 Issue
-
bug p2
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
anthropics/anthropic-sdk-typescript#1273 ·
维护者通常 10 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
CopilotKit/OpenBot#815 ·
维护者通常 1 天内回复
-
comp/tui-gateway P2 type/bug
难度 1/5 1 小时以内 新手友好度 90/100
NousResearch/hermes-agent#142379 · 1 条评论 ·
维护者通常 1 天内回复
-
priority: low
难度 2/5 1-3 小时 新手友好度 76/100
melodic-software/claude-code-plugins#8831 · 1 条评论 ·
维护者通常 1 天内回复