-
Notifications
You must be signed in to change notification settings - Fork 0
Agent Integration
Ragmir gives the AI or automation you choose cited local passages through the CLI or a stdio MCP server. Core never calls a model itself.
| Path | What stays local | What crosses the boundary |
|---|---|---|
| Hosted AI | Corpus, index, and retrieval | Only passages returned to the consumer |
| Local AI or automation | Corpus, index, retrieval, and consumer | Nothing unless that consumer uses a network service |
| Ragmir Chat | Corpus, index, retrieval, and answer generation | One explicit model download during setup |
rgr setup --agents claude,codex,kimi,opencode,cline
rgr doctorSetup creates an ignored .ragmir/run.cjs project runner, local MCP helpers, and project-scoped skill links for the selected clients. Re-run installation when you need a different scope or copy mode:
rgr install-agent --agents codex,claudeProject scope is the default. --mode copy is a fallback for filesystems that cannot follow symlinks. Ragmir refuses to overwrite unmanaged same-name skills unless --force is explicitly selected.
Read ragmir://context first when the client supports resources. It identifies the active knowledge base, readiness, freshness, source coverage, and available operations.
| Resource | Use |
|---|---|
ragmir://context |
Active base identity, readiness, freshness, coverage, and capabilities |
ragmir://sources |
Source coverage, skipped-file counts, and index drift, with complete totals |
Use compact retrieval first, then expand one returned citation only when more context is required:
-
ragmir_statusverifies the active base. -
ragmir_route_promptdecides whether retrieval is useful. -
ragmir_search,ragmir_ask, orragmir_researchreturns bounded cited evidence. -
ragmir_expandopens one exact indexed chunk with a small neighbor window. -
ragmir_auditandragmir_security_auditverify coverage and privacy posture.
The server also exposes ragmir_evaluate for local golden-query checks and ragmir_usage_report for metadata-only retrieval usage. Search, ask, research, and expansion accept an optional maxBytes below the configured mcpMaxOutputBytes ceiling.
ragmir_ask returns cited evidence, not a model-generated answer. A hosted consumer receives the passages it requests, so use a local consumer when that handoff is not acceptable.
rgr bases --json
rgr --project-root apps/web search "checkout contract"Ragmir selects the nearest .ragmir/config.json. Root and nested bases keep separate storage. Generated MCP helpers pin RAGMIR_PROJECT_ROOT, and nested bases use deterministic server names so an agent does not silently query the wrong index.
If a client can see more than one Ragmir server, call ragmir_status and verify knowledgeBaseId before retrieval.
Canonical source: docs/agent-integration.md.