Skip to main content
Guide9 min read·Updated July 25, 2026
🧩

Best AI Agent Skills for RAG and Retrieval in 2026

B

A. Frans

Published July 25, 2026

Agent SkillsRAGRetrievalVector SearchAI Memory

You ship a RAG chatbot. It demos beautifully on the five questions you tested. Then a user asks something slightly off the beaten path, and the agent confidently answers from a chunk that happens to share a few keywords but is about a completely different product. Nobody flags it, because the answer looks fine. That's the failure mode that actually bites: not the model being dumb, but the retrieval handing it the wrong page and the model dutifully building a wrong answer on top of it.

Retrieval is where most of these projects quietly break, and it's the part people spend the least time on. The instinct is to reach for a bigger model. The fix is almost always upstream: how documents get chunked, how chunks get ranked, and whether the thing you retrieved is even relevant to the question. An agent skill that retrieves the wrong context confidently is worse than one that retrieves nothing, because at least "I don't know" is honest.

Below are the agent skills and MCP servers worth installing if you want retrieval that holds up past the demo. They split into three jobs that people often lump together and shouldn't: pulling answers from documents, giving an agent long-term memory across sessions, and searching a codebase by meaning instead of grep.

Quick comparison

SkillWhat it doesTypeBest forTrust
RAGFlowDeep document parsing + RAGMCP serverPDFs, tables, messy docsVerified
LangChainRetriever + vector store frameworkSkillBuilding custom pipelinesVerified
Vercel AI SDKRAG patterns for app devsSkillTypeScript/Next.js appsOfficial
SupermemoryLong-term memory engineSkillFast agent memory + APIVerified
LettaStateful agents, self-managing memorySkillAgents that rememberVerified
HindsightMemory that learns from past runsSkillImproving over timeVerified
OpenVikingContext database for agentsSkillPurpose-built agent storageVerified
SerenaSemantic code retrievalMCP serverSymbol-level codebase searchVerified
Codebase Memory MCPPersistent code indexMCP serverLarge-repo code intelligenceVerified

RAGFlow: retrieval that starts with reading the document properly

Most RAG tutorials skip the hard part and jump straight to embeddings. RAGFlow is built around the thing they skip: understanding the document before you chunk it. It does layout-aware parsing, so a PDF with two columns, a nested table, and a chart caption gets read the way a person reads it, not flattened into one soup of text where the table headers end up glued to the wrong rows.

That matters more than it sounds. A huge share of bad retrieval traces back to chunking that split a table in half or merged a heading into the paragraph below it. Fix the parsing and a lot of the "why did it retrieve garbage" problems disappear before you touch the ranking. RAGFlow runs as its own service; register it with claude mcp add ragflow -- npx -y infiniflow/ragflow and point it at your docs per the repo. At roughly 86,000 stars it's one of the most-used open-source RAG engines going, and the document-understanding angle is what sets it apart. Honest note: it's a full engine, not a two-line import, so budget a real afternoon to stand it up.

LangChain: the plumbing for a custom pipeline

If you're building retrieval yourself rather than adopting a packaged engine, LangChain is the framework most people reach for. It wires retrievers, vector stores, and LLMs together, and its abstractions cover the pieces you'd otherwise hand-roll: splitting documents, embedding them, querying a vector store, reranking, stuffing the results into a prompt. Install it with claude skill add langchain-ai/langchain from the repo.

At around 142,000 stars it's the default for a reason, but a fair warning: the abstractions can hide what's actually happening. When retrieval is bad, you sometimes have to peel back three layers to see which chunk got picked and why. That's a tradeoff worth making for the ecosystem and the integrations, but go in knowing you'll occasionally fight the framework to debug it. Great for prototyping and for pipelines you expect to customize heavily.

Vercel AI SDK: RAG for people shipping web apps

Vercel AI SDK is the official skill, and it's aimed squarely at TypeScript and Next.js developers who want RAG inside an app rather than a standalone service. It gives you best-practice patterns for embedding, retrieval, and streaming responses, so you're not stitching together five libraries to get a chat endpoint that cites its sources. Install with claude skill add vercel/ai from the repo.

At about 26,000 stars, its strength is fitting into a stack you already run. If your product is a web app and you want retrieval that plays nicely with React Server Components and edge functions, this is the least-friction path. It won't parse a gnarly PDF for you the way RAGFlow does; pair it with a real parsing step if your source documents are messy.

Supermemory, Letta, Hindsight, OpenViking: giving an agent a memory

Document RAG answers "what does this corpus say." Agent memory answers a different question: "what happened last time, and what does this user already know." Bolting a vector database onto a chat loop is not the same thing, and conflating the two is a common design mistake.

Supermemory is a fast memory and retrieval engine with an API, built for giving agents long-term recall without a heavy setup. Roughly 28,600 stars; install with claude skill add supermemoryai/supermemory from the repo. Reach for it when you want memory as a service you call, not infrastructure you babysit.

