Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder
Module 3Full course10 min read

Agentic Search vs. Vector Search

Why many agents now search like a developer — grep, read, follow links — instead of relying on a vector index, and how to choose between them.

Watch a coding agent find its way around an unfamiliar codebase and you'll notice something surprising: it doesn't consult a vector database. It lists the folders, searches for a function name, opens the file, spots an import, follows it to another file, and searches again. It looks a lot like an experienced developer at a terminal. And for most coding tasks it works better than the embedding-based retrieval you learned in the previous two lessons.

This lesson explains that approach, called agentic search, and when it beats a vector index. You'll learn why many agent builders moved to it, where vector search still clearly wins, how to combine the two, and how to organize your own files and documents so agents can search them well. You'll also build a small set of search tools that give any agent you write the same abilities.

What agentic search is

Agentic search means the agent finds information by using ordinary search tools iteratively, deciding each next step based on what it just found. The typical tools are:

ToolWhat it doesDeveloper equivalent
List / globFind files by name or pattern (**/*refund*)ls, find
GrepFind exact text or patterns inside filesgrep, rg (ripgrep)
ReadOpen a file, or a range of lines in itcat, an editor
Follow linksOpen whatever a file points to: imports, links, referencesJump to definition, click a link
Web search / fetchThe same moves, applied to the internetA browser

The agent combines them in a loop. Asked "where do we calculate late fees?", it might grep for late fee, get twelve hits, notice most are in src/billing/, read fees.ts, see that it imports a penaltyRate from a config file, open that file, and answer with exact line numbers. No index was built in advance. The "retrieval" is just the agent being curious in a disciplined way.

You've already seen the seed of this idea. In Managing Long Context, just-in-time retrieval meant giving the agent references and tools instead of pasting everything in. Agentic search is that principle applied to finding things.