Skip to content

Web access

pi reaches the web through two tools Enso adds, and through nothing else:

  • web_fetch fetches one URL and returns the page as text. An HTML page comes back as the text a reader sees: headings, paragraphs, lists, links, code and tables, without its scripts, styles, navigation or hidden parts. It fetches only hosts you have allowed.
  • web_search searches the web. It uses the current model’s own search when the model has one, and can fall back to Tavily.

curl, wget and other network clients in the shell are refused by a guard, and the refusal tells pi to use web_fetch instead.

  • Open Settings, then Web tools. Under Fetching pages, type a host and choose Add; Remove takes one off. A pasted URL is reduced to its host, after you confirm; a wildcard, a path, a port or a login is refused, saying why. Check asks https://<host>/ once, from the server, as web_fetch would; a host that resolves to a private or reserved address is not asked, and Check says web_fetch would refuse it. When the host only redirects, Check offers the host it redirects to: allowing enso.engineer, which redirects to www.enso.engineer, would fetch nothing.

  • The allowlist lives in your config, ENSO_HOME/config.json (~/.enso/config.json by default), and Settings changes only that key in it. By hand, name each host exactly:

    { "webFetch": { "allowedHosts": ["docs.example.com"] } }
  • A project you trust can add hosts for its own threads in its .enso/config.json, once you approve the file on the project page; Settings lists the approved hosts under the project, read only. Either way, the list is read when a session starts, so restart the thread after you change it. Settings names the threads still running on the old list.

  • The project’s page has a Web tools tab for its own: hosts added to yours for threads in that project, and a web_search backend and Tavily domains that replace or add to yours. It shows the file as you approved it, writes the project’s shared .enso/config.json only — the one project file a session reads; web tools in .enso/config.local.json are ignored — changes only the key you touch, approves the file as it writes it, and shows yours beside it, read only. While the file is not the version you approved, the tab says so and changes nothing until you approve it; while the project isn’t trusted, the tab is read only and Enso doesn’t read the file at all.

  • Under Searching, choose the backend — the current model’s own search, or DeepSeek — and the domains Tavily answers only from or leaves out. These are webSearch in ENSO_HOME/config.json, read when a session starts; Settings changes only the key you touch.

  • For the Tavily fallback, set the key under Searching, or put TAVILY_API_KEY in ENSO_HOME/secrets.env yourself. It is read on every call, so no restart is needed. Settings never shows the key again: only whether one is set, with Replace and Remove.

To see it: open a thread from the rail, then choose web_fetch https://bun.sh/blog ok.

A web_fetch call answered “Not fetched”, because no host is allowed yet

  1. The web_fetch call, and the URL pi asked for.
  2. The answer pi got. It says why nothing was fetched, which file to edit, and the JSON to put in it.

In the thread above, pi first tried curl https://bun.sh/blog and the network-egress guard refused it. pi then used web_fetch, which fetched nothing either, because the allowlist is empty. That is the default, not a mistake: until you add a host, nothing is fetchable. pi’s answer passes the fix on to you (Add bun.sh to webFetch.allowedHosts) instead of trying another way round.

Note the difference in the chat. The curl refusal is a guard receipt. The web_fetch refusal is an ordinary result with a check mark: the tool worked, and its answer is “not fetched”.

A host that is not on the list gets its own answer, naming the hosts that are. Matching is exact: allowing example.com does not allow docs.example.com.

When web_fetch fetches an HTML page, the first line of the result says so and how much of the page was text, for example text/html → text (8.7% of 46,534 chars). Other types, such as plain text, markdown and JSON, come back exactly as the server sent them. A share near zero means the page did not extract well, for example one that builds its content with JavaScript.

For web_search, the first line of every result names the backend that answered and, when it fell back to Tavily, why. When a model answers without searching and Tavily is not set up, the result says no web search was performed.

  • web_fetch never follows a redirect. It reports where the redirect points, so you can allow that host too.
  • It fetches text only, at most 512 KB, within 30 seconds, over http or https, and never a URL with a password in it.
  • pi cannot widen its own allowlist. Writes into ENSO_HOME and into a project’s .enso/ are refused by the guards, shell redirects included. Settings writes it through the server, which answers only Enso’s own page.
  • A page’s text is marked as untrusted before pi reads it. That is a warning to the model, not a filter: a fetched page can still try to give pi instructions.
  • Text a page hides is left out: comments, templates, and elements hidden by an attribute or an inline style. Text hidden by the page’s stylesheet is not recognised as hidden, and comes through.
  • The check that a host resolves to a public address is advisory. It is not a network boundary.