Now with Knowledge Graphs & Advanced Retrieval

Build AI Apps
10x Faster

The complete backend for RAG and LLM applications. Vector storage, document processing, knowledge graphs, advanced retrieval strategies, and user authentication — all in one place.

50ms Avg Response
99.9% Uptime
10M+ Vectors/Project
app.ts
import { createClient } from 'devabase-sdk';

const client = createClient({
  baseUrl: 'https://your-server.com',
  apiKey: 'dvb_your_key'
});
client.useProject('your-project-id');

// Upload and process documents
await client.documents.upload('docs', {
  file: pdfBuffer,
  filename: 'manual.pdf'
});

// Semantic search
const results = await client.search.query({
  collection: 'docs',
  query: 'How to configure auth?',
  rerank: true
});

// RAG Chat with sources
const response = await client.chat.send({
  collection: 'docs',
  message: 'Explain the setup process',
  include_sources: true
});

Powered by industry-leading AI infrastructure

OpenAI
Anthropic
Google AI
Cohere
Voyage AI
PostgreSQL
pgvector
Features

Everything you need to build AI apps

Stop stitching together multiple services. Devabase gives you a complete, production-ready backend for your AI applications.

Vector Database

Store and query millions of vectors with sub-millisecond latency. Built on pgvector with automatic indexing and optimization.

  • Cosine, L2, and Inner Product metrics
  • Automatic HNSW indexing
  • Metadata filtering

Document Processing

Upload PDFs, Word docs, and more. Automatic chunking, embedding generation, and knowledge extraction.

  • PDF, DOCX, TXT, Markdown
  • Smart chunking strategies
  • Background processing

Semantic Search

Vector search, keyword search, and hybrid retrieval with cross-encoder reranking for optimal results.

  • Hybrid search (vector + BM25)
  • Cross-encoder reranking
  • Multi-collection search

RAG Chat

Production-ready RAG with conversation memory, source attribution, and streaming responses.

  • Multi-turn conversations
  • Source attribution
  • Streaming responses

App Authentication

Complete auth for your app's users. Registration, login, password reset, email verification — ready to use.

  • JWT access & refresh tokens
  • Password reset flow
  • Account lockout protection

Tables & REST API

Create PostgreSQL tables with an auto-generated REST API. Full CRUD with filtering, sorting, and pagination.

  • Auto-generated REST endpoints
  • Rich filtering syntax
  • Cursor-based pagination

Knowledge Graphs

Extract entities and relationships from documents automatically. Build connected knowledge for enhanced RAG.

  • Automatic entity extraction
  • Relationship mapping
  • Graph-enhanced retrieval

Advanced Retrieval

State-of-the-art retrieval strategies that dramatically improve RAG accuracy and relevance.

  • HyDE & Multi-Query expansion
  • Self-Query & contextual compression
  • Parent-Child chunking
How It Works

From zero to production in minutes

Get started with just a few lines of code. No infrastructure to manage.

01

Install the SDK

Add the Devabase SDK to your project with npm, yarn, or pnpm.

npm install devabase-sdk
02

Create a collection

Collections store your documents and their vector embeddings.

await client.collections.create({ name: 'docs' })
03

Upload documents

Upload files and they're automatically processed and indexed.

await client.documents.upload('docs', { file, filename })
04

Search & Chat

Query your knowledge base with semantic search or RAG chat.

await client.chat.send({ collection: 'docs', message: '...' })
TypeScript SDK

Developer-first experience

Fully typed SDK with IntelliSense support, comprehensive documentation, and examples for every use case.

Full TypeScript support
Async/await patterns
Streaming support
Error handling with typed exceptions
Works in Node.js, browsers, and edge runtimes
View SDK Documentation
// Semantic search with reranking
const results = await client.search.query({
  collection: 'knowledge-base',
  query: 'authentication best practices',
  top_k: 10,
  rerank: true,
  filter: { category: 'security' }
});

// Advanced retrieval with HyDE strategy
const advanced = await client.search.query({
  collection: 'docs',
  query: 'How do I implement OAuth?',
  strategy: 'hyde',  // or 'multi_query'
  rerank: true
});
// RAG chat with streaming
await client.chat.stream({
  collection: 'docs',
  message: 'How do I implement OAuth?'
}, {
  onContent: (chunk) => {
    process.stdout.write(chunk);
  },
  onDone: (convId, tokens) => {
    console.log('Done!', tokens, 'tokens');
  }
});

// Multi-turn conversation
const r2 = await client.chat.continue(
  response.conversation_id,
  'What about refresh tokens?'
);
// Extract knowledge from a document
await client.knowledge.extractFromDocument('doc-id');

// List entities by type
const { data } = await client.knowledge.entities.list({
  entity_type: 'PERSON',
  limit: 50
});

// Get entity graph (relationships)
const graph = await client.knowledge.getGraph(
  'entity-123',
  { depth: 2 }
);
// Register app users
const auth = await client.appAuth.register({
  email: 'user@example.com',
  password: 'securePassword123',
  name: 'John Doe'
});

// Login and get tokens
const tokens = await client.appAuth.login({
  email: 'user@example.com',
  password: 'securePassword123'
});

console.log(tokens.access_token);
console.log(tokens.refresh_token);
Architecture

Built for scale and reliability

Enterprise-grade infrastructure that grows with your application.

High Performance

Written in Rust for maximum performance. Sub-50ms response times.

Secure by Default

JWT authentication, API keys, row-level security, and encryption at rest.

Auto-scaling

Horizontal scaling for vector search and document processing.

Multi-tenant

Isolated projects with separate data, API keys, and configurations.

Ready to build your AI app?

Get started for free. No credit card required.

npm install devabase-sdk