Skip to main content

Welcome to vai

vai (voyageai-cli) is a command-line toolkit for building semantic search pipelines with Voyage AI embeddings and MongoDB Atlas Vector Search. It handles the entire RAG workflow: chunking documents, generating embeddings, storing vectors, and querying with two-stage retrieval.

v1.31.0 introduces voyage-4-nano local inference, so you can get started with zero Voyage API keys using a lightweight Python bridge, then scale to API-backed Voyage 4 models later without changing the broader workflow.

vai pixel robot waving

Brand system

Meet the pixel robot behind the CLI moments

The same robot used for vai greetings, search, explain, and success states now shows up in the docs too, so onboarding and reference pages feel connected to the product experience instead of standing apart from it.

See the local inference guide
Community Tool

vai is an independent, community-built tool, not an official product of MongoDB, Inc. or Voyage AI.

Quick Install

npm install -g voyageai-cli
vai nano setup
vai embed "What is vector search?" --local

Or start with the API-backed quickstart:

npx voyageai-cli@latest quickstart

What vai Does

vai provides commands across the full RAG pipeline:

StageWhat happensCommands
ChunkSplit documents into embedding-sized piecesvai chunk, vai pipeline
EmbedGenerate vector embeddings locally with nano or via the Voyage AI APIvai embed, vai pipeline, vai nano
StoreSave vectors to MongoDB Atlasvai store, vai ingest, vai pipeline
SearchFind similar documents via vector searchvai search, vai query
RerankRe-score results with a cross-encodervai rerank, vai query

Beyond the core pipeline, vai includes:

  • Local Inference: Run voyage-4-nano on your own machine with vai nano setup and --local
  • Chat: Conversational RAG with Anthropic, OpenAI, or Ollama (vai chat)
  • Workflows: Composable, multi-step RAG pipelines defined as JSON (vai workflow run)
  • MCP Server: 11 tools for AI-powered editors like Claude, Cursor, and VS Code (vai mcp)
  • Benchmarking: Compare models on your own data (vai benchmark)
  • Evaluation: Measure retrieval quality with MRR, nDCG, and Recall (vai eval)
  • Code Generation: Generate production-ready integration code (vai generate, vai scaffold)
  • 30+ Educational Topics: Learn embeddings, reranking, RAG, and more (vai explain)

Three Ways to Use vai

CLI

The primary interface for local and API-backed workflows.

vai nano setup
vai pipeline ./docs/ --local --db myapp --collection knowledge --create-index

Web Playground

An interactive browser UI with 7 tabs for embedding, comparing, searching, and benchmarking.

vai playground

Desktop App

A standalone Electron app with secure keychain storage, dark/light themes, and MongoDB LeafyGreen design. Download from GitHub Releases.

Next Steps