Read PDFs and Word documents

Link documents reads the text of PDFs and Word documents for your agent's memory. It's a plugin of its own, off until you add it, so a Link that doesn't need it never installs a document parser.

lnk plugin add link-documents

With it, memory finds a PDF (.pdf) or a Word document (.docx) in memory/ by the text inside it, up to 32 MiB and the first 2 MiB of its text. Without it, memory finds one by its name alone, and a search's reply names the plugin that reads it. Once you add it, your agent's next start reads every document memory found by its name for want of it.

How it runs

Memory runs lnk-link-documents text <pdf|docx> for each document, the document on its input and the text, or why there's none, on its output. It runs as a child of memory that holds none of memory's secrets and no environment, with limits on its memory and its time; one that crashes or takes over 30 seconds fails that document alone. Memory finds it beside its own program, and its sandbox reads it where it's installed.

Its parsers

PDFs are read with lopdf, and Word documents with Link's own reader of their text part, the zip unpacked with zip. A scanned PDF has no text to read.