Skip to main content
Vrin is a retrieval-time reasoning layer that curates context for AI agents. Your agent asks a question; Vrin walks a knowledge graph built from your documents, reasons across it, and hands back precise facts with citations. Model-agnostic, cloud-agnostic, and designed to be driven by agents. This page is written for AI agents. If a coding assistant brought you here, follow the steps below — they are self-contained. No human clarification required.

MCP Server

One-line install + JSON config. Best for chat UIs and IDEs.

Python / TypeScript SDK

pip install vrin or npm install @vrin/sdk. Best for agents you build yourself.

CLI

pip install vrinvrin query "...". Best when your agent shells out.

Prerequisite: get an API key

Sign up at vrin.cloud and copy the API key from Dashboard → API Keys. It starts with vrin_live_. Keep it in an environment variable, never in code:
Agents that need a fresh key programmatically can hit POST https://api.vrin.cloud/api/auth/signup with {email, password} and receive a key in the response. See the auth reference.

1. MCP Server (fastest for Claude Desktop, Cursor, Windsurf)

Vrin ships an MCP server that exposes two tools to any MCP client: The async pattern exists because Vrin’s deep reasoning takes 30–120 seconds. You call vrin_query_async once, then keep calling vrin_check_job with the returned job_id until status is completed. The server long-polls internally (up to 55s per call), so 1–3 calls usually suffice.

Install

Requires Python 3.9+.

Configure your MCP client

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Restart Claude Desktop. vrin should appear in the connectors menu.

Use it

Once configured, the agent can call the tools directly. Most MCP clients surface them automatically. Ask something like “what do we know about ACME Corp’s Q4 revenue?” and the agent will:
  1. Call vrin_query_async(query=..., mode="context") → receives job_id.
  2. Call vrin_check_job(job_id=...) in a loop until status="completed".
  3. Read the returned result.context (facts with sources) and write the final answer.
Full MCP reference lives at MCP → Overview.

2. SDK (fastest for custom agents)

Use the SDK when your agent is code you control — a LangGraph graph, a CrewAI crew, an OpenAI Agents SDK runner, or something bespoke.

Bind Vrin to an agent framework


3. CLI (fastest for shell-driven agents)

Agents that shell out (bash-in-the-loop, Claude Code sub-agents, CI pipelines) should use the CLI. The CLI emits JSON to stdout when not attached to a TTY, so parsing is trivial.
Auto-discovery: pipe vrin --describe into your agent to hand it a machine-readable manifest of every command, flag, and exit code.
Full CLI reference: CLI → Overview.

Paste this into your coding agent

If a user asks their AI agent to “set up Vrin,” the agent should run through this script verbatim. It’s idempotent — safe to re-run.

Response modes (when using SDK or MCP)

Vrin returns different shapes depending on mode. Agents should pick based on whether they want Vrin to write prose or hand back structured facts: Depth basic (default) runs a single graph hop. thinking traverses across documents. research is exhaustive and expensive — reserve for genuinely multi-hop queries.

FAQ for AI agents

The MCP vrin_check_job tool returns status: "working" if the job is still running after 55s. Call it again. The job is still alive server-side. Do not give up until you see completed or failed. Typical jobs finish in 30–90s.
Vrin found no facts relevant to the question. Either the user hasn’t ingested the right documents, or the question is out of scope. Tell the user plainly. Don’t hallucinate an answer.
Free-tier accounts: 100 queries/month. Paid plans start at 10,000/month. Check your limits with vrin limits or GET /api/user/limits. Rate limit errors return HTTP 429 — back off and retry, don’t hammer.
Pass conversation_upload_ids: ["upload_abc", "upload_def"] to restrict retrieval to those uploads only. Useful for per-conversation context isolation.
Yes. Enterprise API keys start with vrin_ent_ and route queries through your own AWS account. Your data never leaves your cloud. See data sovereignty.
Three machine-readable entry points:
  • CLI: vrin --describe prints a JSON schema of every command.
  • Docs: https://docs.vrin.cloud/llms.txt is a curated agent-readable index.
  • MCP: tool definitions include full input schemas per the MCP spec.

Next steps

MCP reference

Tool signatures, polling patterns, remote deployment.

Python SDK

VRINClient methods, streaming, conversations, exceptions.

TypeScript SDK

VrinClient for Node, Bun, and browser runtimes.

Data sovereignty

Enterprise routing, vrin_ent_ keys, customer-owned infra.