翻篇收录说明
翻篇网页快照

Artificial Intelligence in Chrome | AI in Chrome | Chrome for Developers

https://developer.chrome.com/docs/ai

最近抓取:2026-12-03 10:23:15(北京时间)

最近内容变化:2026-11-30 08:44:15(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Learn about building with client-side AI in Chrome.

正文摘录

Home Docs AI in Chrome AI in Chrome Find and build AI solutions for your website and web application. Built-in AI Discover task-based APIs built in the browser that perform AI tasks with local models. AI Agents Create WebMCP tools so sites can support reliable action by AI agents. Accelerate compute Improve compute and model performance with Wasm, WebGPU, and WebNN. COURSE Create AI evaluations Evaluations (or evals) are tests for your AI features. When you create a robust evals pipeline, your LLM-based features will work well for your users. Then, you can ship your features with confidence. In this course you'll learn how about the LLM-as-a-judge pattern to measure subjective quality, create a judge with minimal setup, and discover advanced techniques to develop a custom judge that thinks like top-domain experts. You'll run evals at build time and in production so you can catch regressions early. Start learning Get started Learn the requirements to start building features and applications with built-in AI. Available APIs Review the APIs and their availability status to use with built-in AI in Chrome. Task API polyfill Use the built-in AI task API polyfill to build AI features, without worrying about browser support. Dos and don'ts Learn the best practices for building with built-in AI in Chrome. Cache models Learn how to cache models in the browser for faster inference. Tell users about model downloads Before any of the APIs can be used, the underlying model must be downloaded. Always alert users about the time required to perform these downloads. Step 1 Your site registers tools Your site declares the actions an agent can take, as WebMCP tools. Each tool has a name, description, and JSON schema. // Imperative API document.modelContext.registerTool({ name: "bookSlot", title: "Book a consultation slot", description: "Reserve a 30-minute consultation.", inputSchema: { type: "object", properties: { date: { type: "string", format: "date" }, time: { type: "string" }, name: { type: "string" }, email: { type: "string", format: "email" } }, required: ["date", "time", "name", "email"] }, annotations: { readOnlyHint: false }, execute: async (input, client) => { return await api.book(input); } }); Step 2 The browser exposes them The browser collects and presents these tools to the user's WebMCP-aware agent, alongside the page's URL, title, and origin permission scope. Step 3 The agent takes action, no guessing needed The agent sees a contract, supplies structured arguments, and your code does the rest. The user stays in the loop for permission and confirmation. No more guessing. // the agent's view { "tool": "bookSlot", "arguments": { "date": "2026-07-31", "time": "14:00", "name": "Jerry Jones", "email": "jerry.jones@example.com" } } When to use WebMCP Build effective tools Optimize Wasm for AI Learn about improvements to WebAssembly for tasks commonly used in AI inference. Read the doc Chrome Status WebGPU API Discover WebGPU in Chrome and get first-class support for general computations on the GPU. Read the overview Chrome Status WebNN API Use the WebNN API to perform machine learning operations in the browser. Read the spec Chrome status COURSE Learn AI Whether prompted by company mandates or enthusiasm, AI for AI's sake isn't useful. The best features come from a user need and are measured by the value they deliver. In this course, you learn how to think about building web applications with an AI system that is responsible, usable, and valuable, so that your application delivers on the technology's promise. Start learning Modern Web Guidance Download skills for your AI coding agent to guide its generation towards modern and performant experiences. DevTools AI assistance Chat with Gemini in DevTools. Conversations you start from this panel have context about technical details of the page you're inspecting. Console insights in DevTools Use the Console to view and debug the results of on-device AI. Meet the Team The Chrome Web Developer Relations team and built-in AI PM are available to chat about the web and AI from built-in to WebMCP. We have folks in Asia, Europe, and the America Meet the team web.dev What is AI? Understand the basics and definitions of the various emerging technologies, often referred to as AI. Read the doc web.dev Ethics and AI As web practitioners, it's critical that we build new technology thoughtfully and responsibly. Read the doc web.dev Improve client-side AI Discover techniques to use client-side AI, which offers benefits such as low latency, reduced server-side costs, increased user privacy, and more. Read the doc