cat docs/libraries.md
All docs Last updated

Libraries and sources

A library is a collection of your content that one or more agents can answer from. When an agent is attached to a library it retrieves the most relevant passages for each question and grounds its answer in them — with citations back to the source.

Creating a library

Open Libraries, choose New library, and give it a name. A library starts empty; you fill it with sources.

Adding sources

A source is one body of content. Two kinds are supported:

  • PDF upload — upload a document and Oshu extracts its text (including scanned pages) into searchable Markdown.
  • GitHub repository — point at a public repository of Markdown files and Oshu syncs them. Private repositories work too if you add an access token.

Each source shows its status: indexing, ready, or an error you can act on. You can re-sync an individual source at any time with Sync now — useful after you update a repository or replace a document.

Sources with a re-index cadence also refresh on their own: Oshu checks regularly (hourly by default) which sources are due. A sync cut off by a server update shows as interrupted rather than as an error. If the source has a re-index cadence, it runs again automatically, usually within a day; a source whose sync failed is retried the same way, at most once a day. You can always use Sync now instead of waiting.

How grounding works

When a visitor asks a question, the agent searches the attached library, pulls the passages most likely to answer it, and writes a reply grounded in them. If citations are enabled on the agent, each answer lists the sources it drew from, and a PDF citation links back to the exact document.

If the library has nothing relevant, the agent says so rather than inventing an answer.

Page limits

Library size is measured in pages (roughly one A4 page of text each). PDF sources count their real page count; Markdown files count by length. Your plan sets how many pages you can store; the BYOK plan removes that limit because you supply your own model key and pay your provider directly for indexing.

Reading a document (a PDF, or a PDF or Office file a website source links to) also costs pages, so Oshu checks it before reading it:

  • A document's pages are counted first (for Word and PowerPoint files, from the page or slide count the file records), and a document that would not fit your page allowance is not read. If the pages cannot be counted, room for the largest possible document (1000 pages) is needed.
  • A document that has not changed since the last sync is not read again.
  • Each day Oshu reads at most as many document pages as your plan lets you store. Documents over that are read on a later sync.
  • A website sync reads at most 50 documents. The rest follow on the next sync, and the source shows how many are left.

Tips

  • Keep each source focused — a well-scoped document retrieves better than one giant file.
  • Re-sync after edits so answers reflect your latest content.
  • Attach the same library to several agents to share one knowledge base.

See also: Agents and Plans and billing.