larik v0.25.0

Guide

Web

web_fetch downloads a page and returns its main content as Markdown:

  • Scripts, navigation, headers and footers, and decorative images are stripped, and links are resolved against the page URL.
  • Text and JSON responses are returned as-is.
  • Long pages come back in chunks (start / max_length).
  • It asks per domain. "Always allow" saves a rule such as web_fetch(domain:go.dev), which also covers subdomains.
  • A redirect to a different host is reported rather than followed, so it can't sidestep a domain rule.
  • Link-local and cloud-metadata addresses (169.254.169.254 and similar) are blocked.
  • Responses are capped at 5 MB and 30 s, and cached for 15 minutes.

web_search appears when a search backend is configured. Larik detects one from the environment:

Backend Setting
Brave Search BRAVE_API_KEY
Tavily TAVILY_API_KEY
SearXNG (self-hosted; enable the JSON format) SEARXNG_URL
DuckDuckGo (keyless; opt-in, see below) "provider": "ddg"

DuckDuckGo needs no account, but it is never selected automatically and you have to ask for it by name. Its keyless API returns an instant answer and related subjects rather than a ranked web index: "go programming language" finds Wikipedia and neighboring topics, while "go 1.27 release notes" returns nothing at all. It suits entity lookups and leaves specific questions to the indexed backends, so Larik turns an empty answer into an error that names them rather than reporting "nothing found". The tool's description states which backend is in use, so you can see where a query goes before allowing it.

Use /web-search-config (or Web search backend in /config) to edit the personal search backend: toggle disabled, cycle the provider (auto/Brave/Tavily/SearXNG/DuckDuckGo), set an optional URL or API-key environment variable, and replace a masked API key with enter or clear it with d (or the Clear API key row); leaving a replacement empty changes nothing. /stt-config and /tts-config (also in /config) edit personal speech endpoints: base URL, model, API-key environment variable, masked key (enter replaces, d clears), language, and voice. Saving preserves other web/audio settings and unknown fields, secures the personal config to owner-only permissions, and asks before rebuilding services and clearing a current model context; when reload is unavailable, run /reload later.

You can also set it explicitly:

json
{ "web": { "search": { "provider": "brave", "api_key_env": "MY_BRAVE_KEY" } } }

Trust and permissions:

  • Search settings are honored only from personal files, since a shared .larik/settings.json could otherwise send your queries to its own server. Shared files can only disable web tools ("web": {"fetch_disabled": true} or {"search": {"disabled": true}}).
  • Both tools ask before running (web_search can be always-allowed).
  • Plan mode asks for them rather than blocking them, because research is part of planning.
  • Web content is marked as untrusted data for the model.

Browser

For pages that need JavaScript, a sign-in or clicking through, Larik drives a real Chrome, and can show it to you inside the terminal. It's off by default. In the TUI, use /browser on or /browser off to save the switch and reload with a fresh model context; /browser shows the status. The saved session transcript remains available, but the current model context is cleared. You can also turn it on in your personal config:

json
{ "browser": { "enabled": true } }

A Chromium-based browser must be installed: Chrome, Chromium, Microsoft Edge, Brave or Vivaldi all work, and Chrome is preferred when there are several. Set "chrome_path" if Larik can't find yours. Chrome always runs headless, as Larik's own child process: there is no window to manage and nothing to install. It starts on the first browser tool call, so enabling browser support does not launch Chrome during Larik startup. Larik does look for an installation at startup and warns if it finds none, but the tools stay available either way. The browser keeps its own profile under ~/.local/share/larik/browser-profile, so sign-ins last between sessions. Larik shuts down Chrome and its renderer/helper processes when Larik exits; hiding the browser pane leaves them running. If another larik session already has that profile open, the browser starts with a temporary one instead, and the model is told its sign-ins aren't there.

