diff --git a/public/blog/banners/web-search-api-for-ai-agents-grounded-research.svg b/public/blog/banners/web-search-api-for-ai-agents-grounded-research.svg new file mode 100644 index 0000000..1a308ff --- /dev/null +++ b/public/blog/banners/web-search-api-for-ai-agents-grounded-research.svg @@ -0,0 +1,12 @@ + diff --git a/src/data/blogPosts.ts b/src/data/blogPosts.ts index 19aa7f3..53132c5 100644 --- a/src/data/blogPosts.ts +++ b/src/data/blogPosts.ts @@ -11,7 +11,17 @@ export interface BlogPost { export const blogPosts: BlogPost[] = [ { - slug: "overlay-network-ai-agents", + slug: "web-search-api-for-ai-agents-grounded-research", + title: "Web Search API for AI Agents: Grounded Research with cosift", + description: "Why raw search APIs aren't enough for AI agents, what grounded research means, and how to install and call cosift's search, answer, and research methods.", + date: "Jul 2", + category: "Blog", + tags: ["app-store", "search", "agents", "research"], + banner: "banners/web-search-api-for-ai-agents-grounded-research.svg", + }, + + { + slug: "overlay-network-ai-agents", title: "Overlay Network for AI Agents: Architecture and Trust Model", description: "What an overlay network for AI agents needs — persistent addressing, NAT traversal, encrypted transport, and per-peer trust — and how Pilot Protocol implements it.", date: "Jul 1", diff --git a/src/pages/blog/web-search-api-for-ai-agents-grounded-research.astro b/src/pages/blog/web-search-api-for-ai-agents-grounded-research.astro new file mode 100644 index 0000000..15cb00e --- /dev/null +++ b/src/pages/blog/web-search-api-for-ai-agents-grounded-research.astro @@ -0,0 +1,134 @@ +--- +import BlogLayout from '../../layouts/BlogLayout.astro'; + +const bodyContent = `
Give an agent a web search API and you've given it access to text. Give it grounded search — retrieval with citations, rerank, and an answer that traces back to a source — and you've given it something it can actually reason over without hallucinating a URL that doesn't exist. That distinction is the whole problem with wiring search into an agent loop: most "web search for agents" integrations are a thin wrapper around a search engine's API, returning a blob of snippets the agent has to parse, dedupe, and hope is current. Pilot Protocol's app store ships a purpose-built answer to this — cosift, a grounded web search and research app any agent installs with one command.
+ +This post covers why grounded search is a different problem than "call a search API," what cosift actually returns, and the exact discover → install → call commands to wire it into an agent today.
A typical setup: the agent gets a tool definition, an API key for a search provider, and a system prompt telling it to "search when unsure." In practice this breaks down in a few predictable ways:
+None of this is a knock on search APIs — they do what they're built to do. The gap is the layer between "raw results" and "something an agent can cite and act on," and that's what a grounded research tool is for.
+Grounded research for agents typically means three things working together:
+cosift, on the Pilot app store, is built around exactly this shape: fast keyword/hybrid search for links and snippets, a medium-latency "answer" mode for a grounded, cited response, and a slower multi-step "research" mode for deeper questions.
+The mechanism matters as much as the tool. Every app on the Pilot app store follows the same three-step loop, and it's local: the app runs on your own daemon as a typed IPC service — JSON in, JSON out — not a remote API call you have to auth against yourself.
+ +Browse the catalogue and inspect an app before installing it — description, vendor, the methods it exposes, permissions it requests, and where its source lives.
+# See what's installable
+pilotctl appstore catalogue
+
+# Inspect cosift specifically
+pilotctl appstore view io.pilot.cosift
+
+ One command. The daemon fetches the bundle, verifies its signature and hash against the manifest, requests the permissions the app declares, and auto-spawns it — no manual start step, no separate service to run.
+pilotctl appstore install io.pilot.cosift
+pilotctl appstore list # confirm state: ready
+
+ Every app exposes a <app>.help method as a runtime discovery contract — it returns every method, its parameters, and a latency class (fast / medium / slow), so an agent (or you) can pick the cheapest method that answers the question instead of guessing.
# Learn the interface at runtime — no docs required
+pilotctl appstore call io.pilot.cosift cosift.help '{}'
+ cosift's methods group into three latency classes:
+Pick the method by what the agent actually needs, not the most powerful one available.
+ +cosift.searchWhen the agent just needs candidate sources to reason over itself:
+pilotctl appstore call io.pilot.cosift cosift.search '{"q":"raft leader election","retriever":"hybrid","rerank":"true","k":"5"}'
+The retriever parameter switches between keyword (bm25), embedding (dense), or combined (hybrid) search; rerank applies an LLM pass over the merged candidates before returning them.
cosift.answerWhen the agent needs a direct answer with sources attached, not a list to synthesize itself:
+pilotctl appstore call io.pilot.cosift cosift.answer '{"q":"What is HNSW and why use it?"}'
+The response carries an answer field plus a sources array — each claim in the answer is traceable to a specific retrieved document, so the agent (or a human downstream) can verify before acting on it.
cosift.researchFor questions that need more than one search-and-read pass — comparing several sources, following up on an ambiguous first result — the slow, LLM-backed research method runs that loop for you. Expect it to take longer (on the order of ten-plus seconds); reserve it for questions where a single-pass answer genuinely isn't enough.
+Because every app on the store speaks the same typed JSON-in/JSON-out shape, an agent can chain them in one workflow without bespoke glue code for each. A research task might look like: cosift.search to find candidate pages, plainweb to pull the full page as clean Markdown for anything cosift's snippet didn't fully cover, then hand the combined context to the agent's own reasoning step. Nothing about the chain requires new authentication or a new SDK — each app is installed the same way and called the same way.
None of this is exotic — hybrid retrieval, rerank, and cited synthesis are well-understood techniques. The value of installing cosift instead of building the pipeline yourself is what the app-store model removes:
+cosift.help without a human writing custom tool-calling glue.This is also where the app store diverges from something like MCP: MCP standardizes how one agent reaches its own configured tools. The Pilot app store is a distributed catalogue — any of the network's 243k+ agents can discover, install, and call the same app the same way, supervised locally by their own daemon. The two are complementary, and a research-heavy agent can reasonably use both.
+Install cosift and try the discover → install → call loop yourself.
+ Browse the app store +