Ragnarok
A document workspace where an agent walks a linked graph of your PDFs instead of pulling the top-k chunks.
Upload PDFs, organise them in a directory tree, and ask questions. Each document is parsed into an OKF bundle: cross-linked Markdown with YAML frontmatter. An LLM agent then plans its own retrieval with search, fetch_document and list_documents. It follows links between sections and stops when it has enough to answer.
Classic RAG (embed, top-k, stuff the prompt) is still there as a switchable mode, mostly so the two can be compared side by side.
Why
Similarity search finds passages that look like the question. Most hard questions over a document set are about relationships: what section 4 says about the term defined in section 2, or which contract supersedes which. A graph the agent can traverse handles those better than a ranked list.
How it runs
- UI: Next.js on Cloudflare Workers via OpenNext, with GitHub sign-in through Better Auth.
- API: FastAPI.
- Ingestion: a Modal function, dispatched once per upload, with no queue or polling.
- Storage: R2 for raw PDFs and OKF bundles, and Neon Postgres for metadata.