Anvesh
Developer Quickstart

Getting Started with Anvesh

Spin up a local cluster, use the TypeScript SDK or CLI, create an index, ingest documents, and run hybrid search.

1. TypeScript SDK Quickstart

Install the official client SDK in your Node.js or web application:

npm install @vaagatech/anvesh-sdk

Connect and run hybrid vector search:

import { AnveshClient } from "@vaagatech/anvesh-sdk";

const client = new AnveshClient({
  baseUrl: "https://api.search.example.com",
  apiKey: process.env.ANVESH_API_KEY,
});

// 1. Create Index with Vector Embeddings
await client.indexes.create({
  name: "products",
  mappings: {
    name: { type: "text" },
    category: { type: "keyword" },
    price: { type: "number" },
  },
  settings: {
    vectorDimensions: 256,
    autoEmbed: true,
  },
});

// 2. Index Document
await client.documents.index("products", {
  id: "prod-1",
  fields: {
    name: "Kanjivaram Silk Saree",
    category: "sarees",
    price: 14999,
  },
});

// 3. Search (with optional field projection)
const results = await client.search("products", {
  q: "silk saree",
  mode: "hybrid",
  projection: { title: 1, price: 1, "meta.brand": 1 },
});
console.log(results.hits);

2. CLI & GitOps Quickstart

Install the Anvesh CLI globally for terminal testing and CI/CD automation:

npm install -g @vaagatech/anvesh-cli

# Initialize declarative config file
anvesh init

# Inspect schema drift vs live cluster
anvesh plan -f anvesh.config.json

# Apply declarative configuration
anvesh apply -f anvesh.config.json

# Run search from terminal
anvesh search products -q "silk saree"

3. Crawler Scheduler & Ingestion Quickstart

# 1. Automate recurring website crawls with cron
curl -X POST http://localhost:3851/v1/schedules \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Docs Crawl",
    "cron": "0 2 * * *",
    "config": { "seeds": ["https://docs.example.com"], "maxPages": 500 },
    "autoIndex": { "enabled": true, "index": "docs", "engineUrl": "http://localhost:3848" }
  }'

# 2. Trigger on-demand "Run Now" execution
curl -X POST http://localhost:3851/v1/schedules/sched_12345/run

# 3. Multi-Source Change Scanner (CDC) for folders, files, and DBs
anvesh-scanner folder --path /var/data/docs --index docs --engine http://localhost:3848
anvesh-scanner file --path /var/data/catalog.ndjson --format jsonl --index products --engine http://localhost:3848
anvesh-scanner db --driver postgres --connection postgres://user:pass@localhost:5432/db --table articles --watermark-col updated_at --index articles --engine http://localhost:3848

4. Local Cluster Launch

git clone https://github.com/vaagatech/anvesh.git
cd anvesh
npm install && npm start

5. Fleet Ports & Endpoints

ServicePortEndpointDescription
Anvesh Engine:3848http://localhost:3848Search & Vector REST API
Hub Control Plane:3849http://localhost:3849Operator Web UI & Ingestion API
Spider & Scheduler:3851http://localhost:3851Site Crawler & Cron Evaluator
Bulk Indexer:3852http://localhost:3852Streaming Bulk JSON Ingestion
Change Scanner (CDC):3853http://localhost:3853Folder, File & Database CDC Daemon

5. Next Steps