Any Agent is a Chrome extension that runs an AI agent in the browser's side panel, powered entirely by a model on your own computer through Ollama. It reads the page you are on, searches and browses the web, fills in forms from a saved profile, answers questions about your documents and writes PDFs. There is no cloud service, no API key and no subscription.
Most browser assistants send every page you read to a remote server. Any Agent sends your prompts, page content, screenshots, documents and personal profile only to the Ollama server at localhost:11434. Everything it stores lives in chrome.storage.local.
One constraint shapes almost every design decision in the project: it is built for small local models of 8B to 12B parameters, such as deepseek-r1:8b and gemma4:12b. Models that size have short attention, make mistakes with element ids and often return slightly broken JSON. So Any Agent does three things around the model:
- Condenses each page into a short, labelled summary instead of raw HTML.
- Keeps every step small: one navigation per step, then look again.
- Corrects the model instead of failing, by repairing JSON and finding the intended form field from its label.
This article walks through how each part works, from the extension's architecture to the agent loop, the page reader, documents, memory and the Ollama client.
Architecture
Any Agent is a Chrome Manifest V3 extension made of three scripts and a storage area. The only process outside Chrome is Ollama, running on the same machine.

The side panel is the brain: it owns the agent loop and is the only part that talks to the model. The content script is its eyes and hands inside the web page. The service worker does what a page script cannot do for itself: change the tab's address, wait for a page to load and take screenshots.
The parts talk through Chrome's message passing. The side panel sends DISTILL_DOM and EXECUTE_ACTIONS to the content script with chrome.tabs.sendMessage. It asks the service worker for NAVIGATE_ACTIVE_TAB, WAIT_FOR_TAB_SETTLE and CAPTURE_VISIBLE_TAB with chrome.runtime.sendMessage.
The whole project is about 6,200 lines of TypeScript with four runtime dependencies: React, React DOM, the lucide-react icon set and pdf.js. Vite builds all three scripts from one codebase. vite.config.ts declares three entry points and gives the service worker and content script the fixed names background.js and content.js, because manifest.json refers to them by name. The manifest requests the sidePanel, activeTab, tabs, scripting, storage, downloads and declarativeNetRequest permissions.
The agent loop: Observe, Think, Act
Every prompt runs through a loop of up to six rounds (the Max autonomous steps setting) of Observe, Think and Act. The loop lives in one function, runMultiStepAgent in src/App.tsx, and it ends as soon as the model has nothing left to do.
Gathering context before the first step
Before the loop starts, the side panel collects everything the model might need:
- Documents: the files attached to this prompt plus the most recent ones from earlier in the chat, up to three. They share a budget of 24,000 characters, split evenly, and anything past a document's share is marked as truncated.
- Images: uploaded images and rendered pages of scanned PDFs, up to four.
- Conversation: the last four messages, 1,200 characters each, so a follow-up such as "now turn it into a PDF" knows what "it" means.
- Intent flags: two regular expressions check whether the user asked for a PDF (
isPdfRequestedPrompt) or for screenshots (isScreenshotRequestedPrompt).
Two modes: answering and acting
Not every prompt needs the browser. buildAgentPrompt in src/lib/ollama.ts decides between two prompt styles with isActionOrientedPrompt, a regular expression that looks for words such as fill, click, search, go to and visit, bare domains like github.com, and time words like latest or today's. Words that only describe a PDF deliverable are removed first, so "make a PDF of this page" does not trigger browsing.
- Answer mode: for a plain question about the page or a document, the model streams a Markdown answer straight into the chat. It takes one step.
- Action mode: for anything that needs the browser, the model must end its reply with a JSON object. Every step after the first is always in action mode.
The JSON contract in action mode looks like this:
{
"answer": "Markdown answer (full when complete, a short progress note otherwise)",
"summary": "Short 1-line status of this step",
"notes": "Key facts from THIS page, with the source URL",
"status": "continue",
"actions": [{ "action": "search_web", "value": "best budget laptops 2026" }]
}
The model can choose from 13 actions: fill, select, check, click, press_enter, scroll, navigate, search_web, open_result, go_back, screenshot, generate_pdf and extract_to_memory.
One round of the loop
- Observe. The side panel asks for a snapshot of the active tab: readable text, a numbered list of interactive elements and, on search pages, a numbered list of results. If the page has little text, it captures screenshots instead. If the page is a CAPTCHA wall, the loop stops and hands control back to you, along with any notes gathered so far.
- Think. The prompt is assembled from the request, the snapshot, your profile, relevant knowledge, documents, earlier step summaries and notes. It goes to the text model, or to the vision model when images are attached. Reasoning streams live into the step card.
- Act. The reply is parsed and its actions are sorted into four groups: memory writes, screenshot requests, PDF builds and browser actions. Browser actions run on the active tab.
- Decide. The loop runs again only if there is something new to look at.

