---
id: 11224
lang: en
title: "AI Document Search: LlamaIndex Releases legal-kb for Free"
published_at: "2026-07-06 13:32:00"
source_name: "MarkTechPost"
source_url: "https://www.marktechpost.com/2026/07/05/llamaindex-legal-kb-agentic-retrieval-over-index-v2-with-retrieve-find-read-and-grep-tools/"
canonical_url: "https://news.hamidun.com/en/news/11224"
categories: ["autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# AI Document Search: LlamaIndex Releases legal-kb for Free

> **Краткая суть (BLUF):** LlamaIndex has published legal-kb, a reference application that gives AI agents file-system-style access to a document corpus on top of Index v2. The agent works through four tools: retrieve (hybrid semantic search), find, read and grep.  The system supports automatic file versioning and visual citations that point to the exact source passage.  The stack is TanStack Start, AI SDK 6 with ToolLoopAgent, Prisma and WorkOS.

On July 5, 2026, LlamaIndex released legal-kb, a free AI tool for agentic document search built on Index v2.

## What legal-kb does

The app builds a knowledge base with file-system-style access. Instead of a single RAG query, the agent works with documents through four specialized tools:

* **retrieve**: hybrid semantic search across the whole knowledge base
* **find**: locates a document by name or metadata
* **read**: reads the full contents of a specific file
* **grep**: exact text search inside documents

This toolset lets the agent work methodically. Given a query, it first runs a semantic retrieve to find relevant documents, then narrows results with find using metadata, reads the full text with read and verifies exact wording with grep. This differs fundamentally from classic RAG, where the whole search happens in one step with no chance to refine.

## Technical stack and key features

The app is built on four components:

* **TanStack Start**: server-side rendering and routing
* **AI SDK 6 with ToolLoopAgent**: manages the tool-calling loop
* **Prisma**: ORM for database access
* **WorkOS**: authentication and user access management

Beyond the search tools, legal-kb implements two important features. The first is automatic file versioning: each document gets a version on upload, and the system records which revision the agent relied on when answering. The second is visual citations: the interface shows the user the exact passage from the source document that the information came from.

For the legal context that the name legal-kb clearly hints at, both features are critical. A wrong reference to an outdated version of a contract or an inaccurate quote from a regulatory document can have serious consequences. Versioning and visual citations directly reduce this risk by making the agent's work transparent and verifiable.

## Why developers should care

Legal-kb is published as a reference app: its code is open and serves as an architecture example for teams building corporate AI systems on closed document sets. Typical use cases include contract analysis, search through regulatory guidance, and work with internal policies and procedures.

Index v2 is becoming the foundation for a growing number of agentic applications in the LlamaIndex ecosystem. By publishing legal-kb as a public example, the company shows developers how to combine several search tools in a single agent loop, rather than relying on one monolithic RAG call. For teams that need highly accurate source references, it is a ready-made starting point.

## What this means

Agentic search with a set of specialized tools is gradually displacing one-shot RAG in tasks where accuracy and source traceability matter more than speed. Legal-kb is a practical template that developers can use as a basis for corporate solutions with similar requirements.

### How does an AI tool for document search work?
legal-kb uses four tools: retrieve (semantic search across the knowledge base), find (document lookup by name/metadata), read (reading full contents), grep (exact text search).

### Can AI be used to analyze legal documents?
Yes, legal-kb is a template designed specifically for working with a document corpus through agentic search.

---
- **Первоисточник:** [MarkTechPost](https://www.marktechpost.com/2026/07/05/llamaindex-legal-kb-agentic-retrieval-over-index-v2-with-retrieve-find-read-and-grep-tools/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/11224
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
