statutory questions & answers
Introduction to Hayagriva Docs
PageIndex is a document harness for LLMs and agents: the layer that lets your AI model work with your documents. Use it to get cited answers from long documents, find the pages that answer a question, and extract data as JSON. Pick the product that fits your needs:
| You want to | Use | API keys you need | Coding agent |
|---|---|---|---|
| Get answers with line-level citations | PageIndex Agent | PageIndex and your LLM's | |
| Find the pages that answer a question | Page Search API | PageIndex | |
| Extract fields and tables as JSON | Page Extract API | PageIndex |
All three products use the same PageIndex API key, the same SDK (Python or JavaScript) and the same document library: a document you upload for one works with the others. Working with a coding agent such as Claude Code, Codex, or Cursor? Copy prompt copies a prompt to paste into it, and the agent sets up that product in your project.
PageIndex Agent & Structural Tree
PageIndex replaces fragile vector text-chunking with hierarchical document reasoning. Rather than breaking 100+ page CIRP resolution plans or High Court paper books into arbitrary 500-token chunks, PageIndex extracts the document's true table of contents and structural tree so your model navigates pages just like a seasoned practitioner.
Why Agentic Professionals?
The restructuring and valuation landscape is transitioning from passive manual research to autonomous agentic execution. Becoming an Agentic Professional equips your practice with sovereign local agents that read filings, verify statutory timelines, cross-reference judicial precedents, and synthesize multi-page briefs with verifiable citations.
Your confidential CIRP resolution plans and case files never leave your workstation. Hayagriva processes documents locally.
Every statement generated by the agent links directly back to the exact paragraph, page number, and watermark in the original filing.
Python & TypeScript SDKs
Install the PageIndex library with a single command:
# Python SDK
pip install pageindex
# JavaScript & TypeScript SDK
npm install pageindex
import pageindex
# Upload and hierarchical token indexing
doc = pageindex.upload_and_index("cirp_resolution_plan_120pp.pdf")
# Line-level precision query
answer = pageindex.query(
document_id=doc.id,
prompt="What is the distribution waterfall under Section 53 for operational creditors?"
)
print(answer.text)
for citation in answer.citations:
print(f"Page {citation.page_number}, Line {citation.line_start}-{citation.line_end}: {citation.matched_text}")