Repository navigation
Closed
Labels
Description
Feature Request
Add native support for non-text file types including documents, PDFs, and images to Basic Memory.
Problem
Currently, Basic Memory is optimized for plain text and Markdown files. Users working with research papers, documentation, screenshots, diagrams, and other visual/document content need to manually extract or describe the content before it can be incorporated into their knowledge base.
Proposed Solution
Enable Basic Memory to:
- Accept and store documents (PDF, DOCX, etc.) and images (PNG, JPG, etc.)
- Extract text content from PDFs and documents for indexing and search
- Process images with OCR or vision models to make visual content searchable
- Maintain original files alongside extracted/processed content
- Create automatic connections between documents/images and related notes
Use Cases
- Research: Import academic papers (PDFs) and automatically extract key concepts, connect to related notes
- Documentation: Save screenshots of code, errors, or UI designs with automatic text extraction
- Learning: Store textbook pages, diagrams, and visual materials as part of knowledge graph
- Work notes: Import meeting notes from various formats, connect to project documentation
Implementation Considerations
- File storage strategy (local vs cloud bucket, size limits)
- Text extraction pipeline (PDF parsing, OCR for images)
- Vision model integration for image understanding
- Metadata extraction (authors, dates, titles from PDFs)
- Search indexing for extracted content
- UI for viewing/previewing non-text files
- Cost implications for processing (OCR, vision models)
Benefits
- Complete knowledge capture (text + visual + documents)
- Reduced friction in knowledge building workflow
- Better support for academic/research use cases
- Richer semantic connections across all content types
Originally filed by @nellins in basicmachines-co/basicmemory.com#6
Activity
claude commentedon Feb 4, 2026
Claude finished @groksrc's task in 1m 55s —— View job
Triage Complete
Todo List:
Classification
Type: Enhancement / Feature Request
Priority: Medium
Component: MCP Tools
Complexity: Complex
Labels Applied:
duplicate,enhancementAnalysis
This is a duplicate of issue #542, which was filed on 2026-01-05 by @nellins with identical content. Both issues request the same functionality.
Current State
Basic Memory already has partial support for images and documents:
read_contenttool (src/basic_memory/mcp/tools/read_content.py:152) currently supports:What's Missing:
Scope of Work
To fully implement this feature request would require:
PDF Text Extraction:
OCR for Images:
Vision Model Integration:
Storage & Indexing:
Cost & Performance:
Recommendation
Close #543 as duplicate of #542 and consolidate discussion there.
For implementation planning, I recommend breaking this into phases:
Phase 1 (Quick Win): PDF text extraction
read_contenttoolPhase 2 (Medium): Basic OCR
Phase 3 (Advanced): Vision models
Would you like me to close this issue as a duplicate and add this implementation roadmap to #542?
bm-clawd commentedon Feb 26, 2026
Companion Note Architecture (PDF → Markdown)
Expanding on this with a concrete pattern that fits the existing importer framework:
How it works
The companion note follows standard BM format:
Why this fits BM perfectly
ChatGPTImporterandClaudeConversationsImporter— producesEntityMarkdownviaMarkdownProcessorInception angle
An agent with BM could do the extraction itself during idle time. Drop PDFs in a folder → agent notices → reads via vision/OCR → writes companion notes → indexes them. Self-building knowledge base.
This is essentially what Nutrient/PSPDFKit does for PDFs (make them structured and agent-accessible), except we output to markdown instead of a proprietary format. The knowledge stays portable.
calebpickerconsulting commentedon Mar 6, 2026
Lightweight Proposal: Sidecar Entities with Local-Only Binaries
This comment proposes a minimal, cloud-friendly implementation path for source document support — focused on provenance linking rather than content extraction. The core idea: let binary files become knowledge graph entities through markdown sidecar files, without syncing binaries to the cloud.
Core Idea: Sidecar Markdown Files as Entity Proxies
For any binary file in the project directory, an optional sidecar
.mdfile acts as its identity in the knowledge graph:The sidecar is a regular markdown note with a
source_filefrontmatter field:From any other note:
Why This Architecture Is Cloud-Friendly
This is the critical design constraint. Basic Memory Cloud's economics are built on markdown — kilobytes per entity, negligible storage and sync costs. A research project with 100 academic papers could easily reach 500 MB+ of PDFs. Syncing those would fundamentally change the cost structure.
The solution: binary files never touch the cloud. The existing bidirectional sync already only handles
.mdfiles, so this requires zero changes to sync infrastructure. Binaries are invisible to it by design..pdf.md.pdfsourced_fromrelations resolve normallyLocally: the full chain works — note → sidecar entity → binary file on disk.
On cloud / another device: the knowledge graph is complete (all relations, metadata, DOIs resolve), but the physical file isn't present. The sidecar's metadata (DOI, citation info, etc.) provides enough information to locate the source through other means.
Works for Any File Type
This isn't PDF-specific. Any binary can have a sidecar:
survey_data.xlsx.md→ links to raw dataanalysis_output.docx.md→ links to a reportpath_diagram.png.md→ links to a figurebootstrap_cache.rds.md→ links to cached analysis objectsWhat Would Need to Change (Minimal Version)
source_filefrontmatter recognition: During sync, if a note hastype: sourceand asource_filefield, validate that the referenced file exists locally. Surface warnings if it doesn't.basic-memory sourcesCLI subcommand: List all registered source entities, check local file existence, report orphaned references:Convention documentation: Document the sidecar pattern as a recommended practice. This pattern almost works today with zero code changes — creating
Firth_1993.pdf.mdand linking to it via[[sources/firth-1993]]already functions. The missing piece is formalsource_filevalidation and tooling.Relationship to the Full Proposal
This could serve as a Phase 1 that's compatible with the fuller vision described in the issue. The sidecar entity pattern establishes the knowledge graph structure — once source documents are first-class entities, content extraction (Phase 2), OCR (Phase 3), and vision model integration (Phase 4) can layer on top. The sidecar becomes the attachment point for extracted content, search indices, and AI-generated observations, all without changing the entity model.
Phase 1 alone delivers the core value for research and professional workflows: verifiable provenance from knowledge graph claims to primary source documents, with zero cloud storage overhead.
Motivating Use Case
Building a research knowledge base for a multi-study forensic psychology project. Notes cover statistical methods, article summaries, analysis pipeline documentation, and project decisions. All of these derive from primary sources — published papers, R package documentation, analysis scripts, raw datasets — that currently live outside the knowledge graph. The provenance chain breaks at the markdown note. The sidecar approach would close that gap while keeping the architecture lightweight.
phernandez commentedon Aug 29, 2026
Closing as a duplicate of #542 (and the PDF ingestion work tracked in #1006 / #1178).