Watching and taking over. /browser show or F3 (or the model's browser_show tool) opens a panel beside the conversation, in Larik's own window, that shows the tab the agent is working in, live, drawn with the kitty graphics protocol. You can click, scroll and type in it, which is how you sign in or get past a check for the agent; the top line says when an agent is driving. Its top row is a toolbar like a browser's: back and forward (dimmed when there's nowhere to go), reload (stop while a page loads), and an address field you click to type into, which selects the address so typing replaces it. The keyboard works too: ctrl+l for the address (with alt+backspace/ctrl+w, ctrl+u and alt+←/alt+→ for words), alt+←/alt+→ for back and forward, ctrl+r or F5 to reload, ctrl+-/ctrl+=/ctrl+0 to zoom (zooming out gives a narrow panel a site's desktop layout), and alt+c to copy the selection, or the address when nothing is selected. To show the model what you mean, press alt+s, then drag a box over part of the page or click one element: Larik adds a picture of the spot and a note with the element's selector, styles, text and markup to your prompt, and moves the keyboard there so you can say what to change (esc cancels). This works in the panel, not in a separate pane. After a change, alt+d finds that element again and shows it before and after, side by side, with what changed tinted: enter adds the picture to your prompt so the model can see the result, and esc closes it. Resting the pointer on a link shows where it goes. Clicking a drop-down (<select>), which headless Chrome can't draw, offers its options on the second row: arrows or typing to find one, enter to choose. With several tabs open the toolbar says which one is shown and whose it is; ctrl+pgup/ctrl+pgdn step through them and keep the one you pick on screen (click the tab badge or alt+p to follow the agents again). While you're using a tab, an agent working in another doesn't take the view away. Hiding the browser (ctrl+q, /browser hide, or closing the pane) leaves Chrome running with the agent's pages; /browser quit shuts it down, and the agent's next browser call starts it again, with sign-ins kept. Questions only you can answer appear on the pane's second row while it's open:

  • A site that asks for a username and password (HTTP Basic or Digest authentication) gets a sign-in form: tab switches fields, enter signs in, esc cancels. The password shows as dots and goes only to Chrome, never to the model or a log. With no pane open, the sign-in is cancelled and the model is told to open the pane.
  • A page asking to show notifications or know your location gets Allow / Block (click them, or press y / n). Allowed notifications then appear in the pane and as desktop notifications in terminals that support them. Headless Chrome can't read your computer's location, so allowing location shares the one in "location": {"latitude": …, "longitude": …} (or Location pages may ask for in /config), and nothing if it's unset. Without a pane, these requests are denied, as before. Only the top-level page can ask, and the prompt names the tab's own site.

Pages are silent unless you set "sound": true (or Browser sound in /config): Chrome then plays audio through this computer's speakers, and the pane's title shows ♪. It applies from Chrome's next start, and over SSH the sound plays on the remote machine. F3 moves the keyboard between the browser and the conversation, and clicking either side does too; ctrl+c always reaches Larik. The panel takes the sidebar's column, and steps aside while the window is too narrow (under 71 columns). With "show": "pane" (or Where the browser shows in /config), or when the panel can't open, the browser goes in a pane of the terminal's own instead: Larik splits it itself in tmux, cmux, kitty (with allow_remote_control) and WezTerm, and in another terminal prints the larik browser view command to run in a pane of your own. /browser hide hides the panel and /browser quit closes Chrome. Drag the line between the conversation and the panel to resize it. The pane needs a terminal that shows kitty graphics: kitty, Ghostty, WezTerm, cmux or Konsole (inside tmux, set allow-passthrough on). "pane_size" sets the panel's or pane's share of the width (20–80, default 50). The viewer talks to Chrome directly for the picture and your input, and redraws only the parts of the page that changed, so the agent's tools never wait for it. Chrome renders at 2× so Retina screens get full-resolution frames. When the terminal can read images from temporary files (kitty and Ghostty can, locally), frames travel that way instead of through the terminal's input; LARIK_BROWSER_TRANSFER=direct turns that off. LARIK_BROWSER_DEBUG=1 shows the measured cell size, frame size, transfer mode and frame rate in the pane.

Larik 0.15's optional macOS launcher (larik browser-broker install) is gone; Larik removes its LaunchAgent the next time launchd starts it, or run larik browser-broker once to remove it now.

The model gets these tools:

Tool Does
browser_navigate Opens a URL and returns a snapshot of the page
browser_snapshot The page's text, plus its links, buttons and fields, each with a ref such as e12. A long page comes in parts (start), and ref reads just one form, table or frame
browser_screenshot An image of the viewport, the full page or one element; labels draws each ref on it, and save_path saves a JPEG in the project
browser_click Clicks (or hovers) an element by ref with a real mouse event. With the panel open, a marker shows the spot for 400 ms first, so you can press esc to stop the turn before the click lands. If the element moves in that time, the click follows it
browser_type Types into a field by ref, key by key; optionally presses Enter
browser_select Picks options in a <select>
browser_press_key Presses Enter, Escape, Tab, arrow keys, PageDown…
browser_upload Chooses files (inside the working directory) for a file input, or for the chooser a button opens
browser_wait_for Waits for text to appear or disappear, or for a few seconds
browser_history Back and forward
browser_tabs Lists, opens, selects and closes tabs; tabs a page opens become active
browser_eval Runs a JavaScript expression in the page
browser_compare The part of the page you last pointed at with alt+s, or with page: true the whole window from before the agent's edits, before and after, with what changed tinted, so the model can check its own change
browser_render Draws a Mermaid diagram, SVG or HTML as a picture in the conversation, in a sealed page that reaches no network and shares nothing with the browser. Only Mermaid runs scripts. Where pictures can't show, the model is told to explain in text
browser_console Console messages, exceptions and dialogs since the last call
browser_network The requests the page made: method, URL, status and time, with failures marked; and a response's body
browser_show Opens the in-terminal browser pane for you, following the agent's tab
  • browser_navigate asks per domain like web_fetch ("always allow" saves browser_navigate(domain:github.com)) and only opens http(s). Every request the page makes (images, scripts, redirects, links clicked) is checked against link-local and cloud-metadata addresses and blocked, with a note in browser_console. Clicks and typing ask per call unless you allow the tool.
  • Plan mode asks before opening a page and blocks everything that could change something on a site. browser_snapshot, browser_wait_for, browser_console and browser_network only read, so they never ask. browser_screenshot is read-only unless save_path is set; saving a screenshot writes a project file and follows normal write permissions.
  • A click fails, naming what's in the way, when something such as a cookie banner covers the element, instead of clicking the banner.
  • Downloads are saved to ~/.local/share/larik/browser-downloads, and the model is told each file's path. File inputs never open a system dialog; the model uses browser_upload.
  • Frames: the contents of an iframe from the same site are part of the snapshot, and you can click and type inside it. A frame from another site is listed with its URL only; the browser doesn't let a page read it.
  • Subagents have their own tabs in the same browser, so several can browse at once without navigating each other's pages. Their tabs close when they finish. To keep the browser from a subagent, list its tools without browser.
  • Screenshots need a model that can see images. They're JPEGs at one pixel per CSS pixel (a 1280×900 viewport is about 1,500 tokens on Claude) and stay in the conversation until it's compacted. While the browser pane is open, the page is sized to the pane.
  • Only personal files can enable the browser, choose its binary or size its pane; a shared .larik/settings.json can only switch it off.
  • Addresses you type in the pane go through the same request check as the agent's.
  • Alerts and "leave this page?" prompts are accepted, and confirm or prompt dialogs dismissed, automatically; each is noted in browser_console.

Generated from README.md · section “Web”. Edit that file to change this page.