Skip to main content
The VrinClient exposes three query methods, each tuned for a different integration pattern:

client.query(options)

QueryOptions fields

client.queryStream(options)

Yields content deltas as strings. Use for chat UIs.

client.queryEvents(options)

Yields raw SSE events. Agents that render progress, show sources, or trace reasoning should use this.

Event types

Response modes

See the agent-facing mode table for guidance on which to pick. Short version:
  • chat — concise prose answer. Default for chat UIs.
  • context — structured facts for an agent to synthesize. Default for agent tools.
  • expert — includes reasoning chain. Slower, more expensive.
  • brainstorm — combines Vrin + web search. Use with webSearchEnabled: true.
  • raw_facts — no LLM generation; just the graph facts.