Skip to content

Use Cases

Jean-Baptiste THERY edited this page Jul 14, 2026 · 2 revisions

Use cases

Ragmir is most useful when a coding agent or local script needs cited evidence from project files before acting. These workflows use ordinary local folders and fictional paths. Ragmir does not connect to Google Drive, Git hosting, or a visa service: another tool synchronizes files first, then Ragmir indexes the local copy.

Choose the interface

Workflow owner Recommended interface
A developer asking questions in Codex, Claude Code, Kimi, OpenCode, or Cline Local MCP helper created by rgr setup --agents ...
A person exploring or auditing a corpus rgr CLI
A repeatable local Node.js workflow TypeScript API
A shell script or CI job JSON CLI output

Use compact retrieval first. Expand one citation when the consumer needs more context. Keep a human approval step before legal, financial, publishing, access-control, or production changes.

Implement from a private specification

Give a coding agent the acceptance rules without committing the source documents.

pnpm exec rgr setup --agents codex
pnpm exec rgr sources add "private/specification.docx" "private/acceptance-criteria.docx"
pnpm exec rgr ingest

Then ask the agent:

Use Ragmir to retrieve the account-recovery requirements. Cite each rule, expand the strongest citation, then implement the code and end-to-end tests.

The expected flow is developer request -> coding agent -> Ragmir MCP retrieval -> code and tests linked to citations. Keep private/ and .ragmir/ ignored.

Onboard a developer in a monorepo

Keep shared decisions in a root knowledge base and package-specific documentation in nested bases.

pnpm exec rgr bases
pnpm exec rgr --project-root packages/api search "How does session renewal work?"
pnpm exec rgr --project-root apps/web search "Which client owns authentication state?"

Generated MCP helpers pin the project root. When several Ragmir servers are visible, verify knowledgeBaseId with ragmir_status before retrieval. Ragmir returns the cited root and package passages; the agent builds the architecture and ownership map instead of guessing from source-code names.

The expected flow is developer question -> Ragmir searches root and package docs -> coding agent returns a cited onboarding map.

Build a feature from a synced Drive folder

Point Ragmir at a folder already synchronized to the workstation by the user's Drive client.

pnpm exec rgr sources add "$HOME/Drive/product"
pnpm exec rgr preview --max-files 10 --max-chunks 3
pnpm exec rgr ingest
pnpm exec rgr research "Which requirements constrain the billing export?" --compact

The folder may contain PDF roadmaps, XLSX story lists, and DOCX architecture notes. Preview before ingestion, exclude unrelated folders, and verify the cited source date before implementing a feature. Ragmir indexes the local synchronized copy and does not authenticate to Drive.

The expected flow is feature request -> Ragmir compares matching requirements across local files -> coding agent orders dependencies and acceptance criteria -> code and tests remain traceable to the sources.

Draft a cited YouTube script

A local content script can turn a source library into a reviewable research brief before drafting.

pnpm exec rgr sources add "research/**/*.pdf" "channel/voice.md"
pnpm exec rgr ingest
pnpm exec rgr research "How does local cited retrieval reduce agent context drift?" \
  --compact --json > .ragmir/reports/episode-research.json
node scripts/draft-episode.mjs .ragmir/reports/episode-research.json

The script should preserve citations in the draft and require human review before publication. Ragmir supplies evidence; it does not publish content or guarantee that a generated script is accurate.

The expected flow is episode topic -> Ragmir retrieves cited facts and voice rules -> the chosen AI drafts from that evidence -> human approval.

Maintain a document-driven visa project

Use a local script to compare a private corpus with the current project checklist.

pnpm exec rgr sources add "sources/official-guidance/**/*.pdf" "sources/checklists/**/*.xlsx"
pnpm exec rgr ingest
pnpm exec rgr research "Which documents and deadlines are supported by the available sources?" \
  --compact --json > .ragmir/reports/visa-evidence.json
node scripts/update-project-plan.mjs .ragmir/reports/visa-evidence.json

The script should produce a dated checklist with citations, missing-evidence warnings, and an explicit review state. Source material can be incomplete or outdated. Verify requirements with the relevant authority or a qualified professional before acting; Ragmir does not provide legal advice.

The expected flow is local forms and guidance -> Ragmir retrieves requirements, deadlines, and evidence gaps -> local script updates a dated checklist -> human verification.

Validate any workflow

Before relying on retrieved evidence:

pnpm exec rgr doctor
pnpm exec rgr audit --unsupported
pnpm exec rgr security-audit

Run incremental ingest after source changes. Use audit to detect missing, stale, and unsupported files, and use exact citation expansion before a high-impact decision. See Agent Integration, CLI Reference, TypeScript API, and Security Hardening for the complete operational boundaries.

Clone this wiki locally