agentk
v0.7.1Your site has a
second visitor.
It doesn’t click — it calls. agentk is a React component that turns one tool definition into both: a ⌘K palette for people, and a WebMCP surface for agents. One definition, two ways in.
Watch WebMCP drive a page I built — two minutesOrigin trials are live in Chrome 149 and Edge 150, ChatGPT Desktop supports it, and Shopify puts WebMCP tools on every Liquid storefront. Firefox and Safari have standards positions open — so agentk feature-detects and falls back to a plain command palette wherever it’s missing.
// 1. define tools once — JSON Schema in, forms + WebMCP out
const tools = [
{ name: 'run_tests', label: 'Run Tests' },
{ name: 'build', label: 'Build' },
{
name: 'deploy',
inputSchema: {
type: 'object',
properties: {
environment: {
type: 'string',
enum: ['staging', 'production'],
},
branch: { type: 'string' },
},
},
},
]
// 2. one component, two consumers
<Command tools={tools} onToolExecute={exec}
agent={{ provider: 'anthropic', requireApproval: true }}>
<Command.Input />
<Command.List />
<Command.Approval />
<Command.ActivityFeed />
</Command>- Chrome 149origin trial
- Edge 150origin trial
- ChatGPT Desktopsupported
- Braveexperimental, in Leo
- Shopifyevery Liquid storefront, 12 tools
Firefox and Safari: standards positions open
How an agent does deploy staging from main
By looking at the page
- Screenshot the page
- Find something that looks like Deploy
- Click it, screenshot again
- Locate the environment select
- Pick staging, type the branch
- Screenshot to check it worked
By calling the tool
deploy({ environment: "staging", branch: "main" })One call, typed arguments, a result the agent can read. Chrome puts it plainly: tools are “more reliable than actuation, which may have numerous steps and leaves each step open to interpretation by the agent.”
- Time per task
- 7.8svs 28.1s
- Cost per task
- 0.6¢vs 5.5¢
- Tasks solved
- 48/49vs 43/49
WindTunnel — 49 tasks across 8 real sites, 2,352 attempts, 16 model and interface combinations. Run by nekuda.
If you’ve been asked to add WebMCP
You define your tools once.
The same JSON Schema definition drives a ⌘K palette for people and the surface agents call. No second implementation to keep in sync, and no separate agent API to maintain.
The work is not wasted if agents never show up.
Where WebMCP is not available, you have still shipped a command palette your users can use today. That is the whole downside case.
You decide what an agent may do on its own.
Mark a tool read-only and it runs without interrupting anyone. Mark it consequential — paying, sending, publishing — and it stops for a person every time, whatever else is switched on.
It works where the agents actually are.
Chrome, Edge and ChatGPT’s desktop browser each expose WebMCP slightly differently, and a phone is not a laptop. agentk handles those differences so your page does not have to.
The spec is still moving. Your code does not have to.
It is a live standard, developed in the W3C Web Machine Learning Community Group. When it changes, agentk changes — that is the point of taking a dependency rather than writing registration by hand.