Scan your whole stack
From OX Research Newsroom
Are you using pageindex?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.7.5
pageindex was last scanned on 24 Nov 2026 at version 0.7.5. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.7.5 LATEST | 24 Nov 2026 | No rules fired |
| 0.7.4 | 19 Nov 2026 | No rules fired |
| 0.7.3 | 19 Nov 2026 | No rules fired |
| 0.7.2 | 19 Nov 2026 | Not shown |
| 0.7.1 | 17 Nov 2026 | Not shown |
Findings for v0.7.5. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.7.5; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Are you frustrated with vector database retrieval accuracy for long and complex documents? Vector-based RAG retrieves by semantic similarity. But similarity ≠ relevance — what retrieval actually needs is relevance, and relevance requires reasoning. On professional documents that demand contextual understanding, domain expertise, and multi-step reasoning, similarity search misses what is relevant but not similar, and returns what is similar but not relevant.
Inspired by AlphaGo, PageIndex replaces the vector index with a hierarchical tree index and lets an LLM reason its way through it, the way a human expert turns to and reads the right section of a long report. Retrieval happens in two steps:
| Vector RAG | PageIndex | |
|---|---|---|
| Index | vector index | tree index |
| Retrieval | semantic similarity search | LLM reasoning over the tree |
| Result | opaque, “vibe retrieval” | traceable to explicit references |
| Context | query embedding only | full context: conversation history, domain knowledge, etc. |
It is ideal for financial reports, legal documents, regulatory filings, technical manuals, medical literature, academic textbooks, and any other long, complex professional document.
pip install -U pageindex
import os
from pageindex import PageIndexClient
os.environ["OPENAI_API_KEY"] = "your-openai-key"
client = PageIndexClient(
index="gpt-6-luna", # model to build the tree index
chat="gpt-6.2-sol", # model to search the tree
)
doc_id = client.submit_document("report.pdf")["doc_id"]
answer = client.chat("What was the 2023 operating margin?", doc_id=doc_id)
print(answer)
index=: a basic model is sufficient. The tree structure itself is extracted from the document layout without an LLM; the index model only summarizes and refines it, which a basic model does well.chat=: use the best model you can afford. The chat model searches the tree to retrieve information. See Query cost and accuracy.Have a Claude subscription? PageIndex can use your subscription to call Claude models through Claude Code: usage is covered by your plan, no API key needed. Install with pip install -U "pageindex[claude]", then prefix model names with claude-code/, e.g., index="claude-code/haiku", chat="claude-code/opus".
The open-source version is ideal for text-heavy PDFs and local workflows. With PageIndex Cloud, document indexing and storage run in the cloud: PageIndex reads every page visually, with no OCR step (why), builds the tree index, and stores it for you. The chat and retrieval layer remains compatible with your model, so you can search the cloud-hosted index using the model provider your application already uses.
Moving indexing and storage from Local to Cloud only requires a PageIndex API key:
import os
from pageindex import PageIndexClient
os.environ["PAGEINDEX_API_KEY"] = "your-pageindex-key"
os.environ["OPENAI_API_KEY"] = "your-openai-key"
client = PageIndexClient(
index="cloud", # build and store the index in PageIndex Cloud
chat="gpt-6.2-sol", # use your preferred compatible model for chat
)
doc_id = client.submit_document("report.pdf", wait=True)["doc_id"]
print(client.chat("What was the 2023 operating margin?", doc_id=doc_id))
On Cloud, citations="cite_with_boxes" cites each claim with its page and a box around the evidence on that page, so you can show the reader exactly where the answer came from. On AMD's 2025 Form 10-K:
answer = client.chat("What was total net revenue in fiscal 2025?", doc_id=doc_id, citations="cite_with_boxes")
print(answer)
AMD’s total net revenue was **$34.639 billion in fiscal 2025**, up **$8.854 billion (34%)** from **$25.785 billion in fiscal 2024**. <cite doc="0000002488-26-000018.pdf" page="71" box="0.055,0.145,0.946,0.336"/>
| Local | Cloud | |
|---|---|---|
| Handles | Text-based PDFs | Text-based, scanned, and image-rich documents |
| Indexing | On your machine | Managed by PageIndex |
| Storage | Local directory | Cloud storage |
| Citations | Page-level | Page, with a box around the evidence |
| Multimodal understanding | — | ✓ |
| Collections & metadata | — | ✓ |
| Folders | — | ✓ |
| MCP server | — | ✓ |
The same API key and SDK also work with:
For dedicated deployment (VPC or on-premises), contact us or book a demo.
Run PageIndex on your machine, step by step. Each step builds on the one before.
pip install -U pageindex
import os
from pageindex import PageIndexClient
os.environ["OPENAI_API_KEY"] = "your-openai-key"
client = PageIndexClient(
index="gpt-6-luna", # model to build the tree index
chat="gpt-6.2-sol", # model to search the tree
)
index=: a basic model is sufficient. The tree structure itself is extracted from the document layout without an LLM; the index model only summarizes and refines it, which a basic model does well.chat=: use the best model you can afford. The chat model searches the tree to retrieve information. See Query cost and accuracy.Model names follow LiteLLM's naming. The two models can come from different providers; set the API key of each provider you use:
| Provider | index= |
chat= |
API key |
|---|---|---|---|
| OpenAI | gpt-6-luna |
gpt-6.2-sol |
OPENAI_API_KEY |
| Anthropic | anthropic/claude-haiku-5-5 |
anthropic/claude-opus-5-5 |
ANTHROPIC_API_KEY |
| OpenRouter | openrouter/anthropic/claude-haiku-5-5 |
openrouter/anthropic/claude-opus-5-5 |
OPENROUTER_API_KEY |
| Claude subscription | claude-code/haiku |
claude-code/opus |
none; install pageindex[claude] |
Leave out index=, and indexing uses gpt-6-luna, which needs OPENAI_API_KEY. For other providers, see the LiteLLM provider list.
Indexed documents are kept in ./.pageindex. To keep them elsewhere, pass the index side as a dict: index={"model": "gpt-6-luna", "storage_path": "my-index"}.
doc_id = client.submit_document("report.pdf")["doc_id"]
submit_document builds the tree on your machine: the structure comes from the PDF's own layout, without an LLM, and the index model only writes node summaries and refines the tree.
Local mode works with text-based PDFs. For scanned files and image understanding, use PageIndex Cloud.
Read what you indexed:
tree = client.get_document_structure(doc_id) # titles, page ranges, summaries; no text
pages = client.get_page_content(doc_id, "5-7") # the text of pages 5 to 7
docs = client.list_documents() # every indexed document
To remove a document, call client.delete_document(doc_id).
A PageIndex tree looks like a table of contents optimized for LLMs and agents:
{
"title": "Financial Stability",
"node_id": "0006",
"start_index": 21,
"end_index": 22,
"summary": "The Federal Reserve ...",
"nodes": [
{
"title": "Monitoring Financial Vulnerabilities",
"node_id": "0007",
"start_index": 22,
"end_index": 28,
"summary": "The Federal Reserve's monitoring ..."
},
{
"title": "Domestic and International Cooperation and Coordination",
"node_id": "0008",
"start_index": 28,
"end_index": 31,
"summary": "In 2023, the Federal Reserve collaborated ..."
}
]
}
See more example documents and generated tree structures.
Ask with your own LLM, or with an agent you already have.
chat() runs PageIndex's agent on your LLM: it finds the right pages, then writes the answer.
answer = client.chat("What changed in the risk factors?", doc_id=doc_id)
The stream shows the agent's thinking and tool calls as it works; pass show_process=False to stream only the answer:
for chunk in client.chat("Summarize this document.", doc_id=doc_id, stream=True):
print(chunk, end="", flush=True)
Pass citations=True, and every claim cites its page:
cited = client.chat("Summarize this document.", doc_id=doc_id, citations=True)
# Revenue increased during the reporting period. <cite doc="report.pdf" page="12"/>
citations="markdown" writes [report.pdf, p. 12] instead. To show the citations, resolve_citations() turns the tags into numbered links and lists the sources:
resolved = client.resolve_citations(cited)
print(resolved["answer"])
# Revenue increased during the reporting period. [[1]](#pageindex-citation-01)
for c in resolved["citations"]:
print(c["index"], c["document"], c["page"])
# 1 report.pdf 12
protocol= returns the response in that API's own shape: "chat_completions" or "responses" (OpenAI), or "messages" (Anthropic, with a Claude model):
response = client.chat("Summarize this document.", doc_id=doc_id, protocol="responses")
print(response["output"])
Continue a conversation. Pass the messages so far in place of the question:
messages = [
{"role": "user", "content": "What changed in the risk factors?"},
{"role": "assistant", "content": answer},
{"role": "user", "content": "Which of these changes matters most?"},
]
answer = client.chat(messages, doc_id=doc_id)
Ask across documents. Index another document, then pass a list of IDs, and keep the same list for every call in a conversation. Leave out doc_id to search every indexed document:
doc_id_2022 = client.submit_document("report-2022.pdf")["doc_id"]
answer = client.chat("How did the operating margin change from 2022?", doc_id=[doc_id, doc_id_2022])
Your agent keeps its own model and gets PageIndex's tools to find and read your indexed documents, so the client needs no chat= here. Name the documents in a first message and put the question in a second:
instructions = client.agent_instructions() # PageIndex's system prompt, or write your own
messages = [
{"role": "user", "content": client.document_context(doc_id)}, # one ID or a list
{"role": "user", "content": "What are the auditor's main concerns?"},
]
Leave out the first message to let the agent look across every indexed document. The context guides the agent; it is not a lock.
Pass instructions, PageIndex's tools, and messages to your agent framework:
Ships with the SDK, no extras needed:
from agents import Agent, Runner
agent = Agent(
name="PageIndex",
instructions=instructions,
tools=client.as_openai_tools(),
model="gpt-6.2-sol",
)
result = Runner.run_sync(agent, messages)
print(result.final_output)
Install with pip install -U "pageindex[anthropic]":
import anthropic
runner = anthropic.Anthropic().beta.messages.tool_runner(
model="claude-opus-5-5",
max_tokens=16000,
system=instructions,
tools=client.as_anthropic_tools(), # asynchronous=True for AsyncAnthropic
messages=messages,
)
final = runner.until_done()
print("".join(block.text for block in final.content if block.type == "text"))
Install with pip install -U "pageindex[claude]":
import asyncio
from claude_agent_sdk import ClaudeAgentOptions, ResultMessage, query
options = ClaudeAgentOptions(
model="claude-opus-5-5",
system_prompt=instructions,
mcp_servers={"pageindex": client.as_claude_mcp()},
allowed_tools=["mcp__pageindex"],
)
async def input_messages():
for message in messages:
yield {"type": "user", "message": message,
"parent_tool_use_id": None, "session_id": ""}
async def main():
async for message in query(prompt=input_messages(), options=options):
if isinstance(message, ResultMessage):
print(message.result)
asyncio.run(main())
tools = client.agent_tools() Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.