# Repository Briefing: VectifyAI/PageIndex
> Source: https://repoforai.com/repo/VectifyAI/PageIndex (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/VectifyAI/PageIndex
- **Official Docs / Website**: https://pageindex.ai
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (98/100 · Maintenance 35/35 · Adoption 23/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.8.4 (2026-12-03) — https://github.com/VectifyAI/PageIndex/releases
- **Review Snapshot**: 2026-12-03 (Note: v0.8.4 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: API
- **Momentum**: 40,879 ★ total (+8 24h / +92 7d) · 3,516 forks
- **Topics**: `agentic-ai`, `agents`, `ai`, `ai-agents`, `context-engineering`, `information-retrieval`, `llm`, `rag`, `reasoning`, `retrieval`, `retrieval-augmented-generation`, `vector-database`
- **When to Use**: Best for: Teams repeatedly querying long, well-structured documents such as filings, audit reports, and technical manuals, where page citations matter and model-guided retrieval can be tested on representative questions. Skip if: You need predictable latency at high query volume over a large, weakly structured corpus, or you must process scanned documents entirely offline without relying on the hosted visual pipeline.

## Overview
```text
### Architecture & Core Mechanics
PageIndex is a Python document-retrieval SDK that builds a separate tree for each PDF. In local mode, layout determines the initial hierarchy; the indexing model summarizes nodes and refines the tree. Nodes record titles, IDs, page ranges, and summaries. At query time, an LLM navigates this hierarchy and fetches source pages as needed rather than ranking embedded chunks. The SDK exposes tree metadata separately from page content, so applications can inspect the index without loading the document text.

The default entry point is PageIndexClient. The dependency manifest includes LiteLLM and the OpenAI SDK for model integration, PyPDF2 and pypdfium2 for PDF handling, and openai-agents and mcp for agent integrations. Applications can use built-in chat or expose document tools to another agent through OpenAI Agents SDK tools, Anthropic tool adapters, or the Claude MCP adapter. In cloud mode, indexing and storage move to PageIndex Cloud while retrieval and chat can still use the application's compatible model provider.

### Key Capabilities & Differentiators
Local ingestion targets text-based PDFs. The SDK exposes document submission, listing and deletion, tree inspection, and retrieval by page range. Chat supports streaming, conversation history, and queries over one or more document IDs. Omitting the ID lets chat search all indexed documents available to the client. The SDK can emit tagged or Markdown page citations; resolve_citations() produces numbered references. These identify source pages, but do not validate whether the source supports each claim.

Index and chat models can be selected independently using LiteLLM names, with examples for OpenAI, Anthropic, and OpenRouter. Optional Claude Code access can use a Claude subscription. The protocol argument supports OpenAI Chat Completions and Responses response shapes, plus Anthropic Messages with a Claude model. Cloud handles scanned or image-heavy pages visually without a separate OCR step. Page Search and schema-driven Page Extract are additional hosted APIs, not guaranteed capabilities of the local SDK.

### Trade-offs & Limitations
Compared with vector RAG, PageIndex lets the model follow section boundaries and inspect the surrounding pages. That is useful when a question requires combining evidence across sections or uses different wording from the source. In exchange, coverage depends on the quality of the layout-derived tree and the model's navigation. Sequential model and tool calls can also make latency and cost less predictable. For large or weakly structured collections, compare against vector or hybrid retrieval rather than assuming that multi-document chat replaces a corpus-wide shortlist.

Direct PDF input is simpler when a short document fits comfortably in context or when a task genuinely requires reading it all. Tree retrieval is more attractive for repeated questions that need only a few pages of a long document. Evaluate the break-even point on your own workload, including indexing, repeated queries, and citation checking. The MIT license permits integration of the SDK, but does not cover hosted-service terms. Enforce tenant and document permissions outside the agent: document_context() guides selection and is not an access-control boundary.

### Hardware & Deployment Guide
The package lists Python 3.10–3.13. Install it with pip install -U pageindex, configure the selected model provider's credentials, and initialize PageIndexClient. Local mode needs neither a PageIndex server nor a vector database. The default storage directory is ./.pageindex; set storage_path to use a durable location in production. With hosted models, local indexing and storage do not make the workflow offline: confirm what content is sent to the model provider. Size CPU, memory, and disk for PDF processing, parallel ingestion, and retained data, and budget separately for model requests and rate limits.

For hosted indexing, set PAGEINDEX_API_KEY and index="cloud". submit_document(..., wait=True) can wait for submission to complete before chat begins. This mode places documents and index storage in the cloud; the application still configures its chat provider. Dedicated VPC or on-premises deployment is a vendor inquiry rather than a packaged server setup. The v0.8.1–v0.8.3 release notes emphasize layout-derived trees and a unified local/cloud SDK; the package still carries an Alpha classifier, so pin versions and regression-test ingestion, tool calls, and response shapes before rollout.
```

## Key Capabilities
```text
- Index structure: Each PDF gets a hierarchy of section titles, node IDs, page ranges, and summaries instead of an embedding index.
- Model separation: LiteLLM naming lets indexing and chat use different providers; Claude Code is an optional access path.
- Evidence handling: Tree metadata and source pages are fetched separately; chat can emit page citations that resolve_citations() turns into numbered references.
- Agent integration: Existing agents can read the index through OpenAI Agents SDK tools, Anthropic tools, or a Claude MCP adapter.
- Deployment boundary: Local storage defaults to ./.pageindex; Cloud takes over indexing and storage and uses visual processing for scanned PDFs.
- Hosted APIs: Page Search returns relevant pages, while Page Extract uses a JSON Schema to extract fields and tables.
```

## Quick Start / Clone
```bash
pip install -U pageindex
```