Letta, the project formerly known as MemGPT, takes a more opinionated stance: stateful agents whose memory manages itself, deciding what to keep in context and what to page out. Around 24,000 stars; claude skill add letta-ai/letta from the repo. The self-managing memory is the draw and also the thing to test hard, because "the agent decides what to remember" is powerful right up until it forgets the one fact you needed.

Hindsight focuses on memory that learns from past interactions, so the agent gets better at a recurring task instead of repeating the same mistake. About 18,800 stars; claude skill add vectorize-io/hindsight from the repo. OpenViking is a context database purpose-built for agents rather than a general vector store retrofitted for the job, at roughly 27,000 stars; claude skill add volcengine/OpenViking from the repo. Pick one to start. Running two memory systems that disagree about what the agent knows is a debugging headache you don't want.

Serena and Codebase Memory MCP: retrieval for code, not prose

Searching a codebase is its own problem. Text chunking treats a function like a paragraph, which loses the structure that makes code meaningful. Two skills handle this properly by indexing symbols, not just strings.

Serena is an MCP toolkit that gives the agent semantic retrieval over a codebase at the symbol level, so "where is this function defined and who calls it" becomes a real query instead of a grep-and-pray. Around 27,000 stars; register it with claude mcp add serena -- npx -y oraios/serena per the repo. Codebase Memory MCP indexes a repo into a persistent, queryable code-intelligence index the agent retrieves from, which pays off on large codebases where re-reading files every session is slow and wasteful. Roughly 35,000 stars; claude mcp add codebase-memory-mcp -- npx -y DeusData/codebase-memory-mcp from the repo. If your agent spends most of its time in a big repo, symbol-level retrieval is a bigger upgrade than a better model.

What the workflow actually looks like

Here's a concrete case. You have 400 support PDFs and you want an agent that answers customer questions from them accurately. You run the docs through RAGFlow so the tables and layouts survive parsing intact, rather than letting a naive splitter shred them. You test retrieval on its own first: for twenty real questions, does the top result actually contain the answer? If not, you fix chunking before writing a single line of prompt, because no model recovers from a bad retrieve.

Once retrieval is solid, you add Supermemory so the agent remembers what a given customer already asked, and stops re-explaining basics on the third message. The document layer answers "what's true," the memory layer answers "what's relevant to this person right now." Kept separate, each one is debuggable. Mashed together, you get an agent that confidently cites last week's conversation as if it were product documentation, and you spend a day figuring out why.

The pattern holds across all three categories. Get the retrieval honest first, measured against real questions, then layer memory and code intelligence on top. The order matters because a confident wrong answer is expensive and quiet, and it's almost always a retrieval problem wearing a model costume.

How to choose

Start from your source material, not the tool list. Messy PDFs and tables: RAGFlow earns its keep because parsing is your bottleneck. Building retrieval into a TypeScript app: Vercel AI SDK. Hand-rolling a pipeline you'll customize heavily: LangChain, eyes open about debugging through its layers.

For memory, decide what you actually need. Simple recall via an API: Supermemory. Agents that manage their own state: Letta. Improving on a repeated task: Hindsight. Purpose-built storage: OpenViking. Pick one and live with it before adding another. For code, Serena for live symbol-level search and Codebase Memory MCP for a persistent index on large repos.

Don't install all nine. Each one is a new retrieval surface to trust, and the whole point is trusting what comes back. Add one, verify it returns the right context on questions you know the answer to, then add the next. If you're wiring these into a broader build, our AI engineer skills roundup and machine learning engineer skills guide cover the surrounding stack, and the knowledge management skills roundup goes deeper on the memory side.

FAQ

Why does my RAG retrieve irrelevant chunks even with a good model? Because the model never sees your documents, it sees whatever the retriever hands it. Bad results almost always trace to chunking that broke up tables or context, or a similarity search that matched keywords over meaning. Fix parsing and ranking first; the model isn't the problem.

What's the difference between RAG and agent memory? Document RAG pulls answers from a fixed corpus, the same for every user. Memory (Supermemory, Letta, Hindsight, OpenViking) is per-agent or per-user state that accumulates over time. You often want both, but they're separate systems and treating them as one causes the agent to blur "what's true" with "what we discussed."

Can't I just add a vector database and call it RAG? That's exactly where most projects stall. A vector DB is one piece. Without careful chunking, decent embeddings, reranking, and a check that the top result is actually relevant, you get a system that retrieves confidently and wrongly. The database is the easy 20%.

Which should a solo developer start with? If you're answering questions from documents, RAGFlow. If you're building into a web app, Vercel AI SDK. Add memory only once your retrieval is honest on real questions, and check the linked repo for current install steps before you wire anything in.

Share this article

📬

Get More AI Tool Guides

New comparisons and guides every week. Join thousands of professionals staying ahead of the AI curve.