PdfToMem

alinvdu/PdfToMem

3.4

If you are the rightful owner of PdfToMem and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

PdfToMem is a system that transforms PDFs into structured, queryable memory representations optimized for Large Language Models (LLMs).

๐Ÿง  PdfToMem

Turn PDFs into structured, queryable memoryโ€”built for LLMs.

Large Language Models struggle with memory. PdfToMem makes it effortless.
By combining reasoning-powered ingestion, structured retrieval, and a multi-agent architecture, it transforms unstructured PDFs into rich memory representations.

It exposes a powerful MCP Server to coordinate ingestion, reasoning, storage, and queryingโ€”using state-of-the-art tools like LlamaIndex and LangGraph.


๐ŸŽฅ Video Walkthrough

๐Ÿง  MCP Server โ€” Memory Control Plane

The MCP Server is the brain of PdfToMem. It leverages tool-based reasoning to:

  • ๐Ÿ—๏ธ Design ingestion pipelines
  • ๐Ÿงฉ Choose the right memory representation
  • ๐Ÿ“Š Index and structure PDF content for retrieval

Use tools like determine_memory_architecture to automatically infer the optimal memory structure using LlamaIndex abstractions:

  • VectorIndex
  • QueryEngine
  • LLMSelector

๐Ÿ› ๏ธ Tool-Driven Parsing โ€” Powered by LangGraph

PdfToMem employs modular tools to extract structured data from PDFs:

  • ๐Ÿ“„ Text Extraction
  • ๐Ÿ“Š Table Detection
  • ๐Ÿงพ OCR for Scanned Docs
  • ๐Ÿ–ผ๏ธ Image Extraction
  • ๐Ÿ“ธ PDF Screenshots

These tools feed into the multi-agent system, enabling intelligent, context-aware processing.


๐Ÿค– Multi-Agent Architecture

PdfToMem uses a LangGraph-based orchestrator to coordinate specialized agents. Each agent performs a distinct task:

  • ๐Ÿ•ต๏ธ Extractor Agent โ€“ pulls raw content
  • ๐Ÿง  Semantic Agent โ€“ applies embedding & understanding
  • โœ‚๏ธ Segmenter Agent โ€“ splits content intelligently
  • ๐Ÿ•ธ๏ธ Relationship Agent โ€“ builds semantic links

The orchestrator decides when and how to invoke these agents based on the content type and reasoning goals.


๐Ÿงญ Memory Planning โ€” Reasoning Over Representation

Once the data is structured, a planning model (currently o3-mini) determines the best memory format using LlamaIndex components:

  • ๐Ÿงฑ SimpleSentenceIndex
  • ๐ŸŒ AutoMergingIndex
  • ๐Ÿงฎ Custom tool-enhanced indices

This reasoning-driven approach ensures optimal retrieval performance tailored to the document.


๐Ÿ’พ Storage โ€” Flexible, Dynamic, Queryable

Based on the selected memory representation, a FastAPI-powered Storage Service builds a tailored query engine for each PDF.

  • ๐Ÿ” Built-in search and retrieval
  • ๐Ÿง  Vector and hybrid index support
  • ๐Ÿงช Modular for experimentation

The storage is designed to support scalable memory systems across domains.


๐Ÿ–ฅ๏ธ MCP Client โ€” Full Control with a Friendly UI

The MCP Client is a React-based interface for controlling the full lifecycle:

  • โš™๏ธ Configure agents, tools, memory plans
  • ๐Ÿ“‚ Upload and ingest PDFs
  • ๐Ÿ”Ž Preview structured chunks
  • ๐Ÿงช Query memory and view responses

Everything is interactive, inspectable, and customizable.


๐Ÿš€ Why PdfToMem?

  • โœ… LLM-optimized ingestion & memory
  • ๐Ÿงฉ Modular tools & agents
  • ๐Ÿง  Reasoning-based memory planning
  • ๐Ÿ’ฌ Queryable representations via LlamaIndex
  • ๐ŸŒ UI + API for full pipeline control

๐Ÿ› ๏ธ Contributions welcome! Help us build the future of intelligent memory systems.
๐Ÿ”—