Ricuicui 如何用 Rust 打造由本機大語言模型代為點擊和輸入的瀏覽器
Building a browser where a local LLM clicks and types for you, in Rust
Ricuicui 是一款以 Rust 編寫、內置 AI 智能體的 Mac 和 Windows 桌面瀏覽器,可用本機大語言模型讀取網頁、點擊、填寫表格及草擬回覆。它以 Servo 顯示網頁,並用自研 Cotcotcodet 解析頁面供 AI 閲讀;作者表示,分開兩種處理令智能體更快、更安全。瀏覽器會在提交表格、購買或發送訊息前要求用戶批准,並禁止智能體輸入密碼或卡號,操作會即時顯示,供用戶隨時接手。
I've been building Ricuicui, a desktop web browser for Mac and Windows with an AI and agents built in. The AI reads the page, clicks, fills in forms and drafts replies while you watch, and it can run entirely on your own machine. Here is how it is put together, and what I learned on the way.
One Rust binary, two rendering engines
Ricuicui is a single program written in Rust. It embeds Servo, the Rust browser engine, to display every site, so there is no Chromium to install next to it.
Next to Servo there is a second, much smaller engine of our own, Cotcotcodet. It does not try to render pixels: it parses pages quickly so the AI can read them, and it runs the page's JavaScript isolated in a separate process. Splitting "showing a page to a human" from "reading a page for an AI" turned out to make the agent both faster and safer.
A local LLM, without Ollama or LM Studio
The local AI uses llama.cpp and models in GGUF format. On a Mac, llama.cpp ships inside the app; on Windows it is downloaded on first use and runs on the graphics card through Vulkan. No separate runtime to install.
Memory decides everything, so the app suggests a model from what you have:
| Mac (unified memory) | PC (VRAM) | Suggested model |
|---|---|---|
| 8 GB | 4 GB | Qwen3 0.6B |
| 16 GB | 8 GB | Qwen3 4B |
| 24 GB | 12–16 GB | Qwen3 8B |
| 32 GB+ | 24 GB+ | Qwen3 14B |
Any other .gguf file works too (Mistral, DeepSeek…), within the memory available. For the hardest tasks you can switch to an online model (Claude, GPT, Mistral) with your own key, stored in the system keychain.
Letting the model act, without letting it do anything
An agent that can click is only useful if you can trust it. A few rules are enforced by the browser, not by the prompt:
- the AI asks for your approval before any action that commits you (submitting a form, a purchase, sending a message);
- it never types a password or a card number: sensitive fields are detected from their type, but also from their placeholder,
aria-labelor label (PIN, CVV, 2FA codes…); - everything it does is shown live, and you can take the wheel at any time.
MCP in both directions
Ricuicui is also an MCP server: it exposes 13 tools locally on 127.0.0.1:7878, so Claude Desktop, Claude Code, Cursor, VS Code or LM Studio can drive the browser while you watch. And it is an MCP client: its own AI can plug into MCP servers (files, memory…) and into A2A agents and webhooks.
Where it stands
Ricuicui is freemium: the base version contains the whole browser, and the Pro licence (EUR 12.90 a year) unlocks the local GPU server. It runs on macOS 11+ (Apple silicon and Intel) and Windows 10/11.
I'd love feedback from people running local models: which sizes are actually usable for agent work on your hardware, and what you would want an AI browser to refuse to do.
來源:DEV Community · dev.to
