- The PageIndex SDK, local or cloud β vectorless, reasoning-based RAG, end to end.
- Much faster indexing β the PageIndex Flash engine gets the tree from layout stats: no LLM involved for the structure generation itself, LLMs only write the node summaries, and tree expansion proposes a wave of nodes concurrently.
client = PageIndexClient()
client.submit_document("report.pdf")
client.chat("What does the report conclude?")Index, to chat, to agent integration, one client.
Local mode needs no server, no vector DB, no PageIndex API key.
Highlights
- Flash engine: the local default (
mode="standard"keeps the classic LLM pipeline). Embedded bookmarks are consumed when trustworthy, and tree optimization is on by default βoptimize="merge"for the deterministic LLM-free pass,"full"(default) adds LLM expand, which runs a wave of nodes concurrently instead of one round-trip at a time. - One complete surface, local and cloud:
PageIndexLocalClient(storage_path=...)is the same client as cloud β submit, tree, page content, chat, and agent tools all present in both modes, so code moves between them unchanged. - Cloud documents, your own model:
api_keydecides where your documents live; a configured chat model decides who answers β and the two combine.PageIndexClient(api_key="pi-...", chat_model="openai/gpt-5.2")runs the same in-process document-QA engine over the live cloud tool set. Page content flows through your process to your provider on your credentials;doc_idtargets at the prompt level;enable_citationsstays with the managed chat. - Agent integration: the cloud MCP tool contract, in-process β
client.agent_tools()(plain functions),as_openai_tools(),as_anthropic_tools(),as_claude_mcp(), plus one-callopenai_agent_config()/anthropic_runner_config()/claude_agent_config()bundles andagent_instructions()for the system prompt. Cloud clients get the live server tool set over the MCP bridge (read-only endpoint by default); local clients get the in-process subset with the same schemas and envelopes β agent prompts port unchanged. - Chat surfaces:
chat()β question in, answer out, on any backend;chat(stream=True)shows the run as it happens, thinking and tool calls woven into the text, or as typed events via.events;chat(protocol="responses" | "messages")drives the OpenAI Responses or Anthropic Messages API natively with that protocol's own shapes, andchat_completions()keeps the OpenAI-compatible envelope β all withdoc_idtargeting, streaming, honest usage accounting, and prompt-cache continuity across turns. Transcripts append verbatim: a protocol lane's output goes back into the next request unchanged. - Model & connection knobs:
index_model/chat_model,index_backend/chat_backend(and per-callbackend) passed verbatim to each lane β LiteLLM-routed providers, keyless OpenAI-compatible servers, Azure/Bedrock/Vertex included. index=/chat=slots: the grouped spelling of the flat arguments β a string shorthand or a mapping (index={"model": ..., "storage_path": ...},chat={"model": ..., "backend": ...})."cloud"/"local"name a side, an optionalmode=cross-checks it, andPageIndexLocalClient/PageIndexCloudClienttake the same slots.PageIndexCloudClient()readsPAGEINDEX_API_KEY; a barePageIndexClient()stays local no matter what the environment holds.- Typed config shapes:
IndexConfig/CloudIndexConfig/LocalIndexConfig/ChatConfig, withpy.typedshipped so your type checker sees them. - Nothing fails quietly: unknown keys, mixed sides, empty values and mode/content conflicts refuse at construction with the legal vocabulary in the message; dead credentials or a missing model fail the indexing run instead of storing a document with blank summaries; every cloud error carries its HTTP status.
- Dependencies: Python >= 3.10;
openai-agentsin the base install (the chat engine);[anthropic]and[claude]extras for those SDKs.
Also in 0.2.14
- The protocol doors move behind the front door.
responses()andmessages()are nowchat(protocol="responses")andchat(protocol="messages")β same engines, that protocol's own input and output shapes (transcript items or content blocks in, the response envelope or native event stream out), andshow_processdoes not apply there because the transcript is the process. Breaking: the old method names raise, and the message names the new spelling.chat_completions()is unchanged. chat()gains the knobs that lost their public home:instructions(appended after the managed prompt),max_turns,backend,extra_headers, andextra_bodyfor the provider's own request fields (thinking,top_k,max_output_tokens, β¦), merged last so they win.reasoning_effortlands in each lane's native spelling β LiteLLM'sreasoning_effort, Responsesreasoning.effort, Messagesoutput_config.effort.protocol="messages"needsmodel=naming a Claude model.- The process display speaks one vocabulary. Woven lines are labeled by their event type names β
[thinking],[tool_call],[tool_result]β flush left, no arrows, no indent; and theshow_processdict keys are those same names:thinking/tool_call/tool_result(+max_chars), matching.events. Breaking against 0.2.13's one-day-old spelling:{"tool_calls": ...}/{"tool_results": ...}now raise, with the valid keys named in the error;ChatProcessOptionsfields follow. - Docs: the chat page at docs.pageindex.ai documents
show_process,.events, and the protocol lanes.
Full Changelog: v0.2.13...v0.2.14