Treyspace SDK is a powerful framework for creating knowledge graphs on Excalidraw canvases. It integrates retrieval-augmented generation (RAG) with advanced semantic, relational, and spatial clustering features. Perfect for developers looking to enhance their applications with LLM-powered analysis and seamless database interactions.
The Treyspace SDK is an open-source framework designed for Retrieval-Augmented Generation (RAG) specifically focused on canvas-based knowledge graphs. This SDK efficiently ingests Excalidraw canvas data and integrates it into the Helix graph-vector database, facilitating advanced semantic, relational, and spatial clustering. Enhanced by large language model (LLM) capabilities, it provides intelligent analysis and insights for users.
Key Features
- Responses API: A robust wrapper around the OpenAI responses API, optimized for handling canvas-specific contexts.
- Canvas AI Engine: Server-Sent Events (SSE) endpoints under
/api/ai/*that orchestrate a comprehensive RAG pipeline with graph-based retrieval. - Helix Bridge: Access the Helix graph database through endpoints
/api/clustersand/api/mcp-bridgefor effective semantic clustering. - SDK & Server: Utilize the SDK either as a library in applications or run it as a standalone server to suit various development needs.
- Development-Focused: Streamlined for adaptability, with no authentication, rate limiting, or billing concerns, making it convenient for developers.
Users can access a hosted version with a complete user interface and an integrated Excalidraw canvas at Treyspace.
Example Usage
To demonstrate the capabilities of the SDK, here are some basic commands:
node examples/responses.mjs "Summarise this Excalidraw canvas"
OR to load a complete request:
node examples/responses.mjs --payload ./payload.json
For advanced functionality, SDK usage as a library can be easily implemented:
import { createHelixRagSDK, executeFullPipeline } from 'treyspace-sdk';
// Create SDK instance
const sdk = createHelixRagSDK();
// Sync canvas data
await sdk.syncCanvas({
boardId: 'my-board',
excalidrawData: { elements: [...] }
});
// Get clusters
const clusters = await sdk.refreshClusters({ boardId: 'my-board' });
// Or run full pipeline
const result = await executeFullPipeline({
boardId: 'my-board',
userMessage: 'Explain this diagram',
elements: canvasElements
});
console.log(result.text);
For additional details, refer to the API Reference for a comprehensive overview of endpoints, or explore the Pipeline Guide for an in-depth step-by-step workflow on processing canvas data.
Explore and contribute to the project through GitHub, and connect with the community on Twitter or join the Discord community. Join a growing ecosystem focused on enhancing knowledge graph interactions through innovative canvas technologies.
No comments yet.
Sign in to be the first to comment.