Cosurfer
Chrome extension to ask questions to websites via LLMs
Install / Use
/learn @fkneist/CosurferREADME
Cosurfer

Introduction
Cosurfer is a browser extension (currently only for Chromium based browsers), that lets you ask questions to the website in your current browser tab using LLMs. It can summarize long discussions for you for example.
Installation
- Take the
distfolder of this repository OR build it yourself - Go to
chrome://extensions - Click "Load unpacked"
- Select the
distfolder
Setup
You can use Cosurfer with different LLM providers remote and local.
Groq
- Create an account at Groq
- Generate an API key
- Open the Cosurfer settings by clicking the gear icon
- Insert the groq API key
Ollama
- Install Ollama, e.g. with
brew install ollamaon MacOS - Start Ollama with
OLLAMA_ORIGINS=chrome-extension://* ollama serve - Download a model
- Insert Ollama address in Cosurfer settings, e.g.
http://localhost:11434 - Select Ollama model in Cosusrfer settigns, e.g.
llama3:8b
Tech Stack
- Vite: build tool
- React: frontend framework
- LangChain.js: LLM orchestration
- daisyUI: styling
- might migrate to https://github.com/daisyui/react-daisyui
- heroicons: icons
Limitations
-
Currently the innerText of the website's body element is sent to the LLM. If there is too much text for the rate limit (too many tokens), just the starting portion is sent to the LLM and the user is informed how many lines were processed.
- Details on groq API limits and context window per model
-
There is no "memory" in the conversation yet, so the model doesn't "remember" the last question but treats every message like the first message of a conversation.
-
Below you find a sample collection of URLs with estimated token counts of the content, useful for testing the limitations:
| token count | url | Can cosurfer summarize it? | | ----------- | ---------------------------------------------------------- | ---------------------------------- | | ca. 85 | https://example.org/ | Yes, completely | | ca. 11995 | https://en.wikipedia.org/wiki/Brick | Yes, completely | | ca. 16514 | https://en.wikipedia.org/wiki/Linux | Yes, completely | | ca. 25346 | https://news.ycombinator.com/item?id=31261533 | Yes, completely | | ca. 127584 | https://gutenberg.org/cache/epub/50572/pg50572-images.html | Partially, lines 1 to 5802 of 6655 |
Development
npm installnpm run buildnpm run watch
Alternatives
- As of
2024-09-23Mozilla offers an extension for Firefox with similar capabilities, calledorbit. See their blog post and official website. Extensive technical review blog post by Mathew Duggan. - Brave Leo AI
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
