ai-newtab README

The project's README from github.com/ThariqS/ai-newtab. As one markdown file: README.md.

AI Homepage

A new tab that reads the internet for you.

AI Homepage replaces Chrome's new-tab page with one that's written for you. An agent looks at what you've actually been browsing, opens the pages you follow (signed in as you), and writes a fresh homepage from what it finds there. It rebuilds itself in the background, so each new tab is up to date.

An example homepage in a morning-newspaper style Illustration. Your homepage is built from your own browsing, so its stories will be different.

A morning newspaper is just one look. You can describe any look and the next build follows it: a quiet one-column digest, a dense dashboard, a green-on-black terminal, a zine.

Privacy, up front. To build your homepage, the extension sends a summary of your browsing history (top domains, visit counts, a few page titles) and the cleaned-up HTML of up to 8 pages to the Anthropic API, using your own API key. Those pages are loaded in your signed-in browser, so they can include private content. The agent session and every uploaded page are deleted when each build ends. Your API key stays in the extension's local storage. More detail in ARCHITECTURE.md.


Install

You need Chrome (or another Chromium browser), Node.js 20+, and an Anthropic API key.

git clone https://github.com/ThariqS/ai-newtab.git
cd ai-newtab
npx [email protected] install
npx [email protected] build

(If you already have pnpm, plain pnpm install && pnpm build works too.)

Then load it into Chrome:

  1. Go to chrome://extensions.
  2. Turn on Developer mode (top right).
  3. Click Load unpacked and choose apps/extension/.output/chrome-mv3.

If Chrome asks whether to keep the changed new-tab page, choose Keep it.

Your first homepage

  1. Open a new tab and paste your Anthropic API key.
  2. Click Build today's homepage.
  3. Watch it work. The progress view walks through each step: preparing the agent, reading your history, opening pages in your browser, analyzing them, and writing your homepage.

The first build takes a few minutes. You can close the tab while it runs, since the build lives in the extension's background worker and appears in any new tab you open.

Make it yours

Click ⚙️ Settings on the new tab.

Instructions. Anything you write here goes into every build and takes priority over the agent's own defaults. This box sets both the content and the look:

You write You get
"A morning newspaper. Serif type, a big masthead, a lead story, a column of briefs." A broadsheet front page
"One calm column. No images. Five things worth reading, with one line on why." A quiet reading list
"Dense dashboard: GitHub PRs and issues first, then Hacker News, then everything else." A work cockpit
"Green-on-black terminal, monospace, like a 1980s BBS." Exactly that
"Skip sports and politics. Always show the weather and my next three calendar events." Your rules, every day

Click Save & rebuild to apply them right away.

Model. Choose which Claude model writes your page:

The new model takes effect from your next build.

Rebuild automatically. On by default. Once your homepage is older than the interval you pick (6, 12, 24 or 48 hours), the extension rebuilds it quietly in the background. It only starts after you've built once by hand, and it won't retry a failed build until the next interval, so it never loops.

↻ Rebuild in the top-right corner rebuilds right away.

Good to know

How it works

  1. getHistory: the agent gets a ranked summary of your most-visited domains.
  2. getPageHtml: it picks up to 8 pages, which the extension opens in a background window, cleans up, and mounts into the agent's sandbox as files.
  3. grep / read: the agent pulls headlines, posts and links out of those files inside its sandbox.
  4. write: it writes one React component, which the new tab renders.

The extension's background worker drives a Claude Managed Agents session directly, with no server in between. The two custom tools run in the extension because they need chrome.history and chrome.tabs. Everything else happens in the agent's sandbox, where shell access is off: scraped pages are untrusted input.

See ARCHITECTURE.md for the event flow, the layout, and the gotchas worth knowing.

Development

packages/agent-core   the agent loop: host-agnostic, no chrome.* or node:*
apps/extension        the MV3 extension (WXT + React)
harness               Bun scripts that run agent-core outside Chrome, and test the built extension
pnpm dev                 # WXT with hot reload
pnpm typecheck           # all packages
pnpm test                # unit tests (no API calls; needs Bun)
pnpm extension:test      # loads the built extension into headless Chrome (no API calls)

cp .env.example .env     # add ANTHROPIC_API_KEY, then:
pnpm agent:run           # a full build against the real API, with fixture history
pnpm agent:verify        # check the output actually renders

Status

Early and experimental. It's a tool you run yourself with your own key. Don't publish it to a store as-is: anyone with access to the browser profile can read the stored API key.

License

MIT

ai-newtab (ThariqS/ai-newtab)

Searching Database…

这是什么?AI Homepage 是一个 Chrome 扩展,用一个由 Claude 智能体为你编写的新标签页替换默认新标签页,内容依据是它在你自己的浏览记录中发现的网站。
这是装在 Chrome 里的浏览器扩展,还是运行在服务器上的东西?它是一个本地加载的 Chromium 浏览器扩展;智能体会话从扩展的后台 worker 运行,中间没有任何服务器。
怎么安装并构建第一个主页?运行 pnpm install 和 pnpm build,然后在 chrome://extensions 打开开发者模式,把 apps/extension/.output/chrome-mv3 作为未打包扩展加载。在第一个新标签页中粘贴你的 Anthropic API 密钥,并点击 'Build today's homepage'。
使用之前需要准备什么?你需要 Chrome 或其他 Chromium 浏览器、Node.js 20+(或直接用 pnpm),以及你自己的 Anthropic API 密钥。
它准备好发布到 Chrome 应用商店了吗?还没有。它被明确标注为早期实验性项目,仅供自己运行;照原样发布的话,任何能访问浏览器配置文件的人都能读到你的 API 密钥。
这是为谁打造的?它面向愿意用自己的 API 密钥运行这个实验性扩展的个人用户,目前还不适合分发给他人。
用哪个 Claude 模型构建我的主页?你可以选择 Claude Sonnet 5.5(默认,平衡最佳)、Claude Haiku 5.5(最快最便宜)或 Claude Opus 5.5(最细致但最贵)。所选模型从下一次构建开始生效。
我可以更改主页的外观吗?可以。你在设置里用自由文本写下对内容和外观的要求(例如“安静的单栏摘要”或“黑底绿字的终端”),每次重新构建时它们都会优先于智能体的默认样式。
主页会自动更新吗?会。一旦主页的存在时间超过你设定的间隔(6、12、24 或 48 小时),它就会在后台安静地重建,但前提是你已经手动构建过一次。
智能体如何决定阅读哪些页面?它会对你最常访问的域名排序,以你的登录状态打开至多 8 个页面,并跳过搜索引擎、网页邮箱、银行网站和未登录的营销页面;它生成的每个链接都来自它实际读过的页面。
Creator
ThariqS
Size
0.3 MB
Stars
841
Updated
CommitOct 19
Age
11d
Commits · 90 Days