v0.3.3 — Grafana Dashboard & Monitoring

Vector Databases,
Unified for Ruby.

A powerful, unified Ruby client for vector databases. Build AI-powered search, RAG applications, and recommendation systems with a single, elegant API.

$ gem install vectra-client
🔌

Provider Agnostic

Switch between Pinecone, Qdrant, Weaviate, or pgvector with a single line change. No vendor lock-in.

🚀

Production Ready

Built for Ruby 3.2+ with comprehensive test coverage (95%+), retry logic, and circuit breakers.

📈

Observable

Grafana dashboard, Prometheus metrics, and native instrumentation for Datadog and New Relic. Track latency, throughput, and errors.

🏗️

Rails Ready

Seamless ActiveRecord integration with has_vector DSL and automatic migration support.

🔄

Resilient

Built-in retry logic with exponential backoff, jitter, and intelligent error recovery.

📚

Well Documented

Extensive YARD documentation, comprehensive examples, and detailed provider guides.

Supported Providers

Choose your vector database. We handle the rest.

🌲
Pinecone Supported

Fully managed vector database in the cloud. Perfect for production workloads with minimal ops.

View Guide
🔷
Qdrant Supported

Open-source vector database with advanced filtering. Self-host or use Qdrant Cloud.

View Guide
🔮
Weaviate Supported

AI-native vector database with built-in vectorizers and GraphQL API.

View Guide
🐘
pgvector Supported

Vector similarity search in PostgreSQL. Use your existing database infrastructure.

View Guide

Quick Start

Get up and running in minutes

require 'vectra'

# Initialize any provider with the same API
client = Vectra::Client.new(
  provider: :pinecone,     # or :qdrant, :weaviate, :pgvector
  api_key: ENV['API_KEY'],
  host: 'your-host.example.com'
)

# Store vectors with metadata
client.upsert(
  vectors: [
    { 
      id: 'doc-1', 
      values: [0.1, 0.2, 0.3, ...],  # Your embedding
      metadata: { title: 'Getting Started with AI' }
    }
  ]
)

# Search by similarity
results = client.query(
  vector: [0.1, 0.2, 0.3, ...],
  top_k: 10,
  filter: { category: 'tutorials' }
)

results.each do |match|
  puts "#{match['id']}: #{match['score']}"
end