Get Started

Your agent reads the web and searches it. It fetches a page as markdown, and searches with a key of yours, never one your agent holds.

You need the link-web plugin, which lnk plugin add link-web installs. Fetching a page costs nothing. Searching takes a key from Brave Search or Tavily, whose plans say what a search costs.

Quickstart

lnk plugin add link-web
BRAVE_API_KEY=... lnk sandbox tool add web --allow fetch --allow search --env BRAVE_API_KEY -- lnk-link-web serve
lnk agent allow tool web      # it calls web__fetch and web__search

Ask "what's in the news in Lisbon today?" and it searches, fetches the stories it found, and answers from them. lnk agent allow tool web restarts your agent with the tool, and --agent <name> picks another agent.

Search with your key

Link Web searches through Brave Search's API or Tavily's, with the key in its own environment. Your agent and its harness never see the key, because the tool runs outside the agent's sandbox.

TAVILY_API_KEY=tvly-... lnk sandbox tool add web --allow fetch --allow search --env TAVILY_API_KEY -- lnk-link-web serve

With both keys, it uses Brave's unless LNK_WEB_SEARCH=tavily is in its environment too. Without a key, it offers only fetch. A search gives each result's title, address and snippet, and when it was published where the API says. The agent can ask for up to ten results, or only those from the last day, week, month or year.

What a fetch gives

A page of HTML comes as markdown: its headings, paragraphs, lists, tables and links, each link whole so the agent can fetch it next. Scripts, styles, images, menus and forms are left out, and nothing on the page runs. Other text, such as JSON or plain text, comes as it is, while a PDF or an image is refused.

A long page comes in parts of 24 KB, about 6,000 tokens, and each part says where the next starts. Set [tool.web] fetch in your agent's spec for larger or smaller parts. Link Harness sends it with each call, and another harness gets 24 KB.

Fetch a page on your network

A page on this computer or your network is never fetched, so the tool can't reach what your agent's sandbox keeps out. Name a host to let it through:

BRAVE_API_KEY=... lnk sandbox tool add web --allow fetch --allow search --env BRAVE_API_KEY -- lnk-link-web serve --private-host wiki.home.arpa

--private-host takes a name or an address, and can be given more than once. Adding the tool again replaces it, so give its key again too.

Troubleshooting

SymptomFix
Your agent has no web__searchAdd the tool again with a key: --env BRAVE_API_KEY or --env TAVILY_API_KEY.
"search API refused the key"The key is wrong or used up. Add the tool again with a new one.
"on this machine or its networks"The page is local. --private-host names a host you trust.
"is application/pdf, not a page of text"Link Web reads only text.
Each call asks you firstAdd the tool again with --allow fetch --allow search.

Agents Security has the guarantees and gaps, and Agents Decisions why it works this way. To work on its code, see Developing Link Web.