C6 · Agentic search
Family: Single agent
The agent decides what to look for, reads, judges relevance and tries again, instead of receiving pre-selected passages.
Principle
In a loop, the agent writes its queries, reads the results, judges whether they are enough and refines its search. It keeps light identifiers (paths, queries, links) and loads data on demand rather than preprocessing everything. This is agent-driven RAG.
The problem it solves
A fixed RAG chain returns a batch of passages chosen before the question is understood, and cannot recover from a missed first search.
When to use it
- You search structured text, such as code, where simple tools (grep, ls) work well.
- You cannot tell in advance how many reads will be needed to answer.
When to avoid it
- The corpus is large and unstructured: vector RAG remains the foundation, and the agent complements it rather than replacing it.
- The answer must fit in one quick pass: an augmented LLM with retrieval (A1) avoids search cycles.
Common pitfalls
The anti-patterns that misuse this pattern, best established first. Each sheet describes the symptoms, the public incidents and the remedies.
Tools and agent-computer interface
- AP13 · Unbounded tool output — A tool’s raw result goes straight into the context, whatever its size.
- AP20 · Unsupervised text-to-SQL — The model turns the question into SQL run straight against the database, with no business definitions and no review.
Security and permissions
- AP59 · Unsupervised lethal trifecta — One agent reads untrusted content, touches private data and can send things out, with no one approving.
- AP60 · Uncontrolled rendering as an exit channel — The interface loads on its own the images whose URL the model writes: an exit channel nobody designed.
- AP61 · Third-party content acting with the principal’s rights — The agent acts with the rights of whoever launched it, on text written by a less privileged third party.
Oversight, operations and governance
- AP74 · Unowned customer-facing agent — The agent speaks for the company, makes up a policy, and the company finds out it is bound by what it said.
Synonyms by vendor
- Agentic RAG (Singh et al. (2025))
- Recherche « juste à temps » (just-in-time retrieval) (Anthropic (context engineering))
Neighbouring patterns
Sources
- Message sur X de Boris Cherny (Claude Code) — Boris Cherny
- Pricing — Anthropic
- Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG — A. Singh et al., 2025
- Effective context engineering for AI agents — Anthropic, 2025-09-29
Content reviewed on 2026-10-02