For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
346
Sponsor

Chat with PDF

Indexes a PDF into a vector store and answers questions over it with page-cited retrieval and stratified sampling.

Output will stream here when you run the agent.

Summary

The Chat with PDF Agent lets you ask questions about a PDF and get answers grounded in the document, with a page citation for every claim. It indexes the PDF into a vector store, retrieves only the relevant chunks per question using stratified sampling across page ranges, and can also generate comprehension quizzes from real passages. Reach for it to turn manuals, papers, and reports into something you can query.

Installation

$ pnpm dlx shadcn@latest add @agentcn/langgraph/chat-with-pdf

Composition

├── index.ts
├── instructions.md
├── lib/vector-store.ts
├── tools/list_documents.ts
├── tools/query_pdf.ts

Customization

  • Edit index.ts to change the model, description, or system prompt.
  • Add route-local tools under tools/; tool input and output types are inferred from TypeScript.
  • Run dawn verify before deploying generated LangGraph artifacts.