The complete backend for RAG and LLM applications. Vector storage, document processing, knowledge graphs, advanced retrieval strategies, and user authentication — all in one place.
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
Stop stitching together multiple services. Devabase gives you a complete, production-ready backend for your AI applications.
Store and query millions of vectors with sub-millisecond latency. Built on pgvector with automatic indexing and optimization.
Upload PDFs, Word docs, and more. Automatic chunking, embedding generation, and knowledge extraction.
Vector search, keyword search, and hybrid retrieval with cross-encoder reranking for optimal results.
Production-ready RAG with conversation memory, source attribution, and streaming responses.
Complete auth for your app's users. Registration, login, password reset, email verification — ready to use.
Create PostgreSQL tables with an auto-generated REST API. Full CRUD with filtering, sorting, and pagination.
Extract entities and relationships from documents automatically. Build connected knowledge for enhanced RAG.
State-of-the-art retrieval strategies that dramatically improve RAG accuracy and relevance.
Get started with just a few lines of code. No infrastructure to manage.
Add the Devabase SDK to your project with npm, yarn, or pnpm.
npm install devabase-sdk
Collections store your documents and their vector embeddings.
await client.collections.create({ name: 'docs' })
Upload files and they're automatically processed and indexed.
await client.documents.upload('docs', { file, filename })
Query your knowledge base with semantic search or RAG chat.
await client.chat.send({ collection: 'docs', message: '...' })
Fully typed SDK with IntelliSense support, comprehensive documentation, and examples for every use case.
// 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);
Enterprise-grade infrastructure that grows with your application.
Written in Rust for maximum performance. Sub-50ms response times.
JWT authentication, API keys, row-level security, and encryption at rest.
Horizontal scaling for vector search and document processing.
Isolated projects with separate data, API keys, and configurations.
Get started for free. No credit card required.
npm install devabase-sdk