A round sends the agent back to Observe only when the last step opened a new page, asked for screenshots, or left browser actions to follow up on. The last rule is short enough to quote:
const wantsAnotherStep =
screenshotRequested ||
navigated ||
(stepResult.status === 'continue' && domActions.length > 0);
const isFinishing = !wantsAnotherStep || stepNum >= settings.maxSteps;
Keeping each step small
Two rules keep the prompt short enough for an 8B model:
- Notes replace history. Earlier pages are never shown to the model again. Instead, each step writes the facts it found into
notes, tagged with the source URL, and later steps see only those notes. The final answer draws on every page visited without carrying every page in the prompt. - One navigation per step. After parsing, the agent keeps only the actions up to and including the first navigation (
navigate,search_web,open_resultorgo_back). Anything after it would point at element ids on a page that no longer exists.
On the final step, the prompt tells the model not to navigate and to write the best complete answer it can from its notes.
After the loop
If you asked for a PDF and none was built during the loop, a separate writing pass produces the document (see Documents in, PDFs out below). Then, without blocking the interface, the agent checks whether your message revealed anything new about you that is worth remembering. The Stop button aborts the whole run through an AbortController that is passed to each model request in the run.
Reading and acting on web pages
A small model cannot reason over raw HTML, so the content script (src/content/index.ts) turns each page into a short, numbered text summary, and turns the model's numbered actions back into real DOM events.
The page distiller
distillPage() builds a PageSnapshot with four main parts:
- Interactive elements. Form fields are collected first, then buttons and links, so inputs always get the low ids
[1],[2]and are never crowded out by navigation links. The list stops at 90 elements. When a page has more than two form fields, links insidenav,headerandfooterare skipped. Each element is tagged with adata-any-agent-idattribute so the model can point at it by number. - Readable text. A
TreeWalkerwalks themainorarticlecontainer, skips scripts, navigation, footers and hidden nodes, and keeps headings, paragraphs, list items and table cells, with duplicates removed. Headings are prefixed with#and list items with•. The text is capped at 9,000 characters. If the walk finds under 200 characters, as on single-page apps built from nesteddivs, it falls back todocument.body.innerText. - Search results. On Google, DuckDuckGo and Bing result pages, the distiller parses up to 10 organic results with their full URLs, unwrapping DuckDuckGo and Google redirect links. The noisy link list is replaced by a clean numbered list, so the model can simply say
open_result 2. - A verification check.
detectHumanVerification()flags CAPTCHA walls by page title ("Just a moment", "Are you a robot"), by Google's/sorry/path, or by a reCAPTCHA, hCaptcha or Turnstile widget on a short page.
The interactive elements reach the model as one line each:
[1] <input:text> | label="Full name" | REQUIRED
[2] <input:email> | label="Email" | placeholder="[email protected]"
[3] <select> | label="Country" | current="Select" | options=["Select", "India", "Canada"]
[4] <button> | label="Submit"
Finding a field's real label
The label is what makes a field understandable, and real-world forms hide it in many places. resolveLabel() tries ten sources in order and stops at the first hit:
aria-labelaria-labelledby- a
<label for="…">that points at the field - a
<label>that wraps the field - a nearby label, legend or previous sibling, up to three parent levels up
- the heading of a surrounding question block, as in Google Forms
- the placeholder
- the
nameattribute, turned into words (user[twitter_username]becomes"twitter username") - the
id, turned into words the same way - the
titleattribute, then the element's own text
Screenshots when there is no text
Canvas apps, PDF viewers and image-heavy pages have little text to read. When a snapshot has under 80 characters of text and two or fewer elements, or when you ask for a visual look, captureMultiPageScreenshots() scrolls through the page in steps of 88% of the viewport height. It captures up to four JPEG screenshots at quality 75, then restores your scroll position. The images are sent to the vision model in that same step.
Pages that Chrome does not let extensions read, such as chrome:// pages and the Chrome Web Store, return an empty snapshot marked as restricted. The prompt then tells the model to search or navigate somewhere else.
Running actions
executeActionsOnActiveTab() in src/lib/browserBridge.ts splits the model's actions in two. Navigation actions (navigate, search_web, open_result and go_back) go to the service worker, which drives the tab through chrome.tabs. Everything else is sent in a batch to the content script. A plain phrase passed to navigate becomes a search, and a bare domain such as github.com becomes https://github.com.
Inside the page, a few details make the actions work on modern sites:
- Framework-safe typing. React, Vue and Angular ignore a plain
el.value = ….setNativeValue()calls the native value setter from the element's prototype, then firesinput,changeandkeyupevents, so the framework sees the change. - Self-healing fills. If the model points a
fillat a link, a button or a wrong id, the agent takes the words from the action's label, reason and value, and scores every visible input by how many of those words appear in its label, name, id and placeholder. The best match gets the value. - Value clean-up. When a field expects a handle, such as a GitHub or X field with an
@prefix, a full profile URL is cut down to the username. - Safe Submit. A click on a submit button, or on a button labelled Submit, Apply now or Complete registration, is not performed while Safe Submit is on. The button is highlighted in green and the loop pauses so you can review the form.
- Staying on one tab. Links with
target="_blank"are switched to_selfbefore a click, so the agent never loses the tab it is driving.
Waiting for the page to settle
A naive check of tab.status === 'complete' right after starting a navigation often returns the old page, because the navigation has not started yet. The service worker's settleTab() avoids this race. It registers its listener before navigating, waits for a loading event and then for the complete event that follows. If no navigation starts within a grace period, as with a click that does nothing, it returns early. It then waits another 700 ms so single-page apps can render before the next snapshot.
The service worker also makes sure the content script is present. It pings the tab first and, if there is no answer (for example, in a tab opened before the extension was installed), injects content.js with chrome.scripting.executeScript.
Documents in, PDFs out
Any Agent reads uploaded files and writes PDFs entirely inside the browser. Both directions live in src/lib/documentTools.ts, and the only third-party library involved is pdf.js for reading PDFs.
Reading uploads
parseUploadedFile() accepts files up to 25 MB and turns each one into text, images, or both:
| Type | How it is read | Limits |
|---|---|---|
Text layer through pdf.js. If pages average under 12 characters, the file is treated as scanned and its first pages are rendered to JPEG images for the vision model. | 80 pages of text, 3 scanned pages | |
Word (.docx) | A built-in ZIP reader opens word/document.xml. Title and heading styles become Markdown headings, and numbered paragraphs become bullets. | 60,000 characters |
PowerPoint (.pptx) | The same ZIP reader collects the text of each slide, in slide order. | 60,000 characters |
| Images | Downscaled so the long side is at most 1,600 px, then re-encoded as JPEG. | 25 MB upload |
| Text, data and code | Read as UTF-8. HTML is reduced to its visible text. Files full of replacement characters are rejected as binary. | 60,000 characters |
The Office reader has no dependencies. It finds the ZIP file's end-of-central-directory record, walks the entries, and inflates the compressed XML with the browser's own DecompressionStream('deflate-raw'). pdf.js runs with isEvalSupported: false, because an extension's content security policy forbids eval.
Deciding when to write a PDF
isPdfRequestedPrompt() separates building a PDF from asking about one. "Make a PDF report of this page" and "export this as a PDF" match. "Summarize this PDF" does not, because a negative lookbehind rules out a PDF preceded by words like this, the, attached or uploaded.
Writing the document
The content is written in one of two ways:
- Without browsing, the model is told to write the complete document in Markdown as its answer, starting with
# Title. - After browsing, the model only emits a
generate_pdfaction with a title. Once the loop ends, a dedicated writing pass (buildDocumentWriterPrompt) receives the research notes, the draft answer, the current page, your documents and your profile. It writes plain Markdown at temperature 0.4, with 6,144 tokens reserved for the output.
The separate pass exists because small models are far more reliable at writing plain Markdown than at fitting a whole document inside a JSON string. Afterwards, the agent strips chatty openers like "Here's your document" and any surrounding code fence.
Building the PDF by hand
buildPdfBlob() is a hand-written PDF 1.4 generator, so no PDF library ships with the extension. It works in three stages:
- Layout. The Markdown is parsed line by line into headings, paragraphs with bold and
coderuns, nested and numbered lists, checkboxes, block quotes, code blocks, rules and tables. Text is measured with glyph widths copied from Adobe's font metric files, then wrapped to an A4 page (595 × 842 points) with 54-point margins. Table columns start at their natural width and shrink in proportion when they do not fit. - Pagination. Lines are placed from the top of the page down, and a new page starts when the next line would cross the bottom margin. Each page gets a
"Page N of M"footer. - Serialisation. The writer emits the catalog, the page tree, three standard fonts (Helvetica, Helvetica-Bold and Courier with WinAnsi encoding), one content stream per page, and a cross-reference table of byte offsets.
The finished file is saved with chrome.downloads (renaming instead of overwriting when a file with that name exists), and the PDF card in the chat can open a preview in a new tab. Using the built-in fonts keeps the file small, but it also limits PDFs to Latin-1 text: scripts such as Devanagari or Chinese, and emoji, cannot be drawn yet.
Memory and personal knowledge
Any Agent remembers you in three layers, all stored in chrome.storage.local: a structured profile, free-text knowledge imported from other assistants, and short facts learned from your chats. Only the relevant parts reach each prompt.
Layer 1: the profile
The profile has 22 fixed fields: name, contact details, links, education, role, company, skills, a short bio, projects, work experience and free-form notes. It is what the agent uses to fill forms. formatProfileForPrompt() sends only the fields you have filled in, one line each, such as - GitHub URL: https://github.com/….
The model can also write to the profile during a run with the extract_to_memory action. That is how a prompt like "read this profile page and save my details to memory" works.
Layer 2: knowledge imported from other AIs
ChatGPT, Claude and Gemini may already know a lot about you. The Memory tab has a ready-made export prompt that asks another assistant to write a profile of you under fixed headings: identity, education, work, projects, skills, achievements, goals, writing style and preferences. You paste the answer back, or upload a résumé instead.
With Save + auto-fill profile, extractProfileFromText() asks the local model to return JSON at temperature 0.1: the profile fields it can clearly see, plus up to 30 short facts that do not fit a field. The prompt says "Only include fields clearly stated in the text. Never guess." Placeholder answers such as "N/A" or "unknown" are dropped before anything is saved.
Retrieval: local TF-IDF
Imported knowledge can run to thousands of words, far more than an 8B model can use well. retrieveRelevantKnowledge() in src/lib/knowledge.ts picks the relevant parts without an embedding model:
- Chunk. Each knowledge entry is split into pieces of about 450 characters along headings and paragraphs. Each piece keeps its section heading.
- Tokenise. Text is lower-cased and split into words, and common stop words are removed.
- Score. The query is your prompt plus the page title and headings. Each chunk scores the inverse document frequency of every query word it contains, so rare words count more than common ones.
- Fill a budget. Chunks are taken best first (ties go to the newest import) until a character budget is full: 1,800 characters normally, and 1,200 when images are attached.
The scoring rule for a chunk c against a query q is:
score(c) = ∑ (t ∈ q ∩ c) log(1 + N / df(t))
Here N is the number of chunks and df(t) is the number of chunks that contain the word t. Each chunk is labelled with its source, such as [from ChatGPT], so the model knows where a fact came from.
Layer 3: learning from chat
After each answer appears, the agent checks in the background whether you said something new about yourself. To avoid an extra model call on every message, a cheap filter runs first: the message must contain a first-person word such as I, my or me, or the words call me or forget.
If it passes, extractMemoryUpdatesFromChat() shows the model your current profile and your 60 most recent facts, each with a number. The model returns three things: profile updates, new facts, and the numbers of facts to forget. The code then applies a set of guards before saving anything:
- Long free-text fields (bio, projects, work experience and notes) are never overwritten by one chat line. The new text is saved as a fact instead.
- New skills are merged into the existing list, with duplicates removed regardless of case.
- A new fact is skipped if a fact with the same wording already exists, ignoring case and punctuation.
- Fact numbers to forget are checked against the real list, so a made-up number does nothing.
Learned facts live in a single knowledge entry called Learned from chat, capped at 200 facts, so retrieval finds them like any other knowledge.
One-click undo
Every automatic update records exactly what it changed: the old and new value of each profile field, and each fact it added or removed. The Undo button under the message reverts only those changes. A profile field is restored only if it still holds the value the update wrote, so an undo never wipes out a change you made by hand afterwards.
Talking to the local model
Every model call goes from the side panel straight to Ollama's HTTP API, with no server of Any Agent's own in between. The client in src/lib/ollama.ts handles four problems that come with running small models locally: browser security rules, streaming, context length and broken JSON.
Three kinds of request
| Request | Endpoint | Used for | Settings |
|---|---|---|---|
| Agent step | POST /api/chat, streaming | Every Observe, Think, Act step and the PDF writing pass | Temperature 0.25 (0.4 when writing a document) |
| JSON extraction | POST /api/chat with format: "json" | Importing knowledge and learning from chat | Temperature 0.1, 8,192-token context |
| Model list | GET /api/tags | The Connected status and the model pickers in Settings | None |
If the saved model is not installed, the extension switches to the first installed model on start-up instead of failing on the first prompt. When a step has images attached, it goes to the vision model, with the images sent as raw base64 in the message's images field.
Getting past CORS without configuration
Ollama checks the Origin header of every request, and a chrome-extension:// origin is not on its default allow list. Browser extensions therefore usually ask you to set the OLLAMA_ORIGINS environment variable. Any Agent avoids that step with Chrome's declarativeNetRequest API. A static rule in public/rules.json rewrites the Origin header of requests to localhost:11434 and 127.0.0.1:11434 so they look same-origin, and adds Access-Control-Allow-* headers to the responses. The rule matches only those two addresses.
Streaming the reply
Ollama streams newline-delimited JSON. streamOllamaStep() reads the response body chunk by chunk, splits it into lines, and keeps any trailing partial line for the next chunk, because a network chunk can end in the middle of a JSON object. It collects two streams of text:
message.thinking, the separate reasoning field that newer Ollama versions return for reasoning models.message.content, the answer itself, from which any inline<think>…</think>block is split off for models that write their reasoning that way, including a block that has not closed yet.
Interface updates are throttled to one every 80 ms, so a fast model does not flood React with re-renders.
Sizing the context window
Ollama's default context window is small, and when a prompt does not fit, Ollama silently cuts off the start of the prompt. The start is where the system rules live, so an overflow quietly breaks document questions and JSON actions. Any Agent sizes the window for each request instead:
const promptTokens = Math.ceil((system.length + user.length) / 3.2);
const imageTokens = (images?.length || 0) * 1000;
const wanted = promptTokens + imageTokens + (numPredictReserve ?? 3072);
const numCtx = Math.min(32768, Math.max(8192, Math.ceil(wanted / 4096) * 4096));
The estimate assumes about 3.2 characters per token and 1,000 tokens per image, reserves room for the reply (3,072 tokens, or 6,144 for a document), and rounds up to a multiple of 4,096 between 8K and 32K.
Repairing the model's JSON
Small models often get the JSON almost right. parseAgentStepJson() tries progressively looser readings before it gives up:
- Remove the
<think>block. - In answer mode, if the reply has no
"actions"key, treat the whole reply as the Markdown answer. - Take the contents of a fenced code block if there is one, otherwise everything from the first
{to the last}. - Try
JSON.parse. If that fails,parseJsonLoose()escapes raw line breaks and tabs inside strings, removes trailing commas, and tries again. - Accept a single action object where an array was expected, and lower-case the action names.
- Accept a bare array of actions with no surrounding object.
- As a last resort, pull out just the
"answer"field with a regular expression, or show the text with code blocks removed. Raw JSON is never shown to you.
Together with the self-healing form fill, this is why a mistake by the model usually costs nothing more than a slightly less tidy step.
The interface
The side panel is a React 18 app styled with Tailwind CSS. It follows the system's light or dark appearance and has three tabs: Chat, Memory (with Profile and Knowledge views) and Settings. The header shows a green or red dot for the Ollama connection, next to the name of the active model.
Showing the agent's work
A local agent is slower than a cloud one, so the interface shows each step as it happens instead of a spinner. Every step gets a StepTraceCard with:
- the title of the page it read, and a status badge: running, completed, paused for submit, or error,
- a Thinking drawer that streams the model's reasoning while the step runs, then collapses when it finishes so the answer stands out,
- thumbnails of any screenshots it captured, and
- a log of every action, with a green or red dot and a plain message such as
Filled "Email" with "…"orPaused before clicking final submit button "Apply".
The page bar above the chat opens a context inspector that shows exactly what the agent can see on the current page: the readable text with its character count, and the numbered element list the model receives. It is the quickest way to find out why the agent missed a field.
Rendering half-finished Markdown
Answers are rendered while they stream, so the Markdown is often incomplete. MarkdownRenderer is a small hand-written renderer built for that case. For example, a code block whose closing fence has not arrived yet is still drawn as a code block, instead of turning the rest of the answer into raw text. Each message is wrapped in an ErrorBoundary, so one message that fails to render shows a small error with a Retry button instead of blanking the whole panel.
Small conveniences
- Highlight to reply. Selecting text in a reply opens a floating Reply | Copy toolbar. Reply attaches the excerpt (up to 1,500 characters) to your next message, and the prompt tells the model to focus on it.
- Attachments. Files can be added with the paperclip or dropped onto the chat box. Each one shows as a chip labelled image, scanned, or its size in thousands of characters.
- Keyboard. Enter sends, Shift+Enter adds a new line, and Esc stops a running task.
- PDF cards. A generated PDF appears as a card with Preview and Save buttons. Any answer longer than 140 characters also gets an Export as PDF link.
- Memory cards. When the agent learns something, a Memory updated card lists each change, with an Undo button.
- Quick prompts. An empty chat offers four starters: summarise the page, build a PDF of it, fill its form from memory, or save your details from it.
Running it yourself
Any Agent needs Ollama running at http://localhost:11434, a text model, and optionally a vision model for screenshots, images and scanned PDFs. No OLLAMA_ORIGINS setup is needed.
- Pull the models:
ollama pull deepseek-r1:8b
ollama pull gemma4:12b
- Clone and build the extension:
git clone https://github.com/YADUNANDAN-SINGH/Any-Agent.git
cd Any-Agent && npm install && npm run build
- Open
chrome://extensions, turn on Developer mode, click Load unpacked and choose thedistfolder. - Click the Any Agent toolbar icon to open the side panel. In Settings, check that Ollama shows Connected and pick your text and vision models.
For development, npm run dev rebuilds dist/ on every save. Reload the extension on chrome://extensions afterwards, and run npx tsc --noEmit to type-check without building.
Settings
| Setting | What it does | Default |
|---|---|---|
| Ollama endpoint | Address of your local Ollama server | http://localhost:11434 |
| Text model | Model for answers, browsing and writing | deepseek-r1:8b |
| Vision model | Model for screenshots, images and scanned PDFs | gemma4 |
| Max autonomous steps | Most Observe, Think, Act rounds per prompt | 6 |
| Web search engine | Engine used by search_web | Google |
| Screenshot fallback | Capture screenshots when a page has little text | On |
| Max screenshots | Scrolled screenshots per capture | 4 |
| Safe Submit | Pause before final submit buttons | On |
| Highlight elements | Outline the fields the agent fills | On |
| Learn from chat | Save new facts you share about yourself | On |
Privacy and safety by design
- Local only. Prompts, page content, screenshots, documents and your profile go only to your Ollama server.
- Your browsing stays yours. Searches and visits happen in your current tab, so sites see an ordinary visit from your browser.
- You stay in control. Safe Submit pauses before final submissions, CAPTCHAs are always left to you, and every automatic memory change can be undone.
Known limitations
- Generated PDFs cover Latin-1 text only. Other scripts and emoji print as
?or are left out. - Small models sometimes pick the wrong link or stop early. A more specific prompt, a stronger model or a higher step limit helps.
- Content inside iframes and closed shadow DOM is only partly visible to the page reader.
- Chrome does not let extensions read
chrome://pages or the Chrome Web Store.
Takeaways
Any Agent shows that a useful browser agent does not need a frontier model in the cloud. Most of the work happens in ordinary code around the model:
- a page distiller that turns HTML into a short numbered list,
- a loop that keeps every step small and carries notes instead of whole pages,
- a context window sized to every prompt,
- JSON repair and self-healing actions that absorb the model's mistakes, and
- a retrieval step that sends only the relevant parts of your memory.
With that scaffolding, an 8B model running on a laptop can read, browse, fill forms and write documents, and none of your data leaves the machine.
The complete source code is open on GitHub. You can also read the companion LinkedIn article or join the discussion on the LinkedIn walkthrough post.