Skip to main content

Install

pip install vrin
Requires Python 3.9+.

Get an API key

Sign up at vrin.cloud to get your API key, then set it:
export VRIN_API_KEY=vrin_your_api_key
Or create one from the CLI:
vrin auth login you@example.com
vrin auth create-key --name "my-project"

Insert knowledge

vrin insert "ACME Corp reported $50M revenue in Q4 2025, up 23% YoY. CEO Jane Smith attributed growth to enterprise." --title "ACME Q4"
VRIN automatically chunks the text, extracts structured facts, and indexes everything in the knowledge graph.

Query

vrin query "What is ACME's revenue?"

Stream responses

vrin query "Summarize ACME's Q4 performance" --stream
for token in client.query("Summarize ACME's Q4 performance", stream=True):
    print(token, end="", flush=True)

Upload files

vrin upload ./earnings_report.pdf
client.upload_file("earnings_report.pdf")

Bulk insert

Insert many documents at once from a JSON file:
vrin bulk-insert ./papers.json --tag research

Multi-turn conversations

vrin query "What was ACME's Q4 revenue?" --json
# Note the session_id in the response

vrin query "How does that compare to Q3?" --session-id "sess_abc123"
client.start_conversation()
r1 = client.continue_conversation("What was ACME's Q4 revenue?")
r2 = client.continue_conversation("How does that compare to Q3?")
client.end_conversation()

For AI agents

VRIN is designed to be called by AI agents. When stdout is not a TTY (piped or called programmatically), output is automatically JSON. Use vrin --describe to get a machine-readable schema of all commands.
# Auto-discovery for agents
vrin --describe

# Programmatic usage (always JSON)
vrin query "What is ACME's revenue?" --json
vrin facts "ACME" --json

Next steps