@flowrag/storage-sqlite
v1.4.2
Published
🗃️ SQLite graph storage for FlowRAG - knowledge graph with traversal and path finding
Maintainers
Readme
@flowrag/storage-sqlite
Graph storage implementation using SQLite. Embedded, fast, versionable.
Installation
npm install @flowrag/storage-sqliteUsage
import { SQLiteGraphStorage } from '@flowrag/storage-sqlite';
const graph = new SQLiteGraphStorage({ path: './data/graph.db' });
await graph.addEntity({ id: 'auth', name: 'Auth Service', type: 'SERVICE', description: '...', sourceChunkIds: [] });
await graph.addRelation({ id: 'r1', sourceId: 'auth', targetId: 'postgres', type: 'USES', description: '...', keywords: ['db'], sourceChunkIds: [] });
const entity = await graph.getEntity('auth');
const relations = await graph.getRelations('auth', 'out');
const path = await graph.findPath('auth', 'dashboard');
const neighbors = await graph.traverse('auth', 2);License
MIT
