Decisions

How your agent reaches the web, and whose search it uses.

How does your agent reach the web?

Through Link Web, a tool like any other (lnk sandbox tool add web, then lnk agent allow --tool web), so it works in every harness and its calls go through the agent's proxy, logged and gated. It runs outside the agent's sandbox, so a search API's key is in the tool's own environment and never the harness's. A tool rather than code in a harness keeps the harness small, and lets you swap it for another search tool by its name.

Why is a page on your network never fetched?

The tool runs outside the sandbox, so a fetch could reach what the sandbox keeps out: this computer's servers, your network, a cloud's metadata service. It keeps the same rule as the sandbox's proxy, from the same code: every address a name resolves to is checked, the connection is made only to those addresses, and each redirect is checked again. A host you trust is named with --private-host.

Why does a fetch give markdown, a part at a time?

A model reads markdown as well as HTML at a fraction of the tokens, and the tags around the content (scripts, styles, menus) are most of a page. A part's size is an opinion, [tool.web] fetch in the spec, and 24 KB in Link's, about 6,000 tokens, under what Link Harness keeps of a tool's answer. Each part says where the next starts, as memory's calls do, and the page is fetched again for it, so the tool keeps nothing between calls.

How does the tool learn the agent's opinions?

Link Harness sends each call the called tool's own table of the agent's spec, in its _meta (link.local/spec). One tool serves every agent, so its opinions can't be set when it's added, and a call is the only place each agent's reaches it. A tool that reads none ignores it, and Link Web without it uses Link's.

Which search APIs does it use?

Brave Search's and Tavily's: both answer a query with titles, addresses and snippets over plain HTTPS with one key, and both can keep to the last day, week, month or year, and either gives a key to anyone who signs up. LNK_WEB_SEARCH_URL points it at another server that answers as one of them does.