Bring your own AI to the web.

Take your agent with you as you browse. You decide what it can see, what it can do, and what it shares with each site.

Harbor is an experimental browser extension and a proposal for the web. Built by people inside Mozilla as an independent project.

Whose side is your agent on?

Suppose you ask an airline’s assistant to find you the cheapest way home. Would it put a train ticket first?

The airline has every reason to build an assistant that sells flights. You have every reason to bring one that remembers you’re happy to take the train. Why should visiting a website settle which of those assistants gets to help you?

You can already follow a link in the browser of your choice. We think you should be able to bring your own agent along. A site can say what it offers. You should get to decide who acts on your behalf.

Read Raffi Krikorian’s essay on AI in the browser →

What if you could use your own AI on the sites you visit?

You search the web for the guitar chords to a song you love. You find a version you can play, until you get to the chorus.

Imagine you highlight the chorus and choose “Use chords I know.” Your browser asks whether to let the music site use your AI. You choose “This time only.”

The site supplies the arrangement. Your agent remembers the chords you practiced last week and uses them to rework the chorus. The new chords appear right above the lyrics. You switch back to the original, listen to both, and play along with the one you like.

Next week you come back ready to learn the harder part.

Who decides whether last week’s lesson should shape what you see today? →

A.

Your model.

Today you connect Harbor to a model on your computer or through a provider. Choosing a model doesn’t import another assistant’s conversations or memories. The guitar example imagines an agent that already has access to your lesson notes.

B.

Your context.

The music site sees which bars you select and the chords your agent sends back. If you use a hosted model, its provider sees the arrangement and any lesson details included in the request.

C.

Controlled by you.

Your browser asks whether the music site may use your AI. You choose which part of the song you want help with.

What can a website do with Harbor?

A page can prompt the user's model, run an agent against tools the user has approved, or register a tool of its own.

1 · use the user's modelwindow.ai
// The page never sees an API key. The browser does the routing.
const session = await window.ai.createTextSession();
const reply   = await session.prompt(`Summarize this article: ${document.querySelector("article").innerText}`);
2 · run an agent that can call tools the user has approvedwindow.agent
for await (const ev of window.agent.run({ task: "find a fingering for an F chord on guitar" })) {
  if (ev.type === "tool_call") console.log("→", ev.tool);
  if (ev.type === "final")     console.log(ev.output);
}
3 · a page declares its own tool · Harbor APInavigator.modelContext
navigator.modelContext.addTool({
  name:        "get_chords",
  description: "Get the chords for a section of this song",
  inputSchema: { type: "object", properties: { section: { type: "string" } } },
  handler:     ({ section }) => getChords(section),
});

Who chooses the model?

A site usually picks the model behind its assistant. Harbor lets each visitor bring their own.

Compare agent browsers, sidebars, and the proposed web APIs →

Harbor is the working sketch of the proposal.

You can try your model today with the Page Summarizer in Firefox. The guitar lesson is an example of what a music site could build.

Read the spec →
Build with it →

web page your-favorite-site.example window.ai · window.agent browser (mediates) user permissions, per origin · audit, revoke, scope — Harbor lives here — user permits per origin user's model local · hosted · self-run user's MCP servers page tools · remote tools page user-controlled the trust line moves up, by one box
fig. 1 · the trust line

What could you build with Harbor?

01

A docs site that reads itself for you.

The docs site sends the article text to the reader’s chosen model through window.ai. The site never needs the reader’s API key.

await window.ai.createTextSession().then(s => s.prompt(article))

02

PDX to SFO, Friday after five, aisle seat.

The airline’s page hands your agent the trip. Your agent searches with the airline’s own tools, and asks you before holding a seat.

window.agent.run({ task: "PDX → SFO Friday after 5pm, aisle" })

03

Open a chapter by name.

The agent calls the reading site’s open_chapter tool.

addTool({ name: "open_chapter", inputSchema: { … } })

04

Revise a draft in your own voice.

When you ask for help revising a draft, a writing extension could send the text and your style profile to your chosen model.

window.ai.createTextSession({ systemPrompt: userStyleProfile })

A smaller surface, by design.

We assume a model can be fooled by something it reads. In the proposal, a site asks for specific actions. You could allow an agent to read a song’s chords without giving it permission to change the published arrangement. You can revoke a site’s access.

Read the threat model →

Think of a site you used this week. What would you have wanted an agent on your side to do for you there? What would you have wanted it to keep to itself?

Tell me about it. We’re looking for the everyday situations this proposal ought to account for.

If you’re building something nearby or see a problem with the design, join the discussion on GitHub.

To try Harbor today, set up both Firefox extensions, the native bridge, and a model. Save the Page Summarizer bookmarklet to your bookmarks toolbar. Open an article and click the bookmark. With your permission, it sends page text to your model and shows you a summary over the